Add Linux versioned-upgrade E2E (blue-green happy + rollback)
Summary
Real-systemd E2E coverage for the blue-green (versioned-layout) upgrade path shipped in #403 — the rigorous runtime proof that the failure-isolation guarantee holds, not just the unit/drift assertions.
-
LinuxServiceFixture.InstallVersionedAndStart— stages a v1 service in the versioned layout (versions/<v1>/Squid.Tentacle+currentsymlink, unit ExecStart through the pointer, noINSTALL_DIRenv so the service auto-resolves to its own version dir). Additive — the flatInstallAndStartis untouched. - Test service
versionsubcommand resolvesversion.txtrelative to its own directory (like a real binary reporting its embedded version) instead of via theINSTALL_DIRenv var. Backward-compatible for flat installs (own dir == install dir); the flat lifecycle tests never invokeversionthrough a name symlink, so they are unaffected. - Two tests:
-
Happy path —
currentrepoints v1→v2,versions/<v1>is byte-for-byte unchanged (SHA256 captured before/after), v2 per-version marker written, service active. -
Health-fail rollback — exit 4 /
ROLLED_BACK,currentrepointed back to v1, v1 byte-for-byte unchanged, service running v1 again.
-
Happy path —
Test plan
-
bash -non the modified test service script. -
Linux E2E project compiles clean (new test class + fixture method). -
CI Linux runner executes the two UpgradeLifecycle-category E2E tests (real systemd + scope + restart + /healthz + symlink repoint). Local mac skips them (LinuxLifecycleContext.IsAvailableis false without systemd).
Notes
- Non-breaking: purely test-infrastructure + a new test class. No production code changes.
- Follow-ups (separate): Windows versioned-upgrade E2E (needs a version-reporting test shim), same-version re-upgrade edge cleanup, version GC (P4).