left4me/l4d2host/tests
mwiegand 56f5c30296
refactor(l4d2-host): unit's ExecStartPre is the sole code path to the mount
Before this change there were two callers of left4me-overlay mount:
the web app's start_instance (Python, in-process) and the unit's
ExecStartPre (shell, via sudo). The duplication invited divergence; the
helper's recently-added idempotency made both paths technically work
but at the cost of a "first wins" race and dead-code retry logic in
start_instance.

Drop the in-process _mounter.mount() call from start_instance. The web
app now only stages cfg files (which still must happen on the host
filesystem before mount, to avoid overlayfs copy-up changing ownership),
then asks systemd to enable+start the unit; the unit's ExecStartPre
does the mount.

Removed:
- os.path.ismount(merged) refusal in start_instance and its test
  (test_start_refuses_to_double_mount). The race the check guarded
  against is now handled by the helper's idempotency.
- _load_instance_env helper and the `os` import (both became dead).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 12:54:05 +02:00
..
test_cli.py feat(deploy): add production-like test deployment 2026-05-06 19:30:10 +02:00
test_initialize.py feat(l4d2-web): per-overlay server.cfg aliases — expose checkbox + auto-exec 2026-05-09 01:26:31 +02:00
test_install.py fix(host): create ~/.steam/sdk32 and sdk64 symlinks during install 2026-05-07 02:11:27 +02:00
test_kernel_overlayfs.py feat(l4d2-host): KernelOverlayFSMounter + left4me-overlay helper 2026-05-08 12:23:58 +02:00
test_lifecycle.py refactor(l4d2-host): unit's ExecStartPre is the sole code path to the mount 2026-05-09 12:54:05 +02:00
test_logging.py feat(host): add step logging to steam_install 2026-05-06 20:41:39 +02:00
test_logs.py feat(deploy): add production-like test deployment 2026-05-06 19:30:10 +02:00
test_overlay_helper.py feat(l4d2-host): KernelOverlayFSMounter + left4me-overlay helper 2026-05-08 12:23:58 +02:00
test_paths.py security: harden boundary inputs and production defaults 2026-05-07 00:53:33 +02:00
test_process.py fix(host): enforce flush=True to prevent pipeline block buffering 2026-05-06 20:34:41 +02:00
test_service_control.py feat(l4d2-host): server lifecycle uses systemctl enable --now / disable --now 2026-05-09 12:28:44 +02:00
test_spec.py feat(l4d2-web): per-overlay server.cfg aliases — expose checkbox + auto-exec 2026-05-09 01:26:31 +02:00
test_status.py feat(deploy): add production-like test deployment 2026-05-06 19:30:10 +02:00