New project tests/ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.IntegrationTests/ with four pieces. AbLegacyServerFixture — TCP probe against localhost:44818 (or AB_LEGACY_ENDPOINT override), distinct from AB_SERVER_ENDPOINT so both CIP + PCCC containers can run simultaneously. Single-public-ctor to satisfy xunit collection-fixture constraint. AbLegacyServerProfile + KnownProfiles carry the per-family (SLC500 / MicroLogix / PLC-5) ComposeProfile + Notes; drives per-theory parameterisation. AbLegacyFactAttribute / AbLegacyTheoryAttribute match the AB CIP skip-attribute pattern. Docker/docker-compose.yml reuses the AB CIP otopcua-ab-server:libplctag-release image — `build:` block points at ../../AbCip.IntegrationTests/Docker context so `docker compose build` from here produces / reuses the same multi-stage build. Three compose profiles (slc500 / micrologix / plc5) with per-family `--plc` + `--tag=<file>[<size>]` flags matching the PCCC tag syntax (different from CIP's `Name:Type[size]`). AbLegacyReadSmokeTests — one parametric theory reading N7:0 across all three families + one SLC500 write-then-read on N7:5. Targets the shape the driver would use against real hardware. Verified 2026-04-20 against a live SLC500 container: TCP probe passes + container accepts connections + libplctag negotiates session, but read/write returns BadCommunicationError (libplctag status 0x80050000). Root-caused to ab_server's PCCC server-side opcode coverage being narrower than libplctag's PCCC client expects — not a driver-side bug, not a scaffold bug, just an ab_server upstream limitation. Documented honestly in Docker/README.md + AbLegacy-Test-Fixture.md rather than skipping the tests or weakening assertions; tests now skip cleanly when container is absent, fail with clear message when container is up but the protocol gap surfaces. Operator resolves by filing an ab_server upstream patch, pointing AB_LEGACY_ENDPOINT at real hardware, or scaffolding an RSEmulate 500 golden-box tier. Docker/README.md — Known limitations section leads with the PCCC round-trip gap (test date, failure signature, possible root causes, three resolution paths) before the pre-existing limitations (T/C file decomposition, ST file quirks, indirect addressing, DF1 serial). Reader can't miss the "scaffolded but blocked on upstream" framing. docs/drivers/AbLegacy-Test-Fixture.md — TL;DR flipped from "no integration fixture" to "Docker scaffold in place; wire-level round-trip currently blocked by ab_server PCCC gap". What-the-fixture-is gains an Integration section. Follow-up candidates rewritten: #1 is now "fix ab_server PCCC upstream", #2 is RSEmulate 500 golden-box (with cost callouts matching our existing Logix Emulate + TwinCAT XAR scaffolds — license + Hyper-V conflict + binary project format), #3 is lab rig. Key-files list adds the four new files. docs/drivers/README.md coverage-map row updated from "no integration fixture" to "Docker scaffold via ab_server PCCC; wire-level round-trip currently blocked, docs call out resolution paths". Solution file picks up the new tests/.../AbLegacy.IntegrationTests entry. AbLegacyDataType.Int used throughout (not Int16 — the enum uses SLC file-type naming). Build 0 errors; 2 smoke tests skip cleanly without container + fail with clear errors when container up (proving the infrastructure works end-to-end + the gap is specifically the ab_server protocol coverage, not the scaffold). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
75 lines
2.1 KiB
YAML
75 lines
2.1 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. All bind :44818 on the host; run one at a
|
|
# time. PCCC tag format differs from CIP: `<file>[<size>]` without a
|
|
# type suffix since the type is implicit in the file letter (N = INT,
|
|
# F = REAL, B = bit-packed, L = DINT).
|
|
#
|
|
# Usage:
|
|
# docker compose --profile slc500 up
|
|
# docker compose --profile micrologix up
|
|
# docker compose --profile plc5 up
|
|
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:
|
|
- "44818: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:
|
|
- "44818: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:
|
|
- "44818:44818"
|
|
command: [
|
|
"ab_server",
|
|
"--plc=PLC/5",
|
|
"--port=44818",
|
|
"--tag=N7[10]",
|
|
"--tag=F8[10]",
|
|
"--tag=B3[10]"
|
|
]
|