From 2a90c25acb5eb88c81b5ae8bea35e5d38f6bb823 Mon Sep 17 00:00:00 2001 From: James Sturtevant Date: Tue, 15 Oct 2024 09:29:32 -0700 Subject: [PATCH] Update kubectl exec to use correct format Signed-off-by: James Sturtevant --- test/e2e/windows/gmsa_full.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e/windows/gmsa_full.go b/test/e2e/windows/gmsa_full.go index cc8e0a796b8..62917ef3d30 100644 --- a/test/e2e/windows/gmsa_full.go +++ b/test/e2e/windows/gmsa_full.go @@ -142,7 +142,7 @@ var _ = sigDescribe(feature.Windows, "GMSA Full", framework.WithSerial(), framew ginkgo.By("checking that nltest /QUERY returns successfully") var output string gomega.Eventually(ctx, func() bool { - output, err = runKubectlExecInNamespace(f.Namespace.Name, podName, "nltest", "/QUERY") + output, err = runKubectlExecInNamespace(f.Namespace.Name, podName, "--", "nltest", "/QUERY") if err != nil { framework.Logf("unable to run command in container via exec: %s", err) return false @@ -151,7 +151,7 @@ var _ = sigDescribe(feature.Windows, "GMSA Full", framework.WithSerial(), framew if !isValidOutput(output) { // try repairing the secure channel by running reset command // https://kubernetes.io/docs/tasks/configure-pod-container/configure-gmsa/#troubleshooting - output, err = runKubectlExecInNamespace(f.Namespace.Name, podName, "nltest", fmt.Sprintf("/sc_reset:%s", gmsaDomain)) + output, err = runKubectlExecInNamespace(f.Namespace.Name, podName, "--", "nltest", fmt.Sprintf("/sc_reset:%s", gmsaDomain)) if err != nil { framework.Logf("unable to run command in container via exec: %s", err) return false @@ -286,7 +286,7 @@ func retrieveCRDManifestFileContents(ctx context.Context, f *framework.Framework } e2epod.NewPodClient(f).CreateSync(ctx, pod) - output, err := runKubectlExecInNamespace(f.Namespace.Name, podName, "cmd", "/S", "/C", fmt.Sprintf("type %s", gmsaCrdManifestPath)) + output, err := runKubectlExecInNamespace(f.Namespace.Name, podName, "--", "cmd", "/S", "/C", fmt.Sprintf("type %s", gmsaCrdManifestPath)) if err != nil { framework.Failf("failed to retrieve the contents of %q on node %q: %v", gmsaCrdManifestPath, node.Name, err) }