Align discovery proof expectations and connected pool assertions

Retain exact proof-list equality while including the disk-History scope proof already registered in the assigned base. Require the connected pool test to exercise its host-availability check and both independent owning identities, not merely count resource rows.

Contract-Neutral: Update regression expectations and assertion coverage only; runtime, registry and subsystem contracts are unchanged.
Change-source: pulse-maintainer
This commit is contained in:
pulse-triage[bot]
2026-10-05 23:17:58 +01:00
parent c5cee05f87
commit 3fb2389a8c
2 changed files with 6 additions and 0 deletions
@@ -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 {
@@ -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",
],
)