Skip to content

Commit

Permalink
use an override file to change the backend service image use for --qu…
Browse files Browse the repository at this point in the history
…iet-pull e2e test

Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
  • Loading branch information
glours committed Feb 21, 2024
1 parent d10a179 commit 19f5e67
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/e2e/compose_run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,12 @@ func TestLocalComposeRun(t *testing.T) {
})

t.Run("--quiet-pull", func(t *testing.T) {
res := c.RunDockerComposeCmd(t, "-f", "./fixtures/run-test/compose.yaml", "down", "--rmi", "all")
res := c.RunDockerComposeCmd(t, "-f", "./fixtures/run-test/compose.yaml",
"-f", "./fixtures/run-test/override-back-image.yaml", "down", "--rmi", "all")
res.Assert(t, icmd.Success)

res = c.RunDockerComposeCmd(t, "-f", "./fixtures/run-test/compose.yaml", "run", "--quiet-pull", "back")
res = c.RunDockerComposeCmd(t, "-f", "./fixtures/run-test/compose.yaml",
"-f", "./fixtures/run-test/override-back-image.yaml", "run", "--quiet-pull", "back")
assert.Assert(t, !strings.Contains(res.Combined(), "Pull complete"), res.Combined())
assert.Assert(t, strings.Contains(res.Combined(), "Pulled"), res.Combined())
})
Expand Down
3 changes: 3 additions & 0 deletions pkg/e2e/fixtures/run-test/override-back-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
services:
backend:
image: busybox

0 comments on commit 19f5e67

Please sign in to comment.