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.
This commit is contained in:
Ben Luddy 2021-12-15 16:59:08 -05:00
parent f6243782d0
commit b4d93a6567
No known key found for this signature in database
GPG Key ID: E01DF04B82AF03C0

View File

@ -301,6 +301,7 @@ func TestProxyHandler(t *testing.T) {
target := &targetHTTPHandler{} target := &targetHTTPHandler{}
for name, tc := range tests { for name, tc := range tests {
target.Reset() target.Reset()
legacyregistry.Reset()
func() { func() {
targetServer := httptest.NewUnstartedServer(target) targetServer := httptest.NewUnstartedServer(target)