summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-08-19 21:06:04 +0200
committerGitHub <noreply@github.com>2019-08-19 21:06:04 +0200
commit33906a4c4013bfe12f058526ad0e3b697d2ec033 (patch)
tree71d5d3bbccc7e5ea8de8bf7074a7e0651effd40c /test
parentd23639aa4d24278648a2ba5532143d47464a3d7d (diff)
parentcb4804de388c6c3a1b7358b83d81af1921b579d2 (diff)
downloadpodman-33906a4c4013bfe12f058526ad0e3b697d2ec033.tar.gz
podman-33906a4c4013bfe12f058526ad0e3b697d2ec033.tar.bz2
podman-33906a4c4013bfe12f058526ad0e3b697d2ec033.zip
Merge pull request #3852 from edsantiago/bats
Flake fix: build test timeout
Diffstat (limited to 'test')
-rw-r--r--test/system/070-build.bats16
1 files changed, 14 insertions, 2 deletions
diff --git a/test/system/070-build.bats b/test/system/070-build.bats
index 5ef84e9b8..a9d2ed1b7 100644
--- a/test/system/070-build.bats
+++ b/test/system/070-build.bats
@@ -22,12 +22,24 @@ RUN apk add nginx
RUN echo $rand_content > /$rand_filename
EOF
- run_podman build -t build_test --format=docker $tmpdir
+ # The 'apk' command can take a long time to fetch files; bump timeout
+ PODMAN_TIMEOUT=240 run_podman build -t build_test --format=docker $tmpdir
is "$output" ".*STEP 4: COMMIT" "COMMIT seen in log"
run_podman run --rm build_test cat /$rand_filename
is "$output" "$rand_content" "reading generated file in image"
- run_podman rmi build_test
+ run_podman rmi -f build_test
}
+
+function teardown() {
+ # A timeout or other error in 'build' can leave behind stale images
+ # that podman can't even see and which will cascade into subsequent
+ # test failures. Try a last-ditch force-rm in cleanup, ignoring errors.
+ run_podman '?' rm -a -f
+ run_podman '?' rmi -f build_test
+
+ basic_teardown
+}
+
# vim: filetype=sh