Enhance debuggability of e2e tests using exec command

This commit is contained in:
Tomas Nozicka 2019-01-30 11:46:30 +01:00
parent 529785e355
commit cfcac1737b

View File

@ -3407,7 +3407,7 @@ func NewHostExecPodSpec(ns, name string) *v1.Pod {
// RunHostCmd runs the given cmd in the context of the given pod using `kubectl exec`
// inside of a shell.
func RunHostCmd(ns, name, cmd string) (string, error) {
return RunKubectl("exec", fmt.Sprintf("--namespace=%v", ns), name, "--", "/bin/sh", "-c", cmd)
return RunKubectl("exec", fmt.Sprintf("--namespace=%v", ns), name, "--", "/bin/sh", "-x", "-c", cmd)
}
// RunHostCmdOrDie calls RunHostCmd and dies on error.