replaced usage of powershell commands with linux commands

This commit is contained in:
Mauricio Poppe
2021-04-05 18:19:27 +00:00
parent f0d7e9c9d1
commit 7aa8a497df
3 changed files with 3 additions and 12 deletions

View File

@@ -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{})