diff --git a/integration/cmd.go b/integration/cmd.go index a254197bf..94f5701cb 100644 --- a/integration/cmd.go +++ b/integration/cmd.go @@ -18,7 +18,6 @@ package integration import ( "bytes" - "fmt" "os/exec" "testing" ) @@ -26,14 +25,8 @@ import ( // RunCommandWithoutTest will run cmd and if it fails will output relevant info // for debugging before returning an error. It can be run outside the context of a test. func RunCommandWithoutTest(cmd *exec.Cmd) ([]byte, error) { - var stderr bytes.Buffer - cmd.Stderr = &stderr - output, err := cmd.Output() - if err != nil { - fmt.Println(cmd.Args) - fmt.Println(stderr.String()) - fmt.Println(string(output)) - } + output, err := cmd.CombinedOutput() + return output, err } diff --git a/integration/dockerfiles/Dockerfile_test_daemons b/integration/dockerfiles/Dockerfile_test_daemons index 134ce92ca..8f942bea9 100644 --- a/integration/dockerfiles/Dockerfile_test_daemons +++ b/integration/dockerfiles/Dockerfile_test_daemons @@ -1,3 +1,3 @@ FROM busybox -RUN while true; do dd if=/dev/zero of=file`date +%s`.txt count=16000 bs=256 > /dev/null 2>&1; done & +RUN (while true; do sleep 10; dd if=/dev/zero of=file`date +%s`.txt count=16000 bs=256 > /dev/null 2>&1; done &); sleep 1 RUN echo "wait a second..." && sleep 2 && ls -lrat file*.txt || echo "test passed."