Fix a regression in docker import on error from URL
when the daemon can't download the image from a `docker import` the error message was lost due to 'err' being redefined with a block by mistake. This removes the ":" from "... err := " which fixes it. Signed-off-by: Doug Davis <dug@us.ibm.com> Upstream-commit: 3f4926e49b5f6df00ca09328e990729e00cb1a92 Component: engine
This commit is contained in:
@ -39,3 +39,14 @@ func (s *DockerSuite) TestImportDisplay(c *check.C) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestImportBadURL(c *check.C) {
|
||||
runCmd := exec.Command(dockerBinary, "import", "http://nourl/bad")
|
||||
out, _, err := runCommandWithOutput(runCmd)
|
||||
if err == nil {
|
||||
c.Fatal("import was supposed to fail but didn't")
|
||||
}
|
||||
if !strings.Contains(out, "dial tcp") {
|
||||
c.Fatalf("expected an error msg but didn't get one:\n%s", out)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user