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 RBAC guide checks across nested navigation properties

pulse-triage[bot]226ab8c8a676
diff --git a/scripts/tests/test_admin_docs.py b/scripts/tests/test_admin_docs.py
index d98ea8974b..a6820b4cf4 100644
--- a/scripts/tests/test_admin_docs.py
+++ b/scripts/tests/test_admin_docs.py
@@ -125,7 +125,10 @@ class AdminDocsTest(unittest.TestCase):
navigation = (frontend / "components/Settings/settingsNavCatalog.ts").read_text()
for panel in ("roles", "users"):
with self.subTest(panel=panel):
- entry = navigation.split(f"id: 'security-{panel}'", 1)[1].split("},", 1)[0]
+ entry = re.search(
+ rf"id: 'security-{panel}',(.*?)(?=\n\s+id:|\Z)",
+ navigation, re.DOTALL,
+ ).group(1)
self.assertIn("features: ['rbac']", entry)
self.assertIn("hideWhenUnavailable: true", entry)
self.assertIn(f"requiredCapability: '{panel}'", entry)