Skip to content

Commit

Permalink
fix: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
VihasMakwana committed Dec 10, 2024
1 parent 5849294 commit 2815f4f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion metric/cpu/metric_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
)

func TestCounterLength(t *testing.T) {
monitor, err := New(systemtests.DockerTestResolver())
monitor, err := New(systemtests.DockerTestResolver(), WithWindowsPerformanceCounter())
require.NoError(t, err)
require.NoError(t, monitor.query.CollectData())

Expand All @@ -52,3 +52,9 @@ func TestCounterLength(t *testing.T) {
require.Equal(t, kernelRawData[i].InstanceName, idleRawData[i].InstanceName, "InstanceName should be equal")
}
}

func TestCounterDisabled(t *testing.T) {
monitor, err := New(systemtests.DockerTestResolver(), WithWindowsPerformanceCounter())
require.NoError(t, err)
require.Nil(t, monitor.query)
}

0 comments on commit 2815f4f

Please sign in to comment.