hermes-agent/tests/docker
Ben 02c933aedc test(docker): fix svstat 'want up' assertion in profile-gateway lifecycle test
After the supervise-perms fix lands, the s6 lifecycle actually works
for the hermes user — hermes -p <profile> gateway start now genuinely
brings the supervised gateway up rather than silently no-op'ing on
EACCES. That exposes a latent bug in this test's assertion: it
expected 'want up' to appear literally in s6-svstat output, but
s6-svstat elides redundancies — when the slot is currently up AND
s6 wants it up, the output is just 'up (pid N pgid N) X seconds';
the explicit 'want up' token only appears when current ≠ wanted
(e.g. 'down (exitcode 1) … , want up' on a crash-loop).

Add a small helper _svstat_wants_up() that reads the want-state
correctly across both spellings:
  * 'up …'                       → wanted up (unless explicit 'want down')
  * 'down …, want up'            → wanted up explicitly
  * 'down …'                     → wanted down

Both stop and start assertions now use the helper. Also rewords
the module docstring to acknowledge that the supervised process
may succeed OR crash-loop depending on environment, but the want-
state contract holds either way.
2026-05-25 11:21:47 +10:00
..
__init__.py test(docker): add conftest fixtures for docker harness 2026-05-22 11:46:52 +10:00
conftest.py fix(service_manager): s6 detection works for unprivileged hermes user 2026-05-23 14:56:39 +10:00
test_container_restart.py test(docker): poll for boot-log signal instead of fixed sleeps 2026-05-23 16:21:00 +10:00
test_dashboard.py fix(docker): dashboard slot stays 'down' when HERMES_DASHBOARD unset 2026-05-23 15:24:17 +10:00
test_main_invocation.py test(docker): lock baseline behavior for Phase 0 harness 2026-05-22 11:46:52 +10:00
test_profile_gateway.py test(docker): fix svstat 'want up' assertion in profile-gateway lifecycle test 2026-05-25 11:21:47 +10:00
test_s6_profile_gateway_integration.py fix(service_manager): rip out dead port parameter 2026-05-23 15:30:15 +10:00
test_tui_passthrough.py test(docker): lock baseline behavior for Phase 0 harness 2026-05-22 11:46:52 +10:00
test_zombie_reaping.py fix(service_manager): s6 detection works for unprivileged hermes user 2026-05-23 14:56:39 +10:00