mirror of
https://github.com/moby/moby.git
synced 2025-07-30 18:23:29 +03:00
Merge pull request #14547 from duglin/ErrDeadExec
Return 404 on exec-inspect when container is dead but exec is still around
This commit is contained in:
@ -369,6 +369,17 @@ func (s *DockerSuite) TestInspectExecID(c *check.C) {
|
||||
if sc != http.StatusOK {
|
||||
c.Fatalf("received status != 200 OK: %d\n%s", sc, body)
|
||||
}
|
||||
|
||||
// Now delete the container and then an 'inspect' on the exec should
|
||||
// result in a 404 (not 'container not running')
|
||||
out, ec := dockerCmd(c, "rm", "-f", id)
|
||||
if ec != 0 {
|
||||
c.Fatalf("error removing container: %s", out)
|
||||
}
|
||||
sc, body, err = sockRequest("GET", "/exec/"+execID+"/json", nil)
|
||||
if sc != http.StatusNotFound {
|
||||
c.Fatalf("received status != 404: %s\n%s", sc, body)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestLinksPingLinkedContainersOnRename(c *check.C) {
|
||||
|
Reference in New Issue
Block a user