wabbajack/Wabbajack.BuildServer.Test/BasicServerTests.cs

35 lines
938 B
C#
Raw Normal View History

using System;
using System.Threading.Tasks;
2020-04-11 04:42:07 +00:00
using Wabbajack.BuildServer.Controllers;
using Wabbajack.Common;
using Xunit;
using Xunit.Abstractions;
namespace Wabbajack.BuildServer.Test
{
[Collection("ServerTests")]
public class BasicServerTests : ABuildServerSystemTest
{
[Fact]
public async Task CanGetHeartbeat()
{
2020-04-11 04:42:07 +00:00
var heartbeat = (await _client.GetStringAsync(MakeURL("heartbeat"))).FromJsonString<Heartbeat.HeartbeatResult>();
Assert.True(heartbeat.Uptime > TimeSpan.Zero);
}
[Fact]
public async Task CanContactAuthedEndpoint()
{
var logs = await _authedClient.GetStringAsync(MakeURL("heartbeat/logs"));
Assert.NotEmpty(logs);
}
public BasicServerTests(ITestOutputHelper output, SingletonAdaptor<BuildServerFixture> fixture) : base(output, fixture)
{
}
}
}