feat(LinuxTentacleE2E): Phase 12.M.L.A.2 — install-tentacle.sh happy path E2E
Summary
Mirrors the production operator one-liner:
curl -fsSL .../install-tentacle.sh | sudo bash -s -- --version 1.6.0
→ binary lands at INSTALL_DIR, symlink chain on PATH, post-install dirs (config, state, workspace) created, "Verified: squid-tentacle executable" printed.
Why critical
Install is THE prerequisite for every downstream operation. Regression here breaks every new agent provision and re-install. Until this test, zero Linux E2E coverage on the install happy path.
Test mechanism
- Build a single-entry tar.gz with a placeholder
Squid.Tentaclebinary (the test service script, which now handleshelp+versionsubcommands and would block on systemd start otherwise) - Stage on
LocalReleaseMirror - Run
install-tentacle.shviasudo bashwith--version(matches operator one-liner shape exactly) - Assert exit 0 + binary file + symlink chain (INSTALL_DIR/squid-tentacle + /usr/local/bin/squid-tentacle) + post-install dirs + verification message
Why placeholder binary needs to handle help
install-tentacle.sh line 510-516 verification runs squid-tentacle help. Without a help fast-path, the placeholder's main loop is sleep-forever and the install .sh would hang.
Added help fast-path to squid-linux-test-service.sh mirroring the existing version fast-path pattern.
Assertions
| Assertion | What it pins |
|---|---|
exitCode == 0 |
Whole installation chain succeeded |
stdout contains "Installation Complete"
|
Operator-visible banner |
stdout contains "Verified: squid-tentacle executable"
|
help subcommand round-tripped through the entire symlink chain |
INSTALL_DIR/Squid.Tentacle exists |
Tar extraction worked |
INSTALL_DIR/squid-tentacle symlink exists |
Well-known-name layer |
/usr/local/bin/squid-tentacle symlink exists |
PATH layer |
/etc/squid-tentacle exists |
CONFIG_DIR for register/run |
/var/lib/squid-tentacle exists |
STATE_DIR for upgrade flow |
Recommended overrides (set by fixture)
-
INSTALL_DIR=test-private(avoids /opt collision) -
DOWNLOAD_BASE=mirror(offline + deterministic) -
NO_PKG_INSTALL=1(skip APT/RPM probe) -
CREATE_USER=no(skip useradd; sudoers block also skipped because SERVICE_USER doesn't exist) -
SQUID_BASE_URL=http://localhost:1(defensive — APT repo persistence block's curl fails fast)
Infrastructure additions
LinuxInstallScriptContext:
-
BuildInstallTarGz(version)— single-entry tar.gz with placeholder binary -
TestServiceScriptproperty + locator - Hand-rolled tar+gzip helpers (mirror LinuxLifecycleContext's pattern)
Fidelity tier
.sh + real bash + real curl + real LocalReleaseMirror serving real tar.gz + real sudo orchestration. No mocks at OS-resource layer.
Test class is in LinuxTentacleHostStateCollection so it serializes against upgrade-lifecycle + service-fixture tests (avoids shared-host-state races; pinned in J.M.L.A.1).
Expected runtime: ~10-15s.
Test plan
-
Linux E2E workflow runs (manual workflow_dispatchafter merge) -
A1h_HappyPath_InstallsBinaryAndCreatesSymlinkChainpasses within ~20s -
No regression on existing 21 Linux E2E tests