42 lines
1002 B
C#
42 lines
1002 B
C#
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 MetricsShouldFetch()
|
|
{
|
|
DateTime tsStart = DateTime.Now.AddMinutes(-1).ToOffsetAdjustedUniversalTime();
|
|
DateTime tsEnd = DateTime.Now.AddHours(-6).ToOffsetAdjustedUniversalTime();
|
|
|
|
ApiResponse a = await Util.GetAsync($"server-metric?tsStart={tsStart}&tsEnd={tsEnd}", await Util.GetTokenAsync("OpsAdminFull"));
|
|
Util.ValidateDataReturnResponseOk(a);
|
|
a.ObjectResponse["data"]["downSampled"].Should().NotBeNull();
|
|
a.ObjectResponse["data"]["metricMM"].Should().NotBeNull();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
//==================================================
|
|
|
|
}//eoc
|
|
}//eons
|