This commit is contained in:
@@ -19,8 +19,8 @@ namespace raven_integration
|
||||
a.ObjectResponse["data"]["searchCaseSensitiveOnly"].Should().NotBeNull();
|
||||
|
||||
var g = a.ObjectResponse["data"];
|
||||
a = await Util.PostAsync("global-biz-setting", await Util.GetTokenAsync("BizAdminFull"), g.ToString(Newtonsoft.Json.Formatting.None));
|
||||
Util.ValidateHTTPStatusCode(a, 204);
|
||||
a = await Util.PutAsync("global-biz-setting", await Util.GetTokenAsync("BizAdminFull"), g.ToString(Newtonsoft.Json.Formatting.None));
|
||||
Util.ValidateHTTPStatusCode(a, 200);
|
||||
}
|
||||
|
||||
//==================================================
|
||||
|
||||
@@ -11,19 +11,7 @@ namespace raven_integration
|
||||
public class Metrics
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async void TextMetricsShouldFetch()
|
||||
{
|
||||
ApiTextResponse t = await Util.GetTextResultAsync("metric/textsnapshot", await Util.GetTokenAsync("OpsAdminFull"));
|
||||
|
||||
Util.ValidateHTTPStatusCode(t, 200);
|
||||
|
||||
t.TextResponse.Should().StartWith("# TIMESTAMP:");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -31,14 +19,16 @@ namespace raven_integration
|
||||
///
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async void JsonMetricsShouldFetch()
|
||||
public async void MetricsShouldFetch()
|
||||
{
|
||||
ApiResponse a = await Util.GetAsync("metric/jsonsnapshot", await Util.GetTokenAsync("OpsAdminFull"));
|
||||
DateTime tsStart = DateTime.Now.AddMinutes(-1).ToOffsetAdjustedUniversalTime();
|
||||
DateTime tsEnd = DateTime.Now.AddHours(-1).ToOffsetAdjustedUniversalTime();
|
||||
|
||||
ApiResponse a = await Util.GetAsync($"server-metric?tsStart={tsStart}&tsEnd={tsEnd}", await Util.GetTokenAsync("OpsAdminFull"));
|
||||
Util.ValidateDataReturnResponseOk(a);
|
||||
|
||||
a.ObjectResponse["data"]["timestamp"].Should().NotBeNull();
|
||||
((JArray)a.ObjectResponse["data"]["contexts"]).Count.Should().BeGreaterThan(0);
|
||||
a.ObjectResponse["data"]["downSampled"].Should().NotBeNull();
|
||||
a.ObjectResponse["data"]["metricMM"].Should().NotBeNull();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user