2020-03-30 03:47:35 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Wabbajack.Common;
|
|
|
|
|
using Xunit;
|
|
|
|
|
using Xunit.Abstractions;
|
|
|
|
|
|
|
|
|
|
namespace Wabbajack.BuildServer.Test
|
|
|
|
|
{
|
2020-04-01 11:47:47 +00:00
|
|
|
|
[Collection("ServerTests")]
|
2020-03-30 03:47:35 +00:00
|
|
|
|
public class BasicServerTests : ABuildServerSystemTest
|
|
|
|
|
{
|
2020-04-01 11:47:47 +00:00
|
|
|
|
|
2020-03-30 03:47:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Fact]
|
|
|
|
|
public async Task CanGetHeartbeat()
|
|
|
|
|
{
|
2020-04-06 20:48:54 +00:00
|
|
|
|
var heartbeat = (await _client.GetStringAsync(MakeURL("heartbeat"))).FromJsonString<string>();
|
2020-03-30 03:47:35 +00:00
|
|
|
|
Assert.True(TimeSpan.Parse(heartbeat) > TimeSpan.Zero);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Fact]
|
|
|
|
|
public async Task CanContactAuthedEndpoint()
|
|
|
|
|
{
|
|
|
|
|
var logs = await _authedClient.GetStringAsync(MakeURL("heartbeat/logs"));
|
|
|
|
|
Assert.NotEmpty(logs);
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-01 11:47:47 +00:00
|
|
|
|
public BasicServerTests(ITestOutputHelper output, SingletonAdaptor<BuildServerFixture> fixture) : base(output, fixture)
|
|
|
|
|
{
|
|
|
|
|
}
|
2020-03-30 03:47:35 +00:00
|
|
|
|
}
|
|
|
|
|
}
|