registry: fix env test cleanup

This commit is contained in:
findkim 2020-03-03 13:52:39 -06:00
parent 4f55721c2e
commit bb968634ac

View File

@ -30,11 +30,10 @@ func TestConfigureDiscoveryRetry(t *testing.T) {
})
t.Run("configured retry", func(t *testing.T) {
defer func() {
os.Setenv(registryDiscoveryRetryEnvName,
os.Getenv(registryDiscoveryRetryEnvName))
defer func(retryEnv string) {
os.Setenv(registryDiscoveryRetryEnvName, retryEnv)
discoveryRetry = defaultRetry
}()
}(os.Getenv(registryDiscoveryRetryEnvName))
os.Setenv(registryDiscoveryRetryEnvName, "2")
configureDiscoveryRetry()