Skip to content

Phase 12.L.E.7.1 — fix: load template + manual substitution (Linux runner caught bug)

Summary

Fixes the J.L.E.7 first Linux runner failure:

Failed to restart squid-tentacle.service: Unit squid-tentacle.service not found.

Root cause

My LinuxLifecycleContext.RenderProductionScriptForVersion called LinuxTentacleUpgradeStrategy.BuildScript() — which substitutes INSTALL_DIR / SERVICE_NAME / SERVICE_USER from production defaults (/opt/squid-tentacle, squid-tentacle, squid-tentacle).

For E2E tests we need fixture's GUID-suffixed paths so systemctl restart hits OUR test service unit, not the production squid-tentacle.service (which doesn't exist on the runner).

The Windows test infra solved this from day one — UpgradeLifecycleContext.RenderProductionScriptForVersion loads the .ps1 template directly and substitutes manually. I didn't carry the pattern over to Linux carefully.

Fix

LinuxLifecycleContext.RenderProductionScriptForVersion now reads upgrade-linux-tentacle.sh from disk + does all 9 placeholder Replace calls explicitly. INSTALL_DIR / SERVICE_NAME / SERVICE_USER use Fixture.InstallDir / Fixture.ServiceName / Environment.UserName.

Lesson learned (documented in commit message)

E2E test rendering never calls strategy.BuildScript directly when fixture-specific paths matter. Always load template + substitute manually. Drift detector pins placeholder set parity.

Local verification

8/8 cross-platform tests pass. Real Linux runner verification on this PR.

🤖 Generated with Claude Code

Merge request reports

Loading