test(ab): default AB matrices to one profile when unset; PLC-5/status-bit refusal fixture tests (#594, #593)

Claude-Session: https://claude.ai/code/session_01Ef2ozxS7QPanGT8uoATbTe
This commit is contained in:
Joseph Doherty
2026-10-08 06:45:51 -04:00
parent 3baa332d6b
commit b37e9613f7
3 changed files with 121 additions and 4 deletions
@@ -7,7 +7,10 @@ namespace ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.IntegrationTests;
/// <remarks>
/// Preserves the <c>AB_LEGACY_COMPOSE_PROFILE</c> filter the smoke theory always applied: when set,
/// <see cref="KnownProfiles.All"/> is narrowed to that profile <b>before</b> it is crossed with the
/// transports, so the rows match the running container.
/// transports, so the rows match the running container. Unset, every family is crossed because each
/// has its own port and skips itself when unreachable — <b>unless</b> <c>AB_LEGACY_ENDPOINT</c> pins
/// one device, in which case the family is a property of that device and cannot be detected, so only
/// the default SLC500 profile is crossed (set <c>AB_LEGACY_COMPOSE_PROFILE</c> to pick another).
/// </remarks>
public static class TransportMatrix
{
@@ -21,6 +24,9 @@ public static class TransportMatrix
get
{
var only = Environment.GetEnvironmentVariable("AB_LEGACY_COMPOSE_PROFILE");
if (string.IsNullOrEmpty(only) &&
Environment.GetEnvironmentVariable("AB_LEGACY_ENDPOINT") is { Length: > 0 })
only = KnownProfiles.Slc500.ComposeProfile;
return from p in KnownProfiles.All
where string.IsNullOrEmpty(only) ||
string.Equals(p.ComposeProfile, only, StringComparison.OrdinalIgnoreCase)