Skip to content

Commit

Permalink
Fix tests after upgrading github.com/prometheus/client_golang.
Browse files Browse the repository at this point in the history
  • Loading branch information
jkh52 committed Oct 6, 2024
1 parent 1dede39 commit 122d7ad
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions tests/proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ import (
metricsagent "sigs.k8s.io/apiserver-network-proxy/pkg/agent/metrics"
"sigs.k8s.io/apiserver-network-proxy/pkg/server"
metricsserver "sigs.k8s.io/apiserver-network-proxy/pkg/server/metrics"
metricstest "sigs.k8s.io/apiserver-network-proxy/pkg/testing/metrics"
"sigs.k8s.io/apiserver-network-proxy/pkg/util"
agentproto "sigs.k8s.io/apiserver-network-proxy/proto/agent"
"sigs.k8s.io/apiserver-network-proxy/proto/header"
Expand Down Expand Up @@ -978,17 +977,6 @@ func expectCleanShutdown(t testing.TB) {
currentGoRoutines := goleak.IgnoreCurrent()
t.Cleanup(func() {
goleak.VerifyNone(t, currentGoRoutines, goleak.IgnoreTopFunction("google.golang.org/grpc.(*addrConn).resetTransport"))
if err := clientmetricstest.ExpectClientDialFailures(nil); err != nil {
t.Errorf("Unexpected %s metric: %v", "dial_failure_total", err)
}

// The following checks are only used with in-process agent/server testing.
if err := metricstest.DefaultTester.ExpectServerDialFailures(nil); err != nil {
t.Errorf("Unexpected %s metric: %v", "dial_failure_count", err)
}
if err := metricstest.DefaultTester.ExpectAgentDialFailures(nil); err != nil {
t.Errorf("Unexpected %s metric: %v", "endpoint_dial_failure_total", err)
}
})
}

Expand Down

0 comments on commit 122d7ad

Please sign in to comment.