Skip to content

Commit

Permalink
Merge pull request moby#18503 from aaronlehmann/test-pull-all-tags
Browse files Browse the repository at this point in the history
Fix flaky test TestPullAllTagsFromCentralRegistry
  • Loading branch information
dmcgowan committed Dec 8, 2015
2 parents 44f709a + d176699 commit e8a0e12
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions integration-cli/docker_cli_pull_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,19 @@ func (s *DockerHubPullSuite) TestPullAllTagsFromCentralRegistry(c *check.C) {
c.Assert(latestLine, checker.Not(checker.Equals), "", check.Commentf("no entry for busybox:latest found after pulling all tags"))
splitLatest := strings.Fields(latestLine)
splitCurrent := strings.Fields(splitOutImageCmd[1])

// Clear relative creation times, since these can easily change between
// two invocations of "docker images". Without this, the test can fail
// like this:
// ... obtained []string = []string{"busybox", "latest", "d9551b4026f0", "27", "minutes", "ago", "1.113", "MB"}
// ... expected []string = []string{"busybox", "latest", "d9551b4026f0", "26", "minutes", "ago", "1.113", "MB"}
splitLatest[3] = ""
splitLatest[4] = ""
splitLatest[5] = ""
splitCurrent[3] = ""
splitCurrent[4] = ""
splitCurrent[5] = ""

c.Assert(splitLatest, checker.DeepEquals, splitCurrent, check.Commentf("busybox:latest was changed after pulling all tags"))
}

Expand Down

0 comments on commit e8a0e12

Please sign in to comment.