df340b8bba
None of these were fixture absence. Each is a guard that went quietly wrong and then reported the wrong thing. PrimaryGateFailoverTests — per-cluster mesh Phase 6 (a2c5d57f) moved RedundancyStateActor out of WithOtOpcUaControlPlaneSingletons into its own cluster-role-scoped registration, made from Program.cs's DRIVER branch. The harness models a fused admin,driver node but was never updated, so from that commit onward NO node it built spawned the singleton: nothing published redundancy-state, both nodes sat at "role unknown" forever, and the test polled 45s and timed out. The test's own summary calls this its negative control for a broken redundancy-topic subscribe — it fired correctly, at the harness rather than at production. Second time this shape has bitten the harness; the AddOtOpcUaRuntime note a few lines up records the first. DriverProbeRegistrationTests — the expected driver set was a hand-written array kept in sync by comment, and it drifted when Sql (9b5a9687) and Mqtt (f79d13e2) shipped. It failed as "12 where 10 expected", which names neither driver and reads as if the probes were wrong. It also could not catch the direction that matters: a driver type registered with no probe passed silently, because a hand-written list only grows when someone remembers, and this test exists for the case where nobody did. Now derived from DriverTypeNames.All, both directions, plus an explicit case-drift test for the two types whose AdminUI key differs in case from the constant (TwinCat/TwinCAT, Focas/FOCAS) — which the derived tests cannot cover, since they compare the constants to themselves. DriverProbeHandshakeE2eTests.AbCip_Green_AgainstSim — the probe config still used the retired v2 `Tags: [{DeviceHostAddress, TagPath}]` shape, so AbCipDriverOptions.RawTags bound empty, the probe fell through to its @raw_cpu_type system-tag fallback, and ab_server answered ErrorBadParam. The test has therefore spent the whole v3 migration exercising the one path its own comment says it does not exercise. Rewritten to the v3 RawTags shape, and the assertion tightened from ShouldContain("CIP session OK") to an exact match: the probe's two green messages both contain that substring, so the loose form would go green again the moment the config merely reached the controller, whether or not the authored tag resolved. Falsified each: drop the MTConnect probe (2 red, by name), remove the harness singleton registration (back to the 48s "role unknown" timeout), break the RawTags key (back to ErrorBadParam). Host.IntegrationTests 211 passed / 4 skipped / 0 failed, against live fixtures on 10.100.0.35. Still red and NOT addressed here: the AbLegacy integration suite (4 tests). Its fixture is genuinely down, but it hard-fails instead of skipping because the AbCip ControlLogix container holds :44818 — the reachability guard cannot tell "my ab_server" from "someone else's", so SkipReason stays null and SLC500-mode PCCC runs against a ControlLogix. Needs either distinct fixture ports or a family-aware guard; both are shared-infrastructure changes. Claude-Session: https://claude.ai/code/session_015p7wGqy3YpZNCpDzTpGMKo
ZB.MOM.WW.OtOpcUa.Host.IntegrationTests
Two-node Akka cluster integration tests on top of TwoNodeClusterHarness.
Default mode (no infra required)
dotnet test tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests
Uses Microsoft.EntityFrameworkCore.InMemory for ConfigDb and a stub ILdapAuthService that
accepts any username when the password is valid-password. Each harness instance creates a
unique in-memory database scoped to its lifetime. This is the mode CI runs by default.
Real-infra mode (SQL Server + OpenLDAP)
When you need to exercise EF behaviors that diverge between providers (index uniqueness,
RowVersion concurrency, JSON columns, migration application) or a real LDAP bind, bring up
the bundled compose stack and set the env-var switches:
docker compose -f tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests/docker-compose.yml up -d
export OTOPCUA_HARNESS_USE_SQL=1
export OTOPCUA_HARNESS_USE_LDAP=1
dotnet test tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests
docker compose -f tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests/docker-compose.yml down -v
SQL Server mode (OTOPCUA_HARNESS_USE_SQL=1)
- Container:
mcr.microsoft.com/mssql/server:2022-latestonlocalhost:14331 - Each
TwoNodeClusterHarness.StartAsync()creates a unique databaseOtOpcUa_Harness_{guid}viaDatabase.EnsureCreatedAsync()and drops it onDisposeAsync()(best-effort). - Port
14331chosen to avoid colliding with thedocker-dev/fleet (which uses14330).
LDAP mode (OTOPCUA_HARNESS_USE_LDAP=1)
- Container:
bitnami/openldap:2.6onlocalhost:3894 - Users
alice/alice123andbob/bob123, all underou=FleetAdmin. - Port
3894chosen to avoid colliding with thedocker-dev/fleet (which uses3893).
Local-dev caveat
This dev VM (DESKTOP-6JL3KKO) does not run Docker locally. Real-infra mode runs on the
shared Linux Docker host (10.100.0.35) per docs/v2/dev-environment.md, or in CI on Linux.