feat(LinuxTentacleE2E): Phase 12.M.L.B.4 — full operator workflow E2E (register + service start)
Summary
THE confidence-anchor test for the user's original goal: "from install to register to service-lifecycle to upgrade — all confident". This test composes:
-
C1.h-style register against
StubSquidServer(config persisted withTentacle:Registered=trueso subsequentrunskips re-registration) - B1.h-style service install (writes systemd unit, enables, starts)
-
NEW: poll
systemctl is-activeuntil "active" — proves the agent'sruncommand actually starts up + reads config + binds the listening port
What this test catches that prior tests don't
| Catches | Why prior tests miss this |
|---|---|
Config persisted by register is READABLE by run
|
Register tests verify file exists; don't verify run can parse it |
Tentacle:Registered=true persists correctly |
Without it, run would try to re-register against a now-gone stub |
| Cert file generated by register is readable by service-started process | Cert ownership handover must permit service user to read |
| Listening port bind succeeds end-to-end through systemd | Service install tests don't actually wait for the agent to start |
Type=simple correctly tracks agent state |
Unit-content tests check the directive is present; this proves it works |
Test mechanism
- Stub server for register
- Pre-create
/etc/squid-tentacle/(per J.M.L.C.1.2 fix) - Register with
--listening-port 51933(high port, defensive vs collisions on the GHA runner; default10933is unlikely-but-possible to be in use) - Service install + 15s
is-activepoll loop -
Diagnostic dump on timeout:
systemctl status+journalctl -n 30so failure tells operator WHY agent didn't reach active
Why ship-blocking
Without this pin, prior tests cover the operator workflow's pieces but never the END-TO-END chain. Operator deploying a fresh host could see all individual commands succeed but the service itself fails to come up — and we wouldn't catch it.
Fidelity tier
Test class is in LinuxTentacleHostStateCollection (serializes against upgrade + install + service-fixture + binary-smoke + service-command + register tests).
Expected runtime: ~10-15s.
Test plan
-
Linux E2E workflow runs (manual workflow_dispatchafter merge) -
B3h_FullWorkflow_RegisterAndServiceStart_ReachesActiveStatepasses within ~20s -
No regression on existing 36 Linux E2E tests -
Diagnostic dump (status + journalctl) only triggers on actual failure