This test tries to pull all the tags in the busybox repo and looks to see
if there were more than two images pulled. This was failing on
p/z due to the recent change to manifest lists, where one of the busybox
tags didn't have a p/z manifest in it's manifest list.
This error seems fine to me, so I changed the test to see if pull fails,
it fails with the "manifest not found" error.
Also switched from busybox -> alpine, because it has significantly less tags,
and the images are close in size.
Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
| ... | ... |
@@ -1825,7 +1825,7 @@ func (s *DockerDaemonSuite) TestDaemonNoSpaceLeftOnDeviceError(c *check.C) {
|
| 1825 | 1825 |
defer s.d.Stop(c) |
| 1826 | 1826 |
|
| 1827 | 1827 |
// pull a repository large enough to fill the mount point |
| 1828 |
- pullOut, err := s.d.Cmd("pull", "registry:2")
|
|
| 1828 |
+ pullOut, err := s.d.Cmd("pull", "debian:stretch")
|
|
| 1829 | 1829 |
c.Assert(err, checker.NotNil, check.Commentf(pullOut)) |
| 1830 | 1830 |
c.Assert(pullOut, checker.Contains, "no space left on device") |
| 1831 | 1831 |
} |
| ... | ... |
@@ -3,7 +3,6 @@ package main |
| 3 | 3 |
import ( |
| 4 | 4 |
"fmt" |
| 5 | 5 |
"regexp" |
| 6 |
- "runtime" |
|
| 7 | 6 |
"strings" |
| 8 | 7 |
"sync" |
| 9 | 8 |
"time" |
| ... | ... |
@@ -194,30 +193,26 @@ func (s *DockerHubPullSuite) TestPullScratchNotAllowed(c *check.C) {
|
| 194 | 194 |
// results in more images than a naked pull. |
| 195 | 195 |
func (s *DockerHubPullSuite) TestPullAllTagsFromCentralRegistry(c *check.C) {
|
| 196 | 196 |
testRequires(c, DaemonIsLinux) |
| 197 |
- s.Cmd(c, "pull", "busybox") |
|
| 198 |
- outImageCmd := s.Cmd(c, "images", "busybox") |
|
| 197 |
+ s.Cmd(c, "pull", "dockercore/engine-pull-all-test-fixture") |
|
| 198 |
+ outImageCmd := s.Cmd(c, "images", "dockercore/engine-pull-all-test-fixture") |
|
| 199 | 199 |
splitOutImageCmd := strings.Split(strings.TrimSpace(outImageCmd), "\n") |
| 200 | 200 |
c.Assert(splitOutImageCmd, checker.HasLen, 2) |
| 201 | 201 |
|
| 202 |
- s.Cmd(c, "pull", "--all-tags=true", "busybox") |
|
| 203 |
- outImageAllTagCmd := s.Cmd(c, "images", "busybox") |
|
| 202 |
+ s.Cmd(c, "pull", "--all-tags=true", "dockercore/engine-pull-all-test-fixture") |
|
| 203 |
+ outImageAllTagCmd := s.Cmd(c, "images", "dockercore/engine-pull-all-test-fixture") |
|
| 204 | 204 |
linesCount := strings.Count(outImageAllTagCmd, "\n") |
| 205 | 205 |
c.Assert(linesCount, checker.GreaterThan, 2, check.Commentf("pulling all tags should provide more than two images, got %s", outImageAllTagCmd))
|
| 206 | 206 |
|
| 207 |
- // Verify that the line for 'busybox:latest' is left unchanged. |
|
| 207 |
+ // Verify that the line for 'dockercore/engine-pull-all-test-fixture:latest' is left unchanged. |
|
| 208 | 208 |
var latestLine string |
| 209 | 209 |
for _, line := range strings.Split(outImageAllTagCmd, "\n") {
|
| 210 |
- if strings.HasPrefix(line, "busybox") && strings.Contains(line, "latest") {
|
|
| 210 |
+ if strings.HasPrefix(line, "dockercore/engine-pull-all-test-fixture") && strings.Contains(line, "latest") {
|
|
| 211 | 211 |
latestLine = line |
| 212 | 212 |
break |
| 213 | 213 |
} |
| 214 | 214 |
} |
| 215 |
+ c.Assert(latestLine, checker.Not(checker.Equals), "", check.Commentf("no entry for dockercore/engine-pull-all-test-fixture:latest found after pulling all tags"))
|
|
| 215 | 216 |
|
| 216 |
- if runtime.GOARCH == "amd64" {
|
|
| 217 |
- c.Assert(latestLine, checker.Not(checker.Equals), "", check.Commentf("no entry for busybox:latest found after pulling all tags"))
|
|
| 218 |
- } else {
|
|
| 219 |
- c.Assert(latestLine, checker.Not(checker.Contains), "", check.Commentf("no matching manifest"))
|
|
| 220 |
- } |
|
| 221 | 217 |
splitLatest := strings.Fields(latestLine) |
| 222 | 218 |
splitCurrent := strings.Fields(splitOutImageCmd[1]) |
| 223 | 219 |
|
| ... | ... |
@@ -233,7 +228,7 @@ func (s *DockerHubPullSuite) TestPullAllTagsFromCentralRegistry(c *check.C) {
|
| 233 | 233 |
splitCurrent[4] = "" |
| 234 | 234 |
splitCurrent[5] = "" |
| 235 | 235 |
|
| 236 |
- c.Assert(splitLatest, checker.DeepEquals, splitCurrent, check.Commentf("busybox:latest was changed after pulling all tags"))
|
|
| 236 |
+ c.Assert(splitLatest, checker.DeepEquals, splitCurrent, check.Commentf("dockercore/engine-pull-all-test-fixture:latest was changed after pulling all tags"))
|
|
| 237 | 237 |
} |
| 238 | 238 |
|
| 239 | 239 |
// TestPullClientDisconnect kills the client during a pull operation and verifies that the operation |