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
1 changed files with 4 additions and 0 deletions

View File

@ -117,6 +117,10 @@ func (s *DockerSuite) TestApiImagesDelete(c *check.C) {
c.Assert(status, check.Equals, http.StatusConflict)
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)
c.Assert(status, check.Equals, http.StatusOK)
c.Assert(err, check.IsNil)