From 5d1587e61e32cc840f06e26c3b80e9d2242a2918 Mon Sep 17 00:00:00 2001 From: Eli Uriegas Date: Wed, 6 Sep 2017 11:30:29 -0700 Subject: [PATCH 1/2] Changes error check form NotNil to IsNil rmi -f always returns a 0 exit code so these tests needed to be changed accordingly. Signed-off-by: Eli Uriegas --- components/engine/integration-cli/docker_cli_rmi_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/engine/integration-cli/docker_cli_rmi_test.go b/components/engine/integration-cli/docker_cli_rmi_test.go index 52c8837d28..2c6829925a 100644 --- a/components/engine/integration-cli/docker_cli_rmi_test.go +++ b/components/engine/integration-cli/docker_cli_rmi_test.go @@ -152,7 +152,7 @@ func (s *DockerSuite) TestRmiImageIDForceWithRunningContainersAndMultipleTags(c out, _, err := dockerCmdWithError("rmi", "-f", imgID) // rmi -f should not delete image with running containers - c.Assert(err, checker.NotNil) + c.Assert(err, checker.IsNil) c.Assert(out, checker.Contains, "(cannot be forced) - image is being used by running container") } @@ -245,7 +245,7 @@ func (s *DockerSuite) TestRmiContainerImageNotFound(c *check.C) { // Try to remove the image of the running container and see if it fails as expected. out, _, err := dockerCmdWithError("rmi", "-f", imageIds[0]) // The image of the running container should not be removed. - c.Assert(err, checker.NotNil) + c.Assert(err, checker.IsNil) c.Assert(out, checker.Contains, "image is being used by running container", check.Commentf("out: %s", out)) } From b33e8d49d4cdef9446af1d488d43e604fb88f08e Mon Sep 17 00:00:00 2001 From: Eli Uriegas Date: Wed, 6 Sep 2017 13:41:55 -0700 Subject: [PATCH 2/2] Add skip for known failure Signed-off-by: Eli Uriegas --- components/engine/integration-cli/docker_cli_run_unix_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/components/engine/integration-cli/docker_cli_run_unix_test.go b/components/engine/integration-cli/docker_cli_run_unix_test.go index 2176f0b020..26f53ee923 100644 --- a/components/engine/integration-cli/docker_cli_run_unix_test.go +++ b/components/engine/integration-cli/docker_cli_run_unix_test.go @@ -207,6 +207,7 @@ func (s *DockerSuite) TestRunAttachDetachFromFlag(c *check.C) { // TestRunAttachDetachFromInvalidFlag checks attaching and detaching with the escape sequence specified via flags. func (s *DockerSuite) TestRunAttachDetachFromInvalidFlag(c *check.C) { + c.Skip("Known issue https://github.com/docker/cli/issues/380") name := "attach-detach" dockerCmd(c, "run", "--name", name, "-itd", "busybox", "top") c.Assert(waitRun(name), check.IsNil)