using System.Net; using System.Net.Http.Json; using Anubis.Server; namespace Anubis.Tests; [TestClass] public sealed class HealthEndpointTests { [TestMethod] [TestCategory(Category.Integration)] public async Task HealthAnswersOkWithNameAndVersion() { // The real server on a free local port with its own data folder: no test host package needed (ADR 0004). await using var server = await ServerHarness.StartAsync("docker", ServerHarness.DockerSqlite()); using var response = await server.GetAsync("/health"); var body = await response.Content.ReadFromJsonAsync(); Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); Assert.IsNotNull(body); Assert.AreEqual("ok", body.Status); Assert.AreEqual(AnubisInfo.Name, body.Name); Assert.AreEqual(AnubisInfo.Version, body.Version); } }