2016-04-08 01:10:56 -04:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2016-12-30 12:23:00 -05:00
|
|
|
"github.com/docker/docker/integration-cli/checker"
|
2016-04-08 01:10:56 -04:00
|
|
|
"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")
|
|
|
|
}
|