Skip to content

Commit

Permalink
Skipping metrics tests added in kubernetes#4022
Browse files Browse the repository at this point in the history
Each test works in isolation, but they cause panic when the entire
suite is run (ex. make test-in-docker), because the underlying
metrics library panics when the same metric is registered twice.
  • Loading branch information
MaciekPytel committed Jul 8, 2021
1 parent 7f6f953 commit 52392b3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cluster-autoscaler/metrics/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ import (
)

func TestDisabledPerNodeGroupMetrics(t *testing.T) {
t.Skip("Registering metrics multiple times causes panic. Skipping until the test is fixed to not impact other tests.")
RegisterAll(false)
assert.False(t, nodesGroupMinNodes.IsCreated())
assert.False(t, nodesGroupMaxNodes.IsCreated())
}

func TestEnabledPerNodeGroupMetrics(t *testing.T) {
t.Skip("Registering metrics multiple times causes panic. Skipping until the test is fixed to not impact other tests.")
RegisterAll(true)
assert.True(t, nodesGroupMinNodes.IsCreated())
assert.True(t, nodesGroupMaxNodes.IsCreated())
Expand Down

0 comments on commit 52392b3

Please sign in to comment.