Skip to content

Commit e5ba5cd

Browse files
authored
Merge pull request kubernetes#128097 from jsturtevant/fix-gmsa-test
[sig-windows] Update kubectl exec to use correct format
2 parents 558c0b6 + f1af725 commit e5ba5cd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/e2e/windows/gmsa_full.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,15 @@ var _ = sigDescribe(feature.Windows, "GMSA Full", framework.WithSerial(), framew
142142
ginkgo.By("checking that nltest /QUERY returns successfully")
143143
var output string
144144
gomega.Eventually(ctx, func() error {
145-
output, err = runKubectlExecInNamespace(f.Namespace.Name, podName, "nltest", "/QUERY")
145+
output, err = runKubectlExecInNamespace(f.Namespace.Name, podName, "--", "nltest", "/QUERY")
146146
if err != nil {
147147
return fmt.Errorf("unable to run command in container via exec: %w", err)
148148
}
149149

150150
if !isValidOutput(output) {
151151
// try repairing the secure channel by running reset command
152152
// https://kubernetes.io/docs/tasks/configure-pod-container/configure-gmsa/#troubleshooting
153-
output, err = runKubectlExecInNamespace(f.Namespace.Name, podName, "nltest", fmt.Sprintf("/sc_reset:%s", gmsaDomain))
153+
output, err = runKubectlExecInNamespace(f.Namespace.Name, podName, "--", "nltest", fmt.Sprintf("/sc_reset:%s", gmsaDomain))
154154
if err != nil {
155155
return fmt.Errorf("unable to run command in container via exec: %w", err)
156156
}
@@ -283,7 +283,7 @@ func retrieveCRDManifestFileContents(ctx context.Context, f *framework.Framework
283283
}
284284
e2epod.NewPodClient(f).CreateSync(ctx, pod)
285285

286-
output, err := runKubectlExecInNamespace(f.Namespace.Name, podName, "cmd", "/S", "/C", fmt.Sprintf("type %s", gmsaCrdManifestPath))
286+
output, err := runKubectlExecInNamespace(f.Namespace.Name, podName, "--", "cmd", "/S", "/C", fmt.Sprintf("type %s", gmsaCrdManifestPath))
287287
if err != nil {
288288
framework.Failf("failed to retrieve the contents of %q on node %q: %v", gmsaCrdManifestPath, node.Name, err)
289289
}

0 commit comments

Comments
 (0)