1
0
mirror of https://github.com/moby/moby.git synced 2025-07-30 18:23:29 +03:00

Fix tests that depend on clean environment

Signed-off-by: Christopher Crone <christopher.crone@docker.com>
This commit is contained in:
Christopher Crone
2017-09-08 17:16:15 +02:00
parent d622e81af5
commit dc6ddfa841
10 changed files with 228 additions and 48 deletions

View File

@ -407,6 +407,8 @@ func (s *DockerRegistrySuite) TestInspectImageWithDigests(c *check.C) {
}
func (s *DockerRegistrySuite) TestPsListContainersFilterAncestorImageByDigest(c *check.C) {
existingContainers := ExistingContainerIDs(c)
digest, err := setupImage(c)
c.Assert(err, checker.IsNil, check.Commentf("error setting up image"))
@ -438,7 +440,7 @@ func (s *DockerRegistrySuite) TestPsListContainersFilterAncestorImageByDigest(c
// Valid imageReference
out, _ = dockerCmd(c, "ps", "-a", "-q", "--no-trunc", "--filter=ancestor="+imageReference)
checkPsAncestorFilterOutput(c, out, imageReference, expectedIDs)
checkPsAncestorFilterOutput(c, RemoveOutputForExistingElements(out, existingContainers), imageReference, expectedIDs)
}
func (s *DockerRegistrySuite) TestDeleteImageByIDOnlyPulledByDigest(c *check.C) {