fix(tests): point DB-test fixture defaults at the migrated SQL host
Four DB-backed test fixtures still defaulted DefaultServer to localhost,14330 — missed in the 2026-04-28 Docker migration that moved SQL Server off this VM onto the shared host 10.100.0.35. With no SQL on localhost, all 31 DB-backed tests failed with connection timeouts, which in turn failed the Phase 6 compliance gate (phase-6-all.ps1). Updated SchemaComplianceFixture, HostStatusPublisherTests, FleetStatusPollerTests, and AdminServicesIntegrationTests to default to 10.100.0.35,14330 (still overridable via OTOPCUA_CONFIG_TEST_SERVER). Verified: Configuration.Tests 91 pass, HostStatusPublisher 4 pass, FleetStatusPoller + AdminServicesIntegration 5 pass — all 31 green. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,11 +9,11 @@ namespace ZB.MOM.WW.OtOpcUa.Configuration.Tests;
|
||||
/// Spins up a dedicated test database, applies the EF migrations against it, and exposes a
|
||||
/// <see cref="SqlConnection"/> factory. Disposed at collection teardown (drops the DB).
|
||||
/// Gated by the <c>OTOPCUA_CONFIG_TEST_SERVER</c> env var so CI runs can opt in explicitly;
|
||||
/// local runs default to the dev container on <c>localhost:14330</c>.
|
||||
/// local runs default to the shared Docker host's SQL Server on <c>10.100.0.35:14330</c>.
|
||||
/// </summary>
|
||||
public sealed class SchemaComplianceFixture : IDisposable
|
||||
{
|
||||
private const string DefaultServer = "localhost,14330";
|
||||
private const string DefaultServer = "10.100.0.35,14330";
|
||||
private const string DefaultSaPassword = "OtOpcUaDev_2026!";
|
||||
|
||||
public string DatabaseName { get; }
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace ZB.MOM.WW.OtOpcUa.Admin.Tests;
|
||||
[Trait("Category", "Integration")]
|
||||
public sealed class AdminServicesIntegrationTests : IDisposable
|
||||
{
|
||||
private const string DefaultServer = "localhost,14330";
|
||||
private const string DefaultServer = "10.100.0.35,14330";
|
||||
private const string DefaultSaPassword = "OtOpcUaDev_2026!";
|
||||
|
||||
private readonly string _databaseName = $"OtOpcUaAdminTest_{Guid.NewGuid():N}";
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace ZB.MOM.WW.OtOpcUa.Admin.Tests;
|
||||
[Trait("Category", "Integration")]
|
||||
public sealed class FleetStatusPollerTests : IDisposable
|
||||
{
|
||||
private const string DefaultServer = "localhost,14330";
|
||||
private const string DefaultServer = "10.100.0.35,14330";
|
||||
private const string DefaultSaPassword = "OtOpcUaDev_2026!";
|
||||
|
||||
private readonly string _databaseName = $"OtOpcUaPollerTest_{Guid.NewGuid():N}";
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace ZB.MOM.WW.OtOpcUa.Server.Tests;
|
||||
[Trait("Category", "Integration")]
|
||||
public sealed class HostStatusPublisherTests : IDisposable
|
||||
{
|
||||
private const string DefaultServer = "localhost,14330";
|
||||
private const string DefaultServer = "10.100.0.35,14330";
|
||||
private const string DefaultSaPassword = "OtOpcUaDev_2026!";
|
||||
|
||||
private readonly string _databaseName = $"OtOpcUaPublisher_{Guid.NewGuid():N}";
|
||||
|
||||
Reference in New Issue
Block a user