fix Pod Disks schedule pods each with a PD test in windows

This commit is contained in:
Mauricio Poppe
2021-03-18 06:42:43 +00:00
parent 54449be031
commit 2ac6d4d133
2 changed files with 6 additions and 2 deletions

View File

@@ -142,6 +142,10 @@ func (tk *TestKubeconfig) WriteFileViaContainer(podName, containerName string, p
}
}
command := fmt.Sprintf("echo '%s' > '%s'; sync", contents, path)
// TODO: replace with `framework.NodeOSDistroIs` when #81245 is complete
if e2epod.NodeOSDistroIs("windows") {
command = fmt.Sprintf("echo '%s' > '%s'; sleep 1", contents, path)
}
stdout, stderr, err := tk.kubectlExecWithRetry(tk.Namespace, podName, containerName, "--", "/bin/sh", "-c", command)
if err != nil {
e2elog.Logf("error running kubectl exec to write file: %v\nstdout=%v\nstderr=%v)", err, string(stdout), string(stderr))