Pulse/scripts/installtests
rcourtman 5e78825f54
Some checks are pending
Build and Test / Secret Scan (push) Waiting to run
Build and Test / Frontend & Backend (push) Waiting to run
fix(install): make unattended auto-updates actually run after install and upgrade
Two GA-blocking bugs in the auto-update install path:

The pulse-update.service unit was rendered through an unquoted heredoc
containing $${PULSE_SERVICE_NAME}, which bash expands to the installer's
PID, so the unit shipped with ExecCondition checking a service like
"24757{PULSE_SERVICE_NAME}". The condition always failed and systemd
silently skipped every scheduled run, for fresh installs and upgrades
alike. The heredoc now renders the detected service name directly:
ExecCondition=/bin/sh -c 'systemctl is-active --quiet pulse'.

Upgrades also never refreshed the updater assets: a v5 box with
auto-updates enabled keeps pulse-update.timer and autoUpdateEnabled=true,
so the update/reinstall flows never re-ran setup_auto_updates and the
v5.1-pinned /usr/local/bin/pulse-auto-update.sh stayed in place, logging
"Already running latest version" forever instead of selecting v6
releases. The asset-install half of setup_auto_updates is now a shared
install_auto_update_assets(), and a new refresh_auto_updates() rewrites
the helper script and units unconditionally whenever the timer already
exists, without touching system.json or the timer's enabled state. All
five install flows (update, reinstall, --version, --source, fresh) are
wired.

Tests now render the real unit and execute the rendered ExecCondition
against a recording systemctl stub instead of asserting source-text
fragments, pin refresh_auto_updates behavior (stale helper replaced,
system.json and enablement untouched), and pin the call-site wiring.
The deployment-installability contract records both invariants.

Note: rewritten message only — the original local commit carried a
parallel agent's licensing commit message due to a shared-index race;
the tree is byte-identical to the hook-verified original.
2026-06-10 22:43:08 +01:00
..
backfill_release_assets_test.go Add historical release asset backfill workflow 2026-04-22 17:25:58 +01:00
build_release_assets_test.go Prepare v6.0.0 release candidate 2026-06-04 14:07:14 +01:00
docker_entrypoint_test.go Avoid tenant runtime image copy-up 2026-04-24 09:21:42 +01:00
install_docker_sh_test.go Prepare v6.0.0 stable release 2026-06-03 17:31:11 +01:00
install_ps1_test.go Prepare v6.0.0 release candidate 2026-06-04 14:07:14 +01:00
install_sh_test.go fix(install): make unattended auto-updates actually run after install and upgrade 2026-06-10 22:43:08 +01:00
provider_msp_deploy_test.go Rename CP_TRIAL_ACTIVATION_PRIVATE_KEY to CP_ENTITLEMENT_SIGNING_PRIVATE_KEY in the provider MSP bundle 2026-06-10 14:08:52 +01:00
pulse_auto_update_test.go Guard stable updater from prerelease tags 2026-04-25 23:49:27 +01:00
release_ldflags_test.go Require signed unified agent release assets 2026-04-22 02:00:29 +01:00
root_install_sh_test.go fix(install): make unattended auto-updates actually run after install and upgrade 2026-06-10 22:43:08 +01:00
uninstall_sensor_proxy_test.go Prepare v6.0.0 release candidate 2026-06-04 14:07:14 +01:00