This test was meant to _push_ images, not _pull_ them
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -80,15 +80,13 @@ func testPushMultipleTags(c *testing.T) {
|
| 80 | 80 |
repoTag2 := fmt.Sprintf("%v/dockercli/busybox:t2", privateRegistryURL)
|
| 81 | 81 |
// tag the image and upload it to the private registry |
| 82 | 82 |
dockerCmd(c, "tag", "busybox", repoTag1) |
| 83 |
- |
|
| 84 | 83 |
dockerCmd(c, "tag", "busybox", repoTag2) |
| 85 |
- |
|
| 86 | 84 |
dockerCmd(c, "push", repoName) |
| 87 | 85 |
|
| 88 |
- // Ensure layer list is equivalent for repoTag1 and repoTag2 |
|
| 89 |
- out1, _ := dockerCmd(c, "pull", repoTag1) |
|
| 90 |
- |
|
| 91 | 86 |
imageAlreadyExists := ": Image already exists" |
| 87 |
+ |
|
| 88 |
+ // Ensure layer list is equivalent for repoTag1 and repoTag2 |
|
| 89 |
+ out1, _ := dockerCmd(c, "push", repoTag1) |
|
| 92 | 90 |
var out1Lines []string |
| 93 | 91 |
for _, outputLine := range strings.Split(out1, "\n") {
|
| 94 | 92 |
if strings.Contains(outputLine, imageAlreadyExists) {
|
| ... | ... |
@@ -96,19 +94,14 @@ func testPushMultipleTags(c *testing.T) {
|
| 96 | 96 |
} |
| 97 | 97 |
} |
| 98 | 98 |
|
| 99 |
- out2, _ := dockerCmd(c, "pull", repoTag2) |
|
| 100 |
- |
|
| 99 |
+ out2, _ := dockerCmd(c, "push", repoTag2) |
|
| 101 | 100 |
var out2Lines []string |
| 102 | 101 |
for _, outputLine := range strings.Split(out2, "\n") {
|
| 103 | 102 |
if strings.Contains(outputLine, imageAlreadyExists) {
|
| 104 |
- out1Lines = append(out1Lines, outputLine) |
|
| 103 |
+ out2Lines = append(out2Lines, outputLine) |
|
| 105 | 104 |
} |
| 106 | 105 |
} |
| 107 |
- assert.Equal(c, len(out2Lines), len(out1Lines)) |
|
| 108 |
- |
|
| 109 |
- for i := range out1Lines {
|
|
| 110 |
- assert.Equal(c, out1Lines[i], out2Lines[i]) |
|
| 111 |
- } |
|
| 106 |
+ assert.DeepEqual(c, out1Lines, out2Lines) |
|
| 112 | 107 |
} |
| 113 | 108 |
|
| 114 | 109 |
func (s *DockerRegistrySuite) TestPushMultipleTags(c *testing.T) {
|