From 335dc6e2ee721c20d5420231c2905136ef0959f9 Mon Sep 17 00:00:00 2001 From: Claudiu Belu Date: Mon, 13 Apr 2020 08:04:28 -0700 Subject: [PATCH] Windows tests: Makes gMSA test more nanoserver friendly Nanoserver does not have powershell. This commit will replace the powershell command with its cmd equivalent. --- test/e2e/windows/gmsa_full.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/e2e/windows/gmsa_full.go b/test/e2e/windows/gmsa_full.go index 1cebe10d25a..a8aa70eba97 100644 --- a/test/e2e/windows/gmsa_full.go +++ b/test/e2e/windows/gmsa_full.go @@ -208,9 +208,7 @@ func retrieveCRDManifestFileContents(f *framework.Framework, node v1.Node) strin } f.PodClient().CreateSync(pod) - // using powershell and using forward slashes avoids the nightmare of having to properly - // escape quotes and backward slashes - output, err := runKubectlExecInNamespace(f.Namespace.Name, podName, "powershell", "Get-Content", strings.ReplaceAll(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) }