Fix test failures in volume provisioning

For windows, the command such as "mount" and "grep" do not work for
windows node, this PR is fix the test issue by removing those commands
and change it windows ones if the node OS is windows.

Change-Id: I2428128ee407b611067b8e7c000dfff539d17309
This commit is contained in:
Jing Xu 2019-04-08 16:10:36 -07:00
parent 2a05e1b76f
commit 208fbfe975

View File

@ -373,6 +373,9 @@ func PVWriteReadSingleNodeCheck(client clientset.Interface, claim *v1.Persistent
}
command += " || (mount | grep 'on /mnt/test'; false)"
if framework.NodeOSDistroIs("windows") {
command = "select-string 'hello world' /mnt/test/data"
}
RunInPodWithVolume(client, claim.Namespace, claim.Name, "pvc-volume-tester-reader", command, framework.NodeSelection{Name: actualNodeName})
return volume