mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-25 21:20:00 +00:00
Align update-help assertions with integrated ownership safeguards
Correct the PI wording assertion after preserving newer canonical help in the merge. Require command-free LXC/systemd entries, linked ownership and installed-path checks, private Pro protection and retained chart/software guidance rather than restoring an older copied command. Contract-Neutral: Integration-only documentation assertion alignment; update behaviour, routes and trust boundaries are unchanged. Change-source: pulse-maintainer
This commit is contained in:
@@ -1707,35 +1707,44 @@ class ReleasePromotionPolicyTest(unittest.TestCase):
|
||||
systemd_updates = normalize_ws(
|
||||
automatic_updates.split("### Systemd Service (Manual)", 1)[1].split("\n### ", 1)[0]
|
||||
)
|
||||
chart_help = normalize_ws(
|
||||
automatic_updates.split("### A helper selects a Helm-chart release", 1)[1]
|
||||
.split("\n### ", 1)[0]
|
||||
)
|
||||
manual_update = normalize_ws(
|
||||
read("docs/INSTALL.md").split("#### Manual Update", 1)[1].split("\n#### ", 1)[0]
|
||||
)
|
||||
release_guide = normalize_ws(
|
||||
read("docs/RELEASE_PROCESS.md").split("## Software releases and Helm charts", 1)[1]
|
||||
.split("\n## ", 1)[0]
|
||||
)
|
||||
|
||||
# The copied command must have its ownership condition before it, not
|
||||
# an unconditional command followed by an assumed installer origin.
|
||||
command_position = lxc_updates.index("sudo /bin/update")
|
||||
self.assertIn(
|
||||
"only if `/bin/update` was installed by the Pulse server installer",
|
||||
lxc_updates[:command_position],
|
||||
)
|
||||
self.assertIn("that updater can ignore `--version`", lxc_updates)
|
||||
self.assertIn("the helper is absent or its owner is unknown", lxc_updates)
|
||||
self.assertIn("[signed server-installer flow](INSTALL.md#2-bare-metal--systemd)", lxc_updates)
|
||||
self.assertIn("`PULSE_VERSION` set to the exact software tag", lxc_updates)
|
||||
self.assertIn("[backup and update precautions](INSTALL.md#manual-update)", lxc_updates)
|
||||
self.assertIn("check the running version and service health", lxc_updates)
|
||||
self.assertIn("do not repeat the failed helper or reinstall just to reproduce it", lxc_updates)
|
||||
self.assertIn("[helper ownership check and signed update route](#proxmoxve-lxc-manual)", systemd_updates)
|
||||
self.assertNotIn("sudo /bin/update", systemd_updates)
|
||||
# Newer canonical help delegates to the ownership-checked procedure
|
||||
# instead of copying a command into either host entry point. Keep that
|
||||
# stronger boundary, including custom paths and private Pro installs.
|
||||
for entry in (lxc_updates, systemd_updates):
|
||||
self.assertIn("](INSTALL.md#-updates)", entry)
|
||||
self.assertNotIn("sudo /bin/update", entry)
|
||||
self.assertIn("inside the existing Pulse LXC", lxc_updates)
|
||||
self.assertIn("community-scripts installation", lxc_updates)
|
||||
self.assertIn("helper whose owner is unknown", systemd_updates)
|
||||
self.assertIn("default installation paths", systemd_updates)
|
||||
self.assertIn("helper is absent or its owner is unknown", manual_update)
|
||||
self.assertIn("stop before executing it", manual_update)
|
||||
self.assertIn("existing service and data/config paths", manual_update)
|
||||
self.assertIn("private Pro runtime with a public build", manual_update)
|
||||
self.assertIn("unknown helper may ignore `--version`", chart_help)
|
||||
self.assertIn("exact `PULSE_VERSION`", chart_help)
|
||||
self.assertIn("check the running version and service health", chart_help)
|
||||
self.assertIn("Private Pro installations must retain their private runtime", chart_help)
|
||||
self.assertIn("Do not recreate the LXC", chart_help)
|
||||
|
||||
self.assertIn("`helm-chart-*`", lxc_updates)
|
||||
self.assertIn("not a Pulse server archive", lxc_updates)
|
||||
self.assertIn("not the first entry in the releases list", lxc_updates)
|
||||
self.assertIn("`helm-chart-*`", chart_help)
|
||||
self.assertIn("not the Linux server archive", chart_help)
|
||||
self.assertIn("List order does not establish the latest software release", release_guide)
|
||||
self.assertIn("cannot update a systemd or Proxmox LXC server", release_guide)
|
||||
self.assertIn("disabling signature verification", release_guide)
|
||||
self.assertIn("Settings → System → Updates", lxc_updates)
|
||||
self.assertIn("Settings → System → Updates", release_guide)
|
||||
|
||||
def test_upgrade_guide_points_at_current_rc_support_pack(self) -> None:
|
||||
upgrade_guide = read("docs/UPGRADE_v6.md")
|
||||
|
||||
Reference in New Issue
Block a user