7b0b9c7365
Solution + 23 src projects + 26 test projects renamed; folders, csproj, namespaces, and ScadaLinkDbContext/ScadaBridgeDbContext class updated. ActorSystem "scadalink" → "scadabridge", Akka seed-node URLs migrated. SQL roles/logins, LDAP domains, CLI command name, and CLI config dir (~/.scadalink → ~/.scadabridge) also renamed. Build green; 5 Host.Tests fail awaiting SQL login rename in next commit. Pre-existing StaleTagMonitor timing flakes unchanged. Rename script committed at tools/rename-to-scadabridge.sh.
31 lines
1003 B
C#
31 lines
1003 B
C#
using System.Net;
|
|
|
|
namespace ZB.MOM.WW.ScadaBridge.IntegrationTests;
|
|
|
|
/// <summary>
|
|
/// WP-22: Readiness gating — /health/ready endpoint returns status code.
|
|
/// </summary>
|
|
public class ReadinessTests : IClassFixture<ScadaBridgeWebApplicationFactory>
|
|
{
|
|
private readonly ScadaBridgeWebApplicationFactory _factory;
|
|
|
|
public ReadinessTests(ScadaBridgeWebApplicationFactory factory)
|
|
{
|
|
_factory = factory;
|
|
}
|
|
|
|
[Fact]
|
|
public async Task HealthReady_ReturnsSuccessStatusCode()
|
|
{
|
|
using var client = _factory.CreateClient();
|
|
|
|
var response = await client.GetAsync("/health/ready");
|
|
|
|
// The endpoint should exist and return 200 OK (or 503 if not ready yet).
|
|
// For now, just verify the endpoint exists and returns a valid HTTP response.
|
|
Assert.True(
|
|
response.StatusCode == HttpStatusCode.OK || response.StatusCode == HttpStatusCode.ServiceUnavailable,
|
|
$"Expected 200 or 503 but got {response.StatusCode}");
|
|
}
|
|
}
|