Skip to content

Add Windows versioned-upgrade E2E (blue-green happy + rollback)

Summary

Windows real-SCM E2E parity with the Linux versioned-upgrade coverage (#404) — proves the blue-green guarantee on Windows: the running version's directory is never touched; rollback is a current junction flip back to it.

  • WindowsServiceFixture.InstallVersionedAndStart — stages a v1 service in the versioned layout (copy tree → versions\<v1>, mklink /J current → versions\<v1>, sc create binPath through the junction). Additive — the flat InstallAndStart is untouched.
  • Four tests on the existing UpgradeLifecycleContext:
    • happy: current junction repoints v1→v2, versions\<v1> exe SHA256 byte-unchanged, v2 per-version marker, status SUCCESS.
    • crashOnStart rollback: exit 8 / ROLLED_BACK, current repointed back to v1, v1 byte-unchanged, broken v2 preserved at versions\<v2> for post-mortem, service running v1 again.
    • multi-upgrade v1→v2→v3: all three version dirs coexist (no GC yet), current→v3, v1 & v2 exes byte-unchanged.
    • flat-install guard: flat InstallAndStart creates no versions\ / current (non-breaking — versioned layout is opt-in).

Test plan

  • Windows E2E project compiles on mac (additions: fixture method + 4 tests + helpers).
  • Real Windows runner via workflow_dispatch on tentacle-windows-e2e.yml (Category=TentacleUpgradeLifecycleE2E) — dispatched on this branch.

Notes

  • Non-breaking: pure test-infrastructure + 4 new tests; no production code. The Windows TestService is already self-relative (reads version.txt next to its exe), so per-version semantics work with no service change.

Merge request reports

Loading