Pulse/scripts/tests
rcourtman 1a42011724 Verify Pulse restarts after an interactive update; don't leave it silently stopped (#1323)
Finishes the deferred half of the v5->v6 parity fix for #1323 (the
pulse-auto-update.sh half landed in 672e81985). The interactive install.sh
update/reinstall flow stopped a running Pulse then called start_pulse, which
tolerates a silent start failure (common on unprivileged LXC) by printing a note
and returning 0 — leaving Pulse stopped under an "installation completed!" message.

- stop_pulse_for_update records whether Pulse was running before the update.
- start_pulse, only when Pulse was running before (PULSE_WAS_ACTIVE), no longer
  accepts a silent start failure: it verifies the service became active
  (wait_for_service_active, 20s), retries one explicit start, and surfaces a clear
  error + diagnostics if it still will not come up. Fresh installs are unchanged
  (the flag stays false, so the reassuring container note is kept).
- Wired into all three update/reinstall sites; added a BASH_SOURCE guard so the
  installer's functions can be unit-tested without running the installer.

Scope: fixes the #1323 'restart silently failed' case. Does NOT add a binary
rollback (download_pulse deletes bin/pulse.old right after the swap) — a
bad-release rollback is a separate concern.

Test: scripts/tests/test-install-update-resilience.sh (sources install.sh, stubs
systemctl, asserts was-active capture + retry + clear error). Go installtests +
bash -n confirm the guard does not change installer execution.
2026-06-09 15:05:08 +01:00
..
integration feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
run.sh test(scripts): run python smoke tests 2026-03-28 21:53:09 +00:00
test-cloud-public-signup-smoke.sh Add Pulse Cloud public signup smoke 2026-04-23 23:09:10 +01:00
test-common-lib.sh feat: add shared script library system and refactor docker-agent installer 2025-10-20 15:13:38 +00:00
test-hot-dev-auth.sh Stabilize script smoke checks 2026-05-28 12:55:33 +01:00
test-hot-dev-bg.sh Recover managed mock-mode restart handoffs 2026-06-01 08:33:18 +01:00
test-hot-dev-runtime.sh Make hot-dev local-only by default 2026-05-21 15:26:53 +01:00
test-install-ps1-parser.sh Tighten unified agent hardening proof 2026-04-23 23:37:25 +01:00
test-install-update-resilience.sh Verify Pulse restarts after an interactive update; don't leave it silently stopped (#1323) 2026-06-09 15:05:08 +01:00
test-pulse-auto-update.sh Verify service restart in unattended auto-update; roll back if down (#1323) 2026-06-04 09:07:24 +01:00
test-retired-trial-acquisition-docs.sh Rename retired trial acquisition proof assets 2026-04-28 18:38:10 +01:00
test-script-reference-integrity.sh Switch script-reference integrity test from rg to git grep for portable CI 2026-05-12 00:30:43 +01:00
test-toggle-mock.sh Recover managed mock-mode restart handoffs 2026-06-01 08:33:18 +01:00
test_repo_docs_link_drift.py test(repo): generalize docs drift guard 2026-03-28 22:15:12 +00:00
test_sync_chart_release_metadata.py fix(deploy): pin docs links to release refs 2026-03-28 21:32:11 +00:00
test_telemetry_adoption_report.py Report target RC telemetry signal coverage 2026-06-01 17:59:28 +01:00