From e22ad6171a8827d29c3a3a5996fec791cc818a2f Mon Sep 17 00:00:00 2001 From: Ryan Richard Date: Mon, 15 Mar 2021 09:37:19 -0700 Subject: [PATCH] Fix a race detector warning by re-declaring `err` in a t.Cleanup() --- test/integration/concierge_impersonation_proxy_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/concierge_impersonation_proxy_test.go b/test/integration/concierge_impersonation_proxy_test.go index 8d9cfa73..433e6045 100644 --- a/test/integration/concierge_impersonation_proxy_test.go +++ b/test/integration/concierge_impersonation_proxy_test.go @@ -163,7 +163,7 @@ func TestImpersonationProxy(t *testing.T) { //nolint:gocyclo // yeah, it's compl // Delete any version that was created by this test. t.Logf("cleaning up configmap at end of test %s", impersonationProxyConfigMapName(env)) - err = adminClient.CoreV1().ConfigMaps(env.ConciergeNamespace).Delete(ctx, impersonationProxyConfigMapName(env), metav1.DeleteOptions{}) + err := adminClient.CoreV1().ConfigMaps(env.ConciergeNamespace).Delete(ctx, impersonationProxyConfigMapName(env), metav1.DeleteOptions{}) if !k8serrors.IsNotFound(err) { require.NoError(t, err) // only not found errors are acceptable }