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.

Assert the wanted-alert fixture control is present

pulse-triage[bot]077156c1a3af
diff --git a/internal/monitoring/pve_storage_budget_test.go b/internal/monitoring/pve_storage_budget_test.go
index 28fee2134d..34b038ca7a 100644
--- a/internal/monitoring/pve_storage_budget_test.go
+++ b/internal/monitoring/pve_storage_budget_test.go
@@ -340,6 +340,13 @@ func TestPVEStorageBudgetDoesNotInventAlertReadFailure(t *testing.T) {
f.m.alertManager.RaiseSystemAlert(alerts.SystemAlertInput{Type: alerts.BackupEvaluationAlertType, Level: alerts.AlertLevelWarning, Fingerprint: "prior-observed-read-failure", Message: "Prior observed reader failure"})
}
before := f.m.alertManager.GetActiveAlerts()
+ want := 1
+ if priorWarning {
+ want++
+ }
+ if len(before) != want {
+ t.Fatalf("missing wanted/prior alert control: %+v", before)
+ }
c.phase, c.at = "content/node-b/local", c.at.Add(15*time.Minute)
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
defer cancel()