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.

Establish initial delivery in restart lifecycle proof

pulse-triage[bot]1f4f3a09578d
diff --git a/internal/alerts/update_alerts_test.go b/internal/alerts/update_alerts_test.go
index ad007cbaf0..425e96970a 100644
--- a/internal/alerts/update_alerts_test.go
+++ b/internal/alerts/update_alerts_test.go
@@ -824,8 +824,10 @@ func TestDockerUpdateRestartRestoresActivePendingAge(t *testing.T) {
m.dockerUpdateFirstSeen[resourceID] = first
m.dockerUpdateFirstSeenByIdentity[trackingKey] = first
m.mu.Unlock()
+ var initialDeliveries atomic.Int32
+ m.SetAlertCallback(func(*Alert) { initialDeliveries.Add(1) })
m.CheckDockerHost(host)
- if got := m.GetActiveAlerts(); len(got) != 1 || !got[0].StartTime.Equal(first) {
+ if got := m.GetActiveAlerts(); len(got) != 1 || !got[0].StartTime.Equal(first) || initialDeliveries.Load() != 1 {
t.Fatalf("initial pending update = %+v", got)
}
if acknowledged {