diff --git a/integration-cli/docker_cli_rmi_test.go b/integration-cli/docker_cli_rmi_test.go index ec5510c9af..3863f6006d 100644 --- a/integration-cli/docker_cli_rmi_test.go +++ b/integration-cli/docker_cli_rmi_test.go @@ -252,4 +252,19 @@ func (s *DockerSuite) TestRmiBlank(c *check.C) { if strings.Contains(out, "No such image") { c.Fatalf("Wrong error message generated: %s", out) } + + if !strings.Contains(out, "Image name can not be blank") { + c.Fatalf("Expected error message not generated: %s", out) + } + + runCmd = exec.Command(dockerBinary, "rmi", " ") + out, _, err = runCommandWithOutput(runCmd) + + if err == nil { + c.Fatal("Should have failed to delete '' image") + } + + if !strings.Contains(out, "No such image") { + c.Fatalf("Expected error message not generated: %s", out) + } }