hyperv: require datastore metrics in the CI fixture test (#2704)

Signed-off-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Jan-Otto Kröpke
2026-10-12 23:15:47 +02:00
committed by GitHub
co-authored by Claude
parent 2153e5178e
commit 8f118226f7
+4
View File
@@ -40,6 +40,10 @@ func TestCollector(t *testing.T) {
testutils.RequireFixtureMetric(t, metrics, hyperv.Name, "windows_hyperv_dynamic_memory_vm_physical_bytes", prometheus.Labels{"vm": "GitHubActions"})
testutils.RequireFixtureMetric(t, metrics, hyperv.Name, "windows_hyperv_vm_processor_count", prometheus.Labels{"vm": "GitHubActions"})
// An empty "Hyper-V DataStore" counter set is tolerated as an optional
// instance group, so require a series explicitly (#2328).
testutils.RequireFixtureMetric(t, metrics, hyperv.Name, "windows_hyperv_datastore_fragmentation_ratio", nil)
// The fixture VM is not replicated, but every VM has a primary replication relationship.
if metric := testutils.RequireFixtureMetric(t, metrics, hyperv.Name, "windows_hyperv_replica_vm_state", prometheus.Labels{"vm": "GitHubActions", "relationship": "primary"}); metric != nil {
require.InDelta(t, 0, metric.GetGauge().GetValue(), 0, "expected replication to be disabled")