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.

Use the served alert model in snapshot collection proofs

pulse-triage[bot]f6bf8b47903d
diff --git a/internal/monitoring/snapshot_collection_observation_test.go b/internal/monitoring/snapshot_collection_observation_test.go
index c91d5a38e2..a6dae138c3 100644
--- a/internal/monitoring/snapshot_collection_observation_test.go
+++ b/internal/monitoring/snapshot_collection_observation_test.go
@@ -79,7 +79,7 @@ func snapshotCollectionByID(m *Monitor) map[string]models.GuestSnapshot {
return result
}
-func snapshotCollectionAlert(t *testing.T, m *Monitor, resourceID string) alerts.Alert {
+func snapshotCollectionAlert(t *testing.T, m *Monitor, resourceID string) models.Alert {
t.Helper()
for _, alert := range m.GetState().ActiveAlerts {
if alert.Type == "snapshot-age" && alert.ResourceID == resourceID {
@@ -87,7 +87,7 @@ func snapshotCollectionAlert(t *testing.T, m *Monitor, resourceID string) alerts
}
}
t.Fatalf("snapshot warning missing for %s: %+v", resourceID, m.GetState().ActiveAlerts)
- return alerts.Alert{}
+ return models.Alert{}
}
func TestSnapshotCollectionFailureIsNotRemoval(t *testing.T) {
@@ -181,7 +181,7 @@ func TestSnapshotCollectionBrowserProducer(t *testing.T) {
client := &snapshotCollectionClient{replies: map[string]snapshotCollectionReply{}}
type frame struct {
Snapshots []models.GuestSnapshot `json:"snapshots"`
- Alerts []alerts.Alert `json:"alerts"`
+ Alerts []models.Alert `json:"alerts"`
}
frames := map[string]frame{}
for _, phase := range []string{"observed", "failed-596", "failed-unavailable", "confirmed-empty"} {