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.

Align discovery proof expectations and connected pool assertions

pulse-triage[bot]3fb2389a8cf7
diff --git a/internal/monitoring/truenas_pool_capacity_test.go b/internal/monitoring/truenas_pool_capacity_test.go
index 6724db6f35..6668329d38 100644
--- a/internal/monitoring/truenas_pool_capacity_test.go
+++ b/internal/monitoring/truenas_pool_capacity_test.go
@@ -121,6 +121,7 @@ func TestTrueNASPoolCapacityCollectionHistory(t *testing.T) {
records = append(records, provider.Records()...)
}
adapter.PopulateSnapshotAndSupplemental(models.StateSnapshot{}, map[unifiedresources.DataSource][]unifiedresources.IngestRecord{unifiedresources.SourceTrueNAS: records})
+ hostAChecked := false
for _, resource := range adapter.GetAll() {
if resource.Storage != nil && resource.Name == "tank" {
if resource.ParentID == nil {
@@ -132,11 +133,15 @@ func TestTrueNASPoolCapacityCollectionHistory(t *testing.T) {
}
}
if resource.Type == unifiedresources.ResourceTypeAgent && resource.ID == hostA {
+ hostAChecked = true
if (resource.Metrics.Disk != nil) != (step == 0 || step == 3) {
t.Fatal("known boot pool was presented as whole-host capacity")
}
}
}
+ if !hostAChecked || targets[hostA] == "" || targets[hostB] == "" || targets[hostA] == targets[hostB] {
+ t.Fatal("host availability and two independent pool identities were not exercised")
+ }
monitor.syncUnifiedStorageMetrics(adapter)
}
if poolReads.Load() != 8 || len(targets) != 2 {
diff --git a/scripts/release_control/subsystem_lookup_test.py b/scripts/release_control/subsystem_lookup_test.py
index 28aeddf79d..392b4c32f2 100644
--- a/scripts/release_control/subsystem_lookup_test.py
+++ b/scripts/release_control/subsystem_lookup_test.py
@@ -4262,6 +4262,7 @@ class SubsystemLookupTest(unittest.TestCase):
"internal/monitoring/monitor_pbs_coverage_test.go",
"internal/monitoring/monitor_pmg_test.go",
"internal/monitoring/monitor_polling_test.go",
+ "internal/monitoring/truenas_disk_history_scope_test.go",
"internal/monitoring/truenas_poller_test.go",
],
)