Files
slocker-lite/tests
ceamac 73b9c58b8b Add a full -u/-d integration test against test-compose/compose.yaml
tests/integration/test_compose_orchestrator.cpp ([integration][root][net])
exercises the real, checked-in test-compose/compose.yaml skeleton end to
end: creates test-preexisting-net if needed, -u, confirms both services'
environment/env_file values via their own log files, confirms the server's
port-forward actually relays the worker's reply over a real TCP
connection, -d, confirms managed networks were torn down while the
external network and the managed volume both survived, then deletes the
volume too so a later run can exercise its creation again.

Deliberately doesn't use ScratchXdgDirs (unlike every other [root][net]
test in this suite): test-preexisting-net is external: true, meaning it's
the user's own responsibility to set up once and keep reusing, matching
real Compose's own convention for that field. A daemonized service's own
dispatch_command() call can return before the sandboxed script has
produced any output, so log-content and port-forward checks poll rather
than asserting immediately; the port-forward check connects via the
host's own real global IPv4 (discovered via `ip`, not hardcoded) instead
of 127.0.0.1, since loopback never reaches the container regardless of
whether forwarding itself works (a documented NAT-hairpinning limitation).

Verified end to end on this dev machine (root, via the scoped doas rule),
twice in a row: 27 assertions passed both times, and
--list-containers/--list-networks/--list-volumes/ps all confirmed clean
afterward.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gv3s5jckJKzh6JkMoi2Akz
2026-09-07 12:36:49 +00:00
..