mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-10-17 01:59:04 +02:00
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:
co-authored by
Claude
parent
2153e5178e
commit
8f118226f7
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user