1
0
mirror of https://github.com/moby/moby.git synced 2025-07-30 18:23:29 +03:00

Do not rely on string comparison in truncindex

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
Alexander Morozov
2015-11-03 17:19:18 -08:00
parent 562a1263f2
commit d4a8d09d1a
8 changed files with 37 additions and 22 deletions

View File

@ -230,10 +230,10 @@ func (s *DockerSuite) TestRmiBlank(c *check.C) {
c.Assert(out, checker.Contains, "image name cannot be blank", check.Commentf("out: %s", out))
out, _, err = dockerCmdWithError("rmi", " ")
// Should have failed to delete '' image
// Should have failed to delete ' ' image
c.Assert(err, checker.NotNil)
// Expected error message not generated
c.Assert(out, checker.Contains, "no such id", check.Commentf("out: %s", out))
c.Assert(out, checker.Contains, "image name cannot be blank", check.Commentf("out: %s", out))
}
func (s *DockerSuite) TestRmiContainerImageNotFound(c *check.C) {