Merge pull request #224 from seemethere/fix_integration_tests_1709

[17.09] Changes error check form NotNil to IsNil
This commit is contained in:
Andrew Hsu
2017-09-06 15:18:32 -07:00
committed by GitHub
2 changed files with 3 additions and 2 deletions
@@ -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))
}
@@ -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)