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.

Compare retained storage backups by identity

pulse-triage[bot]15956ababe16
diff --git a/internal/monitoring/storage_inventory_http_test.go b/internal/monitoring/storage_inventory_http_test.go
index 5034d12b69..08930c374b 100644
--- a/internal/monitoring/storage_inventory_http_test.go
+++ b/internal/monitoring/storage_inventory_http_test.go
@@ -156,7 +156,10 @@ func TestPVEStorageHTTPInvalidResponseRetainsHistory(t *testing.T) {
if len(before) != 3 {
t.Fatalf("healthy control points=%d, want 3", len(before))
}
- beforeRows := f.m.state.GetSnapshot().PVEBackups.StorageBackups
+ beforeRows := make(map[string]models.StorageBackup)
+ for _, row := range f.m.state.GetSnapshot().PVEBackups.StorageBackups {
+ beforeRows[row.ID] = row
+ }
if cold {
f.coldState()
}
@@ -191,7 +194,7 @@ func TestPVEStorageHTTPInvalidResponseRetainsHistory(t *testing.T) {
}
if !cold {
for _, row := range rows {
- if row.VMID == 102 && !reflect.DeepEqual(row, beforeRows[1]) {
+ if row.VMID == 102 && !reflect.DeepEqual(row, beforeRows[row.ID]) {
t.Fatal("unread HTTP inventory changed its warm row")
}
}