mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #21879 from WeiZhang555/fix-kill-nonexist
Fix bug that can't kill an restarting container
This commit is contained in:
commit
cb87b6eb6a
1 changed files with 17 additions and 0 deletions
17
integration-cli/docker_cli_stop_test.go
Normal file
17
integration-cli/docker_cli_stop_test.go
Normal file
|
@ -0,0 +1,17 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/docker/docker/pkg/integration/checker"
|
||||
"github.com/go-check/check"
|
||||
)
|
||||
|
||||
func (s *DockerSuite) TestStopContainerWithRestartPolicyAlways(c *check.C) {
|
||||
dockerCmd(c, "run", "--name", "verifyRestart1", "-d", "--restart=always", "busybox", "false")
|
||||
dockerCmd(c, "run", "--name", "verifyRestart2", "-d", "--restart=always", "busybox", "false")
|
||||
|
||||
c.Assert(waitRun("verifyRestart1"), checker.IsNil)
|
||||
c.Assert(waitRun("verifyRestart2"), checker.IsNil)
|
||||
|
||||
dockerCmd(c, "stop", "verifyRestart1")
|
||||
dockerCmd(c, "stop", "verifyRestart2")
|
||||
}
|
Loading…
Reference in a new issue