diff --git a/integration-cli/docker_cli_import_test.go b/integration-cli/docker_cli_import_test.go index 9420dafa57..dc07fb40ee 100644 --- a/integration-cli/docker_cli_import_test.go +++ b/integration-cli/docker_cli_import_test.go @@ -35,7 +35,11 @@ func (s *DockerSuite) TestImportBadURL(c *check.C) { testRequires(c, DaemonIsLinux) out, _, err := dockerCmdWithError("import", "http://nourl/bad") c.Assert(err, checker.NotNil, check.Commentf("import was supposed to fail but didn't")) - c.Assert(out, checker.Contains, "dial tcp", check.Commentf("expected an error msg but didn't get one")) + // Depending on your system you can get either of these errors + if !strings.Contains(out, "dial tcp") && + !strings.Contains(out, "Error processing tar file") { + c.Fatalf("expected an error msg but didn't get one.\nErr: %v\nOut: %v", err, out) + } } func (s *DockerSuite) TestImportFile(c *check.C) { diff --git a/pkg/chrootarchive/archive_unix.go b/pkg/chrootarchive/archive_unix.go index 54a299b8fb..f2325abd74 100644 --- a/pkg/chrootarchive/archive_unix.go +++ b/pkg/chrootarchive/archive_unix.go @@ -80,7 +80,7 @@ func invokeUnpack(decompressedArchive io.Reader, dest string, options *archive.T // pending on write pipe forever io.Copy(ioutil.Discard, decompressedArchive) - return fmt.Errorf("Untar re-exec error: %v: output: %s", err, output) + return fmt.Errorf("Error processing tar file(%v): %s", err, output) } return nil }