Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Align batch fixtures with shared clocks and owned scratch admission

pulse-triage[bot]1b12d5680892
diff --git a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
index 95d7e08e7d..6828c0c5a6 100644
--- a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
+++ b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
@@ -1578,8 +1578,9 @@ describe('settings architecture guardrails', () => {
// comparison (#1601). The copy stays in the presentation owner, never
// inline in the panel shell.
expect(updatesSettingsPanelSource).toContain(
- 'getUpdateCheckedLabel(updateStore.lastCheckedAt())',
+ 'getUpdateCheckedLabel(updateStore.lastCheckedAt(), now())',
);
+ expect(updatesSettingsPanelSource).toContain('const now = useRelativeTimeNow()');
expect(updatesSettingsPanelSource).toContain('!props.versionInfo()?.isSourceBuild');
expect(updatesPresentationSource).toContain("return 'Not checked yet'");
expect(updatesPresentationSource).toContain('`Checked ${relative}`');
diff --git a/frontend-modern/src/features/docs/__tests__/truenasErrorGuide.test.ts b/frontend-modern/src/features/docs/__tests__/truenasErrorGuide.test.ts
index 84734c07be..22258c6d38 100644
--- a/frontend-modern/src/features/docs/__tests__/truenasErrorGuide.test.ts
+++ b/frontend-modern/src/features/docs/__tests__/truenasErrorGuide.test.ts
@@ -107,7 +107,9 @@ describe('shipped TrueNAS error diagnosis', () => {
const commands = [...target.querySelectorAll('pre code')].map((node) => node.textContent!);
expect(commands).toHaveLength(2);
for (const command of commands) {
- expect(command).toContain('--signal=TERM --kill-after=1s 8s');
+ expect(command).toContain('--signal=KILL 8s');
+ expect(command).toContain('head -c 262145');
+ expect(command).toContain('excerpt exceeds 256 KiB');
expect(command).toContain('no partial excerpt shown');
expect(command).toContain('no unbounded fallback');
expect(command).not.toMatch(/grep|--follow|restart|curl/);
@@ -124,7 +126,7 @@ describe('shipped TrueNAS error diagnosis', () => {
'no request ID is required',
'inside the Pulse container',
'not on the Proxmox host or the TrueNAS appliance',
- 'eight-second deadline and one-second termination grace',
+ 'eight-second hard deadline and a 256 KiB byte limit',
'record limit alone does not bound a hung reader',
'do not use an unbounded substitute',
'only after a successful read',
diff --git a/scripts/tests/test_auto_update_systemd.py b/scripts/tests/test_auto_update_systemd.py
index 5fad02f539..0a89b1759f 100644
--- a/scripts/tests/test_auto_update_systemd.py
+++ b/scripts/tests/test_auto_update_systemd.py
@@ -241,6 +241,9 @@ if name == "sudo":
manager = r'''#!/usr/bin/python3
import os, pathlib, sys
root = pathlib.Path(os.environ["PULSE_NATIVE_ROOT"])
+# Tool startup must have an existing owned home, not create the lab before
+# NativeLab has admitted and claimed its scratch root (as on macOS).
+if not pathlib.Path(os.environ["HOME"]).is_dir(): sys.exit(96)
unit = root / "pulse-source-updater.service"
args = sys.argv[1:]
if any(".service" in a and a != "pulse-source-updater.service" for a in args): sys.exit(97)
@@ -304,6 +307,7 @@ else: sys.exit(97)
binaries.append(binary)
lab = FixtureLab(base / "lab", ROOT, *binaries, "a" * 40)
lab.unit = lab.root / "pulse-source-updater.service"
+ lab.env["HOME"] = str(base)
lab.env["PATH"] = str(lab.root / "tools") + ":" + str(tools) + ":/usr/sbin:/usr/bin:/sbin:/bin"
original_write = Path.write_text
def relocate(path, data, *args, **kwargs):