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.

Fix failing backend tests in preflight checks

rcourtmanf3d20a1feadd
diff --git a/internal/monitoring/monitor_docker_test.go b/internal/monitoring/monitor_docker_test.go
index ba52885337..33547e2130 100644
--- a/internal/monitoring/monitor_docker_test.go
+++ b/internal/monitoring/monitor_docker_test.go
@@ -14,10 +14,12 @@ func newTestMonitor(t *testing.T) *Monitor {
t.Helper()
return &Monitor{
- state: models.NewState(),
- alertManager: alerts.NewManager(),
- removedDockerHosts: make(map[string]time.Time),
- rateTracker: NewRateTracker(),
+ state: models.NewState(),
+ alertManager: alerts.NewManager(),
+ removedDockerHosts: make(map[string]time.Time),
+ rateTracker: NewRateTracker(),
+ dockerTokenBindings: make(map[string]string),
+ dockerMetadataStore: config.NewDockerMetadataStore(t.TempDir()),
}
}
diff --git a/internal/notifications/notifications_test.go b/internal/notifications/notifications_test.go
index 64589b49a9..16cab0d1e6 100644
--- a/internal/notifications/notifications_test.go
+++ b/internal/notifications/notifications_test.go
@@ -251,6 +251,11 @@ func TestSendGroupedAppriseHTTP(t *testing.T) {
}))
defer server.Close()
+ // Allow localhost for test server (SSRF protection normally blocks this)
+ if err := nm.UpdateAllowedPrivateCIDRs("127.0.0.1"); err != nil {
+ t.Fatalf("failed to configure allowlist: %v", err)
+ }
+
nm.SetAppriseConfig(AppriseConfig{
Enabled: true,
Mode: AppriseModeHTTP,
@@ -592,6 +597,11 @@ func TestSendTestNotificationAppriseHTTP(t *testing.T) {
}))
defer server.Close()
+ // Allow localhost for test server (SSRF protection normally blocks this)
+ if err := nm.UpdateAllowedPrivateCIDRs("127.0.0.1"); err != nil {
+ t.Fatalf("failed to configure allowlist: %v", err)
+ }
+
nm.SetAppriseConfig(AppriseConfig{
Enabled: true,
Mode: AppriseModeHTTP,