From 417490128338aeaca7c1c1c0c2ef2dbdfcfadb48 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Thu, 3 Nov 2022 17:32:49 +0100 Subject: [PATCH] test/e2e: do not use apk in builds 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 #16391 Signed-off-by: Paul Holzinger --- test/e2e/images_test.go | 2 +- test/e2e/play_build_test.go | 2 -- test/e2e/prune_test.go | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/test/e2e/images_test.go b/test/e2e/images_test.go index 2473ec59ee..3af498c9a4 100644 --- a/test/e2e/images_test.go +++ b/test/e2e/images_test.go @@ -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"}) diff --git a/test/e2e/play_build_test.go b/test/e2e/play_build_test.go index 83ce98d677..16f40babb4 100644 --- a/test/e2e/play_build_test.go +++ b/test/e2e/play_build_test.go @@ -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 ` diff --git a/test/e2e/prune_test.go b/test/e2e/prune_test.go index e91569231e..c5a14d0f7b 100644 --- a/test/e2e/prune_test.go +++ b/test/e2e/prune_test.go @@ -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