diff --git a/integration-cli/docker_cli_daemon_test.go b/integration-cli/docker_cli_daemon_test.go index 98fb5bdd0b..0507bf11a8 100644 --- a/integration-cli/docker_cli_daemon_test.go +++ b/integration-cli/docker_cli_daemon_test.go @@ -1914,27 +1914,28 @@ func (s *DockerDaemonSuite) TestDaemonNoSpaceleftOnDeviceError(c *check.C) { // create a 2MiB image and mount it as graph root cmd := exec.Command("dd", "of=/tmp/testfs.img", "bs=1M", "seek=2", "count=0") - if err := cmd.Run(); err != nil { - c.Fatalf("dd failed: %v", err) - } + out, err := cmd.CombinedOutput() + c.Assert(err, checker.IsNil, check.Commentf(string(out))) + cmd = exec.Command("mkfs.ext4", "-F", "/tmp/testfs.img") - if err := cmd.Run(); err != nil { - c.Fatalf("mkfs.ext4 failed: %v", err) - } + out, err = cmd.CombinedOutput() + c.Assert(err, checker.IsNil, check.Commentf(string(out))) + cmd = exec.Command("mkdir", "-p", "/tmp/testfs-mount") - if err := cmd.Run(); err != nil { - c.Fatalf("mkdir failed: %v", err) - } + out, err = cmd.CombinedOutput() + c.Assert(err, checker.IsNil, check.Commentf(string(out))) + cmd = exec.Command("mount", "-t", "ext4", "-no", "loop,rw", "/tmp/testfs.img", "/tmp/testfs-mount") - if err := cmd.Run(); err != nil { - c.Fatalf("mount failed: %v", err) - } - err := s.d.Start("--graph", "/tmp/testfs-mount") + out, err = cmd.CombinedOutput() + c.Assert(err, checker.IsNil, check.Commentf(string(out))) + + err = s.d.Start("--graph", "/tmp/testfs-mount") c.Assert(err, check.IsNil) // pull a repository large enough to fill the mount point - out, err := s.d.Cmd("pull", "registry:2") - c.Assert(out, checker.Contains, "no space left on device") + pullOut, err := s.d.Cmd("pull", "registry:2") + c.Assert(err, checker.NotNil, check.Commentf(pullOut)) + c.Assert(pullOut, checker.Contains, "no space left on device") } // Test daemon restart with container links + auto restart