Fix a race detector warning by re-declaring err
in a t.Cleanup()
This commit is contained in:
parent
00694c9cb6
commit
e22ad6171a
@ -163,7 +163,7 @@ func TestImpersonationProxy(t *testing.T) { //nolint:gocyclo // yeah, it's compl
|
|||||||
|
|
||||||
// Delete any version that was created by this test.
|
// Delete any version that was created by this test.
|
||||||
t.Logf("cleaning up configmap at end of test %s", impersonationProxyConfigMapName(env))
|
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) {
|
if !k8serrors.IsNotFound(err) {
|
||||||
require.NoError(t, err) // only not found errors are acceptable
|
require.NoError(t, err) // only not found errors are acceptable
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user