mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fixing statusCode checks for sockRequest
Signed-off-by: Megan Kostick <mkostick@us.ibm.com>
This commit is contained in:
parent
b830b823cd
commit
c7845e27ee
12 changed files with 165 additions and 199 deletions
|
@ -60,13 +60,8 @@ func (s *DockerSuite) TestRmRunningContainerCheckError409(c *check.C) {
|
|||
|
||||
endpoint := "/containers/foo"
|
||||
status, _, err := sockRequest("DELETE", endpoint, nil)
|
||||
|
||||
if err == nil {
|
||||
c.Fatalf("Expected error, can't rm a running container")
|
||||
} else if status != http.StatusConflict {
|
||||
c.Fatalf("Expected error to contain '409 Conflict' but found %s", err)
|
||||
}
|
||||
|
||||
c.Assert(status, check.Equals, http.StatusConflict)
|
||||
c.Assert(err, check.IsNil)
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestRmForceRemoveRunningContainer(c *check.C) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue