Skip to content

Commit

Permalink
Merge pull request #84656 from davidz627/fix/syncReal
Browse files Browse the repository at this point in the history
Make writing file via container in tests sync for real this time by enclosing multiple commands in quotes
  • Loading branch information
k8s-ci-robot committed Nov 2, 2019
2 parents 235db13 + 1f1859f commit 61200c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/e2e/framework/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 61200c9

Please sign in to comment.