mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Make writing file via container in tests sync for real this time
This commit is contained in:
parent
529d5dd4b2
commit
1f1859f937
@ -478,7 +478,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))
|
||||
|
Loading…
Reference in New Issue
Block a user