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.

Keep frontend safety proofs compatible with typed guest errors

pulse-triage[bot]9633790004bb
diff --git a/frontend-modern/src/utils/__tests__/agentInstallCommand.test.ts b/frontend-modern/src/utils/__tests__/agentInstallCommand.test.ts
index 34aac9350a..d1c9b53a88 100644
--- a/frontend-modern/src/utils/__tests__/agentInstallCommand.test.ts
+++ b/frontend-modern/src/utils/__tests__/agentInstallCommand.test.ts
@@ -541,7 +541,9 @@ const runPrivateUnix = (
timeout: 20000,
});
-describe('credential-free Unix lifecycle execution', () => {
+// The PTY has a 15s deadline and its caller a 20s ceiling. Let both return
+// their terminal/cleanup assertions before Vitest's enclosing budget expires.
+describe('credential-free Unix lifecycle execution', { timeout: 25_000 }, () => {
it.each(['0', '1000'])(
'keeps private input out of root/sudo argv, environment, output and history (uid=%s)',
(uid) => {
diff --git a/frontend-modern/src/utils/__tests__/backupSafetyHelp.test.ts b/frontend-modern/src/utils/__tests__/backupSafetyHelp.test.ts
index 09db0b2fbd..3d007253ce 100644
--- a/frontend-modern/src/utils/__tests__/backupSafetyHelp.test.ts
+++ b/frontend-modern/src/utils/__tests__/backupSafetyHelp.test.ts
@@ -79,12 +79,9 @@ describe('manual backup safety help', () => {
expect(link).not.toBeNull();
expect(rendered.querySelector(`#${fragment}`)).not.toBeNull();
}
- // This broad status comes from the current collector, not a reproduced
- // native failure or a new diagnosis of the guest's service state.
- const classifier = read('internal/monitoring/guest_disk_stability.go');
- expect(classifier).toMatch(
- /case strings.Contains\(errStr, "500"\):\s+return "agent-not-running"/,
- );
+ // Keep this conservative for older or retained explanations too. The
+ // current collector uses typed errors; safe help must not require the
+ // retired HTTP-500 misclassification to remain in the implementation.
});
it('ships the complete precaution and makes it reachable from troubleshooting', () => {
diff --git a/frontend-modern/src/utils/__tests__/guestObservationHelp.test.ts b/frontend-modern/src/utils/__tests__/guestObservationHelp.test.ts
index 893f096b3f..9818ef029d 100644
--- a/frontend-modern/src/utils/__tests__/guestObservationHelp.test.ts
+++ b/frontend-modern/src/utils/__tests__/guestObservationHelp.test.ts
@@ -44,9 +44,8 @@ describe('guest observation API help', () => {
expect(text()).toContain('An absent reason alone does not prove freshness');
const collector = read('internal/monitoring/guest_disk_stability.go');
expect(collector).toContain('"prev-" + diskStatusReason');
- expect(collector).toMatch(
- /case strings.Contains\(errStr, "500"\):\s+return "agent-not-running"/,
- );
+ // The warning also covers older/retained payloads. Requiring the old
+ // HTTP-500 classifier here would forbid Core's typed-error safety repair.
});
it('renders selected-source memory states without renewing old or missing observations', () => {