Skip to content

Commit e24d274

Browse files
Fix breaking TestComposePull test case
Signed-off-by: Vedant Koditkar <[email protected]>
1 parent 89dfb91 commit e24d274

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

pkg/e2e/compose_test.go

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,28 @@ func TestComposePull(t *testing.T) {
127127
res := c.RunDockerOrExitError("compose", "--project-directory", "fixtures/simple-composefile", "pull")
128128
output := res.Combined()
129129

130-
assert.Assert(t, strings.Contains(output, "simple Pulled"))
131-
assert.Assert(t, strings.Contains(output, "another Pulled"))
130+
expected := []string{
131+
"Skipped - No image to be pulled",
132+
"Skipped - Image is already present locally",
133+
"Skipped - Image is already being pulled by",
134+
"simple Pulled",
135+
"another Pulled",
136+
}
137+
138+
assert.Assert(t, contains(output, expected))
139+
}
140+
141+
func contains(str string, array []string) bool {
142+
found := false
143+
144+
for _, val := range array {
145+
if strings.Contains(str, val) {
146+
found = true
147+
break
148+
}
149+
}
150+
151+
return found
132152
}
133153

134154
func TestDownComposefileInParentFolder(t *testing.T) {

0 commit comments

Comments
 (0)