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.

Wait for delivery audits as well as sent status in checkpoint proof

pulse-triage[bot]96ca840e775a
diff --git a/internal/notifications/firing_group_checkpoint_test.go b/internal/notifications/firing_group_checkpoint_test.go
index c65fd7e1d5..25eb88e4f5 100644
--- a/internal/notifications/firing_group_checkpoint_test.go
+++ b/internal/notifications/firing_group_checkpoint_test.go
@@ -321,7 +321,9 @@ func TestCheckpointReplayRechecksCurrentPolicy(t *testing.T) {
}
switch policy {
case "allowed":
- return rows[0].Status == QueueStatusSent
+ entries, err := m.GetQueue().GetDeliveryLog(time.Now().Add(-time.Hour), 100)
+ require.NoError(t, err)
+ return rows[0].Status == QueueStatusSent && len(entries) == 1
case "new-quiet-hours":
return rows[0].NextRetryAt != nil && rows[0].NextRetryAt.After(time.Now().Add(30*time.Minute))
default:
diff --git a/internal/notifications/firing_group_process_test.go b/internal/notifications/firing_group_process_test.go
index 4805ff729e..8a05edb59a 100644
--- a/internal/notifications/firing_group_process_test.go
+++ b/internal/notifications/firing_group_process_test.go
@@ -302,7 +302,7 @@ func TestGroupedWarningGracefulProcessRestartAndReload(t *testing.T) {
_, err := fmt.Fprintln(c.input, "status")
require.NoError(t, err)
state := read(c, "status")
- if state.Stats["sent"] == want {
+ if state.Stats["sent"] == want && len(state.Log) == want {
return state
}
require.True(t, time.Now().Before(deadline), "durable completion missing")