From e6fce00ec83df2f23523b836f647b8f3df97953f Mon Sep 17 00:00:00 2001 From: Jintao Zhang Date: Tue, 3 Sep 2019 07:12:58 +0800 Subject: [PATCH] TestCase: use `icmd.RunCmd` instead `icmd.StartCmd` Use `cli.Docker` instead `dockerCmdWithResult`. Signed-off-by: Jintao Zhang --- integration-cli/docker_cli_run_test.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/integration-cli/docker_cli_run_test.go b/integration-cli/docker_cli_run_test.go index 6bbcb1145c..46e731a609 100644 --- a/integration-cli/docker_cli_run_test.go +++ b/integration-cli/docker_cli_run_test.go @@ -1792,16 +1792,14 @@ func (s *DockerSuite) TestRunExitOnStdinClose(c *check.C) { func (s *DockerSuite) TestRunInteractiveWithRestartPolicy(c *check.C) { name := "test-inter-restart" - result := icmd.StartCmd(icmd.Cmd{ + result := icmd.RunCmd(icmd.Cmd{ Command: []string{dockerBinary, "run", "-i", "--name", name, "--restart=always", "busybox", "sh"}, Stdin: bytes.NewBufferString("exit 11"), }) - assert.NilError(c, result.Error) defer func() { - dockerCmdWithResult("stop", name).Assert(c, icmd.Success) + cli.Docker(cli.Args("stop", name)).Assert(c, icmd.Success) }() - result = icmd.WaitOnCmd(60*time.Second, result) result.Assert(c, icmd.Expected{ExitCode: 11}) }