From 9bafbfb3229e07361f11c32adbed22c5acf4d94a Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Wed, 9 Nov 2016 17:13:42 -0600 Subject: [PATCH] Add restart policy to restart policy tests Fixes two tests that tested containers restart policy without actually having a restart policy Signed-off-by: Christopher Jones Upstream-commit: de1dad7074c84f56dd8f29bca0de29ba1e4ae6ce Component: engine --- components/engine/integration-cli/docker_cli_kill_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/engine/integration-cli/docker_cli_kill_test.go b/components/engine/integration-cli/docker_cli_kill_test.go index 623df00418..43164801d4 100644 --- a/components/engine/integration-cli/docker_cli_kill_test.go +++ b/components/engine/integration-cli/docker_cli_kill_test.go @@ -68,7 +68,7 @@ func (s *DockerSuite) TestKillWithSignal(c *check.C) { func (s *DockerSuite) TestKillWithStopSignalWithSameSignalShouldDisableRestartPolicy(c *check.C) { // Cannot port to Windows - does not support signals int the same way as Linux does testRequires(c, DaemonIsLinux) - out, _ := dockerCmd(c, "run", "-d", "--stop-signal=TERM", "busybox", "top") + out, _ := dockerCmd(c, "run", "-d", "--stop-signal=TERM", "--restart=always", "busybox", "top") cid := strings.TrimSpace(out) c.Assert(waitRun(cid), check.IsNil) @@ -84,7 +84,7 @@ func (s *DockerSuite) TestKillWithStopSignalWithSameSignalShouldDisableRestartPo func (s *DockerSuite) TestKillWithStopSignalWithDifferentSignalShouldKeepRestartPolicy(c *check.C) { // Cannot port to Windows - does not support signals int the same way as Linux does testRequires(c, DaemonIsLinux) - out, _ := dockerCmd(c, "run", "-d", "--stop-signal=CONT", "busybox", "top") + out, _ := dockerCmd(c, "run", "-d", "--stop-signal=CONT", "--restart=always", "busybox", "top") cid := strings.TrimSpace(out) c.Assert(waitRun(cid), check.IsNil)