Add test case for stopping a restarting container

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
This commit is contained in:
Zhang Wei 2016-04-08 13:10:56 +08:00
Родитель b4664e3f86
Коммит ffad0873c9
1 изменённых файлов: 17 добавлений и 0 удалений

Просмотреть файл

@ -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")
}