diff --git a/plugin/pkg/client/auth/oidc/oidc_test.go b/plugin/pkg/client/auth/oidc/oidc_test.go index e3dca0f748e..48bbc5a72b6 100644 --- a/plugin/pkg/client/auth/oidc/oidc_test.go +++ b/plugin/pkg/client/auth/oidc/oidc_test.go @@ -45,10 +45,7 @@ func TestNewOIDCAuthProvider(t *testing.T) { } cert := path.Join(tempDir, "oidc-cert") key := path.Join(tempDir, "oidc-key") - - defer os.Remove(cert) - defer os.Remove(key) - defer os.Remove(tempDir) + defer os.RemoveAll(tempDir) oidctesting.GenerateSelfSignedCert(t, "127.0.0.1", cert, key) op := oidctesting.NewOIDCProvider(t, "")