From 7aa8a497df0145dc0f5f2395f221ae10cb485dd1 Mon Sep 17 00:00:00 2001 From: Mauricio Poppe Date: Mon, 5 Apr 2021 18:19:27 +0000 Subject: [PATCH] replaced usage of powershell commands with linux commands --- test/e2e/framework/volume/fixtures.go | 3 --- test/e2e/storage/testsuites/provisioning.go | 6 ++---- test/e2e/storage/testsuites/subpath.go | 6 +----- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/test/e2e/framework/volume/fixtures.go b/test/e2e/framework/volume/fixtures.go index 34673e2df9b..9af6d3cdd35 100644 --- a/test/e2e/framework/volume/fixtures.go +++ b/test/e2e/framework/volume/fixtures.go @@ -616,9 +616,6 @@ func generateWriteFileCmd(content, fullPath string) []string { // CheckVolumeModeOfPath check mode of volume func CheckVolumeModeOfPath(f *framework.Framework, pod *v1.Pod, volMode v1.PersistentVolumeMode, path string) { if volMode == v1.PersistentVolumeBlock { - // NOTE: gcepd-csi doesn't support a block volume in windows, this method won't - // be called because the test is skipped - // Check if block exists VerifyExecInPodSucceed(f, pod, fmt.Sprintf("test -b %s", path)) diff --git a/test/e2e/storage/testsuites/provisioning.go b/test/e2e/storage/testsuites/provisioning.go index cc98a412eba..08c7db678fb 100644 --- a/test/e2e/storage/testsuites/provisioning.go +++ b/test/e2e/storage/testsuites/provisioning.go @@ -551,7 +551,8 @@ func PVWriteReadSingleNodeCheck(client clientset.Interface, timeouts *framework. command += " || (mount | grep 'on /mnt/test'; false)" if framework.NodeOSDistroIs("windows") { - command = "select-string 'hello world' /mnt/test/data" + // agnhost doesn't support mount + command = "grep 'hello world' /mnt/test/data" } RunInPodWithVolume(client, timeouts, claim.Namespace, claim.Name, "pvc-volume-tester-reader", command, e2epod.NodeSelection{Name: actualNodeName}) @@ -596,9 +597,6 @@ func PVMultiNodeCheck(client clientset.Interface, timeouts *framework.TimeoutCon e2epod.SetAntiAffinity(&secondNode, actualNodeName) ginkgo.By(fmt.Sprintf("checking the created volume is readable and retains data on another node %+v", secondNode)) command = "grep 'hello world' /mnt/test/data" - if framework.NodeOSDistroIs("windows") { - command = "select-string 'hello world' /mnt/test/data" - } pod = StartInPodWithVolume(client, claim.Namespace, claim.Name, "pvc-reader-node2", command, secondNode) framework.ExpectNoError(e2epod.WaitForPodSuccessInNamespaceTimeout(client, pod.Name, pod.Namespace, timeouts.PodStartSlow)) runningPod, err = client.CoreV1().Pods(pod.Namespace).Get(context.TODO(), pod.Name, metav1.GetOptions{}) diff --git a/test/e2e/storage/testsuites/subpath.go b/test/e2e/storage/testsuites/subpath.go index 99394d78a48..4f6b10faddd 100644 --- a/test/e2e/storage/testsuites/subpath.go +++ b/test/e2e/storage/testsuites/subpath.go @@ -323,11 +323,7 @@ func (s *subPathTestSuite) DefineTests(driver storageframework.TestDriver, patte // Create the directory var command string - if framework.NodeOSDistroIs("windows") { - command = fmt.Sprintf("mkdir -p %v; New-Item -itemtype File -path %v", l.subPathDir, probeFilePath) - } else { - command = fmt.Sprintf("mkdir -p %v; touch %v", l.subPathDir, probeFilePath) - } + command = fmt.Sprintf("mkdir -p %v; touch %v", l.subPathDir, probeFilePath) setInitCommand(l.pod, command) testPodContainerRestart(f, l.pod) })