From 963d19c759c843a2cdb853a508dbe6a4db8c87cf Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Wed, 24 Feb 2021 14:24:26 -0700 Subject: System test cleanup - cp test: clean up stray image - build test: add workaround for #9567 (ultra-slow ubuntu). We're seeing CI flakes (timeouts) due to ubuntu 2004 being absurdly slow. Workaround: double our timeout on one specific test when ubuntu + remote. - build test: clean up new copy-from test (from #9275). The test was copy-pasted from buildah system tests, without really adapting for podman environment (e.g. it was using images that we don't use here, and would cause pulls, which will cause flakes). Rewrite test so it references only $IMAGE, remove some confusing/unnecessary stuff, selectively run parts of it even when rootless or remote, and add a test to confirm that copy-from succeeded. - load test: add error-message test to new load-invalid (#9672). Basically, make sure the command fails for the right reason. - play test (kube): use $IMAGE, not alpine; and add pause-image cleanup to teardown() - apiv2 mounts test: add a maintainability comment in a tricky section of code; and tighten up the mount point test. Signed-off-by: Ed Santiago --- test/system/700-play.bats | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'test/system/700-play.bats') diff --git a/test/system/700-play.bats b/test/system/700-play.bats index e7904f59f..8fa96741c 100644 --- a/test/system/700-play.bats +++ b/test/system/700-play.bats @@ -5,6 +5,20 @@ load helpers +# This is a long ugly way to clean up pods and remove the pause image +function teardown() { + run_podman pod rm -f -a + run_podman rm -f -a + run_podman image list --format '{{.ID}} {{.Repository}}' + while read id name; do + if [[ "$name" =~ /pause ]]; then + run_podman rmi $id + fi + done <<<"$output" + + basic_teardown +} + testYaml=" apiVersion: v1 kind: Pod @@ -24,7 +38,7 @@ spec: value: xterm - name: container value: podman - image: quay.io/libpod/alpine:latest + image: $IMAGE name: test resources: {} securityContext: -- cgit v1.2.3-54-g00ecf