From b4d93a6567ad965c0803e276286f6670140c2071 Mon Sep 17 00:00:00 2001 From: Ben Luddy Date: Wed, 15 Dec 2021 16:59:08 -0500 Subject: [PATCH] Reset metric observed by TestProxyHandler for repeatable test runs. This test expects x509_missing_san_total to be 1. When run with -test.count greater than 1, that expectation is unmet for all but the first test run. --- .../k8s.io/kube-aggregator/pkg/apiserver/handler_proxy_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/staging/src/k8s.io/kube-aggregator/pkg/apiserver/handler_proxy_test.go b/staging/src/k8s.io/kube-aggregator/pkg/apiserver/handler_proxy_test.go index 3b469699c5d..3f607d74c64 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/apiserver/handler_proxy_test.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/apiserver/handler_proxy_test.go @@ -301,6 +301,7 @@ func TestProxyHandler(t *testing.T) { target := &targetHTTPHandler{} for name, tc := range tests { target.Reset() + legacyregistry.Reset() func() { targetServer := httptest.NewUnstartedServer(target)