Skip to content

Commit eadc204

Browse files
test: fix pull failure assertion for Docker v29
The error message comes now from containerd. Signed-off-by: Ricardo Branco <rbranco@suse.de>
1 parent 8b769ba commit eadc204

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

pkg/e2e/pull_test.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,15 @@ func TestComposePull(t *testing.T) {
6666

6767
t.Run("Verify pull failure", func(t *testing.T) {
6868
res := c.RunDockerComposeCmdNoCheck(t, "--project-directory", "fixtures/compose-pull/unknown-image", "pull")
69-
res.Assert(t, icmd.Expected{ExitCode: 1, Err: "pull access denied for does_not_exists"})
69+
output := res.Combined()
70+
71+
errMsg := "pull access denied for does_not_exists"
72+
if !strings.Contains(output, errMsg) {
73+
// containerd returns:
74+
// failed to resolve reference "docker.io/library/does_not_exists:latest": docker.io/library/does_not_exists:latest: not found
75+
errMsg = "does_not_exists:latest: not found"
76+
}
77+
res.Assert(t, icmd.Expected{ExitCode: 1, Err: errMsg})
7078
})
7179

7280
t.Run("Verify ignore pull failure", func(t *testing.T) {

0 commit comments

Comments
 (0)