This commit is contained in:
2018-12-18 16:33:35 +00:00
parent 077ee889eb
commit 27b77c5273
36 changed files with 10640 additions and 0 deletions

51
Metrics/Metrics.cs Normal file
View File

@@ -0,0 +1,51 @@
using System;
using Xunit;
using Newtonsoft.Json.Linq;
using FluentAssertions;
using System.Collections.Generic;
using System.Collections.Concurrent;
namespace raven_integration
{
public class Metrics
{
/// <summary>
///
/// </summary>
[Fact]
public async void TextMetricsShouldFetch()
{
ApiTextResponse t = await Util.GetTextResultAsync("Metrics/TextSnapShot", await Util.GetTokenAsync("OpsAdminFull"));
Util.ValidateHTTPStatusCode(t, 200);
t.TextResponse.Should().StartWith("# TIMESTAMP:");
}
/// <summary>
///
/// </summary>
[Fact]
public async void JsonMetricsShouldFetch()
{
ApiResponse a = await Util.GetAsync("Metrics/JsonSnapShot", await Util.GetTokenAsync("OpsAdminFull"));
Util.ValidateDataReturnResponseOk(a);
a.ObjectResponse["data"]["timestamp"].Should().NotBeNull();
((JArray)a.ObjectResponse["data"]["contexts"]).Count.Should().BeGreaterThan(0);
}
//==================================================
}//eoc
}//eons