-
Notifications
You must be signed in to change notification settings - Fork 1.5k
WIP fix tests part deux #180
Changes from all commits
644a362
8a85c19
e7fe48c
0e4a0fb
e2947c0
22c06ec
da57bb4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -150,8 +150,8 @@ func (s *DockerSuite) TestRmiImageIDForceWithRunningContainersAndMultipleTags(c | |
| dockerCmd(c, "tag", imgID, newTag) | ||
| runSleepingContainerInImage(c, imgID) | ||
|
|
||
| out, _, err := dockerCmdWithError("rmi", "-f", imgID) | ||
| // rmi -f should not delete image with running containers | ||
| out, _, err := dockerCmdWithError("rmi", imgID) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is actually a bug; the change was too wide; see docker/cli#394 (pull request to fix is here: docker/cli#418) |
||
| // rmi should not delete image with running containers | ||
| c.Assert(err, checker.NotNil) | ||
| c.Assert(out, checker.Contains, "(cannot be forced) - image is being used by running container") | ||
| } | ||
|
|
@@ -243,7 +243,7 @@ func (s *DockerSuite) TestRmiContainerImageNotFound(c *check.C) { | |
| dockerCmd(c, "rmi", "-f", imageIds[1]) | ||
|
|
||
| // Try to remove the image of the running container and see if it fails as expected. | ||
| out, _, err := dockerCmdWithError("rmi", "-f", imageIds[0]) | ||
| out, _, err := dockerCmdWithError("rmi", imageIds[0]) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here |
||
| // The image of the running container should not be removed. | ||
| c.Assert(err, checker.NotNil) | ||
| c.Assert(out, checker.Contains, "image is being used by running container", check.Commentf("out: %s", out)) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1730,18 +1730,13 @@ func (s *DockerSwarmSuite) TestSwarmServicePsMultipleServiceIDs(c *check.C) { | |
|
|
||
| // Name Prefix | ||
| out, err = d.Cmd("service", "ps", "to") | ||
| c.Assert(err, checker.IsNil) | ||
| c.Assert(out, checker.Contains, name1+".1") | ||
| c.Assert(out, checker.Contains, name1+".2") | ||
| c.Assert(out, checker.Contains, name1+".3") | ||
| c.Assert(out, checker.Contains, name2+".1") | ||
| c.Assert(out, checker.Contains, name2+".2") | ||
| c.Assert(out, checker.Contains, name2+".3") | ||
| c.Assert(err, checker.NotNil) | ||
| c.Assert(out, checker.Contains, "no such service: to") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alternatively, use the test I wrote at the time of the PR, but which could not be merged upstream due to not being able to update the CLI; moby/moby@4242aec That test also verifies the new behaviour |
||
|
|
||
| // Name Prefix (no hit) | ||
| out, err = d.Cmd("service", "ps", "noname") | ||
| c.Assert(err, checker.NotNil) | ||
| c.Assert(out, checker.Contains, "no such services: noname") | ||
| c.Assert(out, checker.Contains, "no such service: noname") | ||
|
|
||
| out, err = d.Cmd("service", "ps", id1) | ||
| c.Assert(err, checker.IsNil) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps this should be separate from the other changes; this is a back port of moby/moby@7a53991 (moby/moby#34275) - "Fix panic in hijack"