Skip to content

Commit

Permalink
test/e2e: do not use apk in builds
Browse files Browse the repository at this point in the history
As far as I can tell there is no reason to use apk in these tests. They
just build an image and check for it and never use the installed binary.
Network calls are always unstable and therefore should be avoided when
possible, this ensures no/less flakes.

Fixes containers#16391

Signed-off-by: Paul Holzinger <[email protected]>
  • Loading branch information
Luap99 committed Nov 3, 2022
1 parent 6428ff1 commit 4174901
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/e2e/images_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ var _ = Describe("Podman images", func() {

It("podman images filter before image", func() {
dockerfile := `FROM quay.io/libpod/alpine:latest
RUN apk update && apk add strace
RUN echo hello > /hello
`
podmanTest.BuildImage(dockerfile, "foobar.com/before:latest", "false")
result := podmanTest.Podman([]string{"images", "-q", "-f", "before=foobar.com/before:latest"})
Expand Down
2 changes: 0 additions & 2 deletions test/e2e/play_build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,11 @@ status: {}

var playBuildFile = `
FROM quay.io/libpod/alpine_nginx:latest
RUN apk update && apk add strace
LABEL homer=dad
COPY copyfile /copyfile
`
var prebuiltImage = `
FROM quay.io/libpod/alpine_nginx:latest
RUN apk update && apk add strace
LABEL marge=mom
`

Expand Down
4 changes: 2 additions & 2 deletions test/e2e/prune_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
var pruneImage = fmt.Sprintf(`
FROM %s
LABEL RUN podman --version
RUN apk update
RUN apk add bash`, ALPINE)
RUN echo hello > /hello
RUN echo hello2 > /hello2`, ALPINE)

var emptyPruneImage = `
FROM scratch
Expand Down

0 comments on commit 4174901

Please sign in to comment.