Files
lmxopcua/tests/Drivers/ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.IntegrationTests/Docker/docker-compose.yml
T
Joseph Doherty b13bdc154a test(ablegacy): deploy the PCCC fixture, one port per family (#534)
The AbLegacy integration suite has never run against a simulator.
/opt/otopcua-ablegacy/ did not exist on the Docker host — the stack was written
but never deployed — and every ab_server across BOTH ab fixtures bound :44818.
So the AB CIP fixture's ControlLogix container (up for two weeks) answered this
suite's TCP reachability probe, the suite declined to skip, and it ran SLC500-mode
PCCC against a ControlLogix. Four failures that read as "fixture missing".

Two structural problems, both fixed here:

- The theory parameterises over all three PCCC families, but only one container
  could ever exist on the shared port, so at least two cases failed on every
  conceivable run. The suite was un-greenable by construction, and
  AB_LEGACY_COMPOSE_PROFILE existed to paper over it by filtering the theory
  down to whichever container happened to be up.
- A reachability probe that cannot tell one simulator from another is not a skip
  gate. It answered "is some ab_server listening", which is a different question
  from the one the caller is asking, and reported the difference as a test
  failure.

Each family now has its own host port — 44819 slc500, 44820 micrologix, 44821
plc5 — so all three run together and alongside AbCip on 44818 (ab_server still
listens on 44818 inside each container; only the host mapping differs). Skip is
per-family via SkipReasonFor(profile); the class-level gate runs if ANY family is
up so one down container cannot silently skip the other two.
AB_LEGACY_COMPOSE_PROFILE now applies only in AB_LEGACY_ENDPOINT-pinned
real-hardware mode, where the family genuinely is a property of the one device.
This finally makes true what the fixture's XML doc has claimed from the start —
that it and the AB CIP fixture can point at different containers simultaneously.

Deployed to /opt/otopcua-ablegacy/ on 10.100.0.35; all three containers running.

The 4 tests still FAIL, and are left red on purpose — see #534. Now aimed at
correct-family simulators, the PCCC exchange itself returns BadCommunicationError
for every server-path / client-cip-path permutation, reproduced outside the test
harness via the driver CLI. That is a true signal about the driver (or about
libplctag's PCCC support against ab_server) that skipping would hide. What
changed here is that the failure is now diagnostic instead of an artifact of a
port collision.

Claude-Session: https://claude.ai/code/session_015p7wGqy3YpZNCpDzTpGMKo
2026-08-01 02:18:53 -04:00

80 lines
2.6 KiB
YAML

# AB Legacy PCCC integration-test fixture — ab_server in PCCC mode.
#
# Same image as the AB CIP fixture (otopcua-ab-server:libplctag-release).
# The build context points at the AB CIP Docker folder one directory over
# so `docker compose build` from here produces the same image if it
# doesn't already exist; if it does, docker's cache reuses the layer.
#
# One service per PCCC family, each on its OWN host port — 44819 slc500,
# 44820 micrologix, 44821 plc5 — so all three run together, and alongside the
# AB CIP fixture, which owns :44818. They all bound :44818 until 2026-08-01,
# which made the suite structurally un-greenable: the theory parameterises over
# all three families, but only one container could ever exist, so at least two
# cases failed on every run. Worse, the AB CIP ControlLogix container answers
# on :44818 too, so the fixture's TCP reachability probe saw "up", declined to
# skip, and ran SLC500-mode PCCC against a ControlLogix.
#
# ab_server still listens on 44818 INSIDE the container (--port=44818); only the
# host mapping differs. Keep these in step with AbLegacyServerProfile.Port.
#
# Usage (all three at once — that is the point):
# docker compose --profile slc500 --profile micrologix --profile plc5 up -d
services:
slc500:
profiles: ["slc500"]
build:
context: ../../ZB.MOM.WW.OtOpcUa.Driver.AbCip.IntegrationTests/Docker
dockerfile: Dockerfile
image: otopcua-ab-server:libplctag-release
container_name: otopcua-ab-server-slc500
restart: "no"
ports:
- "44819:44818"
command: [
"ab_server",
"--plc=SLC500",
"--port=44818",
"--tag=N7[10]",
"--tag=F8[10]",
"--tag=B3[10]",
"--tag=L19[10]"
]
micrologix:
profiles: ["micrologix"]
image: otopcua-ab-server:libplctag-release
build:
context: ../../ZB.MOM.WW.OtOpcUa.Driver.AbCip.IntegrationTests/Docker
dockerfile: Dockerfile
container_name: otopcua-ab-server-micrologix
restart: "no"
ports:
- "44820:44818"
command: [
"ab_server",
"--plc=Micrologix",
"--port=44818",
"--tag=B3[10]",
"--tag=N7[10]",
"--tag=L19[10]"
]
plc5:
profiles: ["plc5"]
image: otopcua-ab-server:libplctag-release
build:
context: ../../ZB.MOM.WW.OtOpcUa.Driver.AbCip.IntegrationTests/Docker
dockerfile: Dockerfile
container_name: otopcua-ab-server-plc5
restart: "no"
ports:
- "44821:44818"
command: [
"ab_server",
"--plc=PLC/5",
"--port=44818",
"--tag=N7[10]",
"--tag=F8[10]",
"--tag=B3[10]"
]