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.

Stop TempDir-backed alert managers in two tests

rcourtmanbc6efb5ae27d
diff --git a/internal/alerts/pbs_datastore_override_alias_test.go b/internal/alerts/pbs_datastore_override_alias_test.go
index 667c9329e2..7e488ff52d 100644
--- a/internal/alerts/pbs_datastore_override_alias_test.go
+++ b/internal/alerts/pbs_datastore_override_alias_test.go
@@ -12,6 +12,7 @@ import (
// must bridge the two so a UI-written override actually applies (#1591).
func TestResolveStorageThresholds_HonorsCanonicalPBSDatastoreAlias(t *testing.T) {
m := NewManagerWithDataDir(t.TempDir())
+ t.Cleanup(m.Stop)
m.UpdateConfig(AlertConfig{
Enabled: true,
StorageDefault: HysteresisThreshold{Trigger: 85, Clear: 80},
diff --git a/internal/monitoring/monitor_alert_handling_test.go b/internal/monitoring/monitor_alert_handling_test.go
index a1c0c6e12f..d1d88aac64 100644
--- a/internal/monitoring/monitor_alert_handling_test.go
+++ b/internal/monitoring/monitor_alert_handling_test.go
@@ -1071,6 +1071,7 @@ func TestMonitor_HandleAlertResolved_SuppressesRecoveryWhenFiringNeverDelivered(
notifMgr.SetGroupingWindow(120)
alertMgr := alerts.NewManager()
+ t.Cleanup(alertMgr.Stop)
cfg := alertMgr.GetConfig()
cfg.Enabled = true
cfg.ActivationState = alerts.ActivationActive