From 3fb2389a8cf7deed98feb4cbcf6e40f34a4fdbcc Mon Sep 17 00:00:00 2001 From: "pulse-triage[bot]" <249995291+pulse-triage[bot]@users.noreply.github.com> Date: Mon, 5 Oct 2026 23:17:58 +0100 Subject: [PATCH] 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 --- internal/monitoring/truenas_pool_capacity_test.go | 5 +++++ scripts/release_control/subsystem_lookup_test.py | 1 + 2 files changed, 6 insertions(+) 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", ], )