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.

Bind memory guidance checks to the shared evidence formatter

pulse-triage[bot]e878a3b3f052
diff --git a/scripts/tests/test_memory_troubleshooting_docs.py b/scripts/tests/test_memory_troubleshooting_docs.py
index 430c0573a9..8657db57e5 100644
--- a/scripts/tests/test_memory_troubleshooting_docs.py
+++ b/scripts/tests/test_memory_troubleshooting_docs.py
@@ -308,8 +308,15 @@ class GuestMemoryInterpretationDocsTest(unittest.TestCase):
):
self.assertIn(distinction, guide)
patrol = (ROOT / "internal/ai/patrol_guest_memory.go").read_text()
- self.assertIn('"guest pressure unknown"', patrol)
- self.assertIn('"N/A (guest memory unavailable; not evidence of recovery)"', patrol)
+ evidence = (ROOT / "internal/unifiedresources/guest_memory.go").read_text()
+ # Patrol delegates interpretation and display to the shared selected-
+ # sample formatter. Keep the guide bound to that implementation, not
+ # the former location of its warning strings.
+ self.assertIn("unifiedresources.QualifyGuestMemory(", patrol)
+ self.assertIn("unifiedresources.GuestMemoryEvidence{", patrol)
+ self.assertIn("}).Format(r.percent)", patrol)
+ self.assertIn('"guest pressure unknown"', evidence)
+ self.assertIn('"N/A (guest memory unavailable; not evidence of recovery)"', evidence)
def test_guidance_uses_existing_evidence_without_new_guest_reads(self):
guide = self.guidance()