Merge pull request #84745 from davidz627/revert-84656-fix/syncReal

Revert "Make writing file via container in tests sync for real this time by enclosing multiple commands in quotes"
This commit is contained in:
Kubernetes Prow Robot 2019-11-05 15:31:41 -08:00 committed by GitHub
commit 74cbf0dc33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -470,7 +470,7 @@ func (f *Framework) WriteFileViaContainer(podName, containerName string, path st
return fmt.Errorf("Unsupported character in string to write: %v", c)
}
}
command := fmt.Sprintf("\"echo '%s' > '%s'; sync\"", contents, path)
command := fmt.Sprintf("echo '%s' > '%s'; sync", contents, path)
stdout, stderr, err := kubectlExecWithRetry(f.Namespace.Name, podName, containerName, "--", "/bin/sh", "-c", command)
if err != nil {
Logf("error running kubectl exec to write file: %v\nstdout=%v\nstderr=%v)", err, string(stdout), string(stderr))