1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Verifiy status Codes 404 when no such image

Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
This commit is contained in:
Yuan Sun 2015-05-04 15:39:40 +08:00
parent fe221852b7
commit 9eefd2c17d

View file

@ -117,6 +117,10 @@ func (s *DockerSuite) TestApiImagesDelete(c *check.C) {
c.Assert(status, check.Equals, http.StatusConflict) c.Assert(status, check.Equals, http.StatusConflict)
c.Assert(err, check.IsNil) c.Assert(err, check.IsNil)
status, _, err = sockRequest("DELETE", "/images/test:noexist", nil)
c.Assert(status, check.Equals, http.StatusNotFound) //Status Codes:404 no such image
c.Assert(err, check.IsNil)
status, _, err = sockRequest("DELETE", "/images/test:tag1", nil) status, _, err = sockRequest("DELETE", "/images/test:tag1", nil)
c.Assert(status, check.Equals, http.StatusOK) c.Assert(status, check.Equals, http.StatusOK)
c.Assert(err, check.IsNil) c.Assert(err, check.IsNil)