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.

Initialize alert state in the Windows polling fixture

pulse-triage[bot]8a705c45cf81
diff --git a/internal/monitoring/guest_windows_polling_test.go b/internal/monitoring/guest_windows_polling_test.go
index cfc2d7eb15..958e6d24d3 100644
--- a/internal/monitoring/guest_windows_polling_test.go
+++ b/internal/monitoring/guest_windows_polling_test.go
@@ -12,6 +12,7 @@ import (
"testing"
"time"
+ "github.com/rcourtman/pulse-go-rewrite/internal/alerts"
"github.com/rcourtman/pulse-go-rewrite/internal/config"
"github.com/rcourtman/pulse-go-rewrite/internal/models"
"github.com/rcourtman/pulse-go-rewrite/internal/unifiedresources"
@@ -83,6 +84,8 @@ func testGuestWindowsMeminfoPolling(t *testing.T) {
}
}
m := guestHistoryObservationMonitor(t)
+ m.alertManager = alerts.NewManagerWithDataDir(t.TempDir(), alerts.WithoutPersistedAlertRestore())
+ t.Cleanup(m.alertManager.Stop)
m.config, m.state, m.rateTracker = &config.Config{}, models.NewState(), NewRateTracker()
m.guestMetadataLimiter = make(map[string]time.Time)
registry := unifiedresources.NewRegistry(nil)