From 64df41755a26c62f7bb55bd1b28ef7efd814f703 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 5 Jan 2022 10:46:49 -0500 Subject: Change Tests to ignore missing containers when removing --all Fixes: https://github.com/containers/podman/issues/12740 Signed-off-by: Daniel J Walsh --- test/system/180-blkio.bats | 2 +- test/system/helpers.bash | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/system/180-blkio.bats b/test/system/180-blkio.bats index 68449681a..7999c9ec5 100644 --- a/test/system/180-blkio.bats +++ b/test/system/180-blkio.bats @@ -8,7 +8,7 @@ load helpers function teardown() { lofile=${PODMAN_TMPDIR}/disk.img if [ -f ${lofile} ]; then - run_podman '?' rm -t 0 --all --force + run_podman '?' rm -t 0 --all --force --ignore while read path dev; do if [[ "$path" == "$lofile" ]]; then diff --git a/test/system/helpers.bash b/test/system/helpers.bash index 415c9010e..8f6033309 100644 --- a/test/system/helpers.bash +++ b/test/system/helpers.bash @@ -56,7 +56,7 @@ fi # Setup helper: establish a test environment with exactly the images needed function basic_setup() { # Clean up all containers - run_podman rm -t 0 --all --force + run_podman rm -t 0 --all --force --ignore # ...including external (buildah) ones run_podman ps --all --external --format '{{.ID}} {{.Names}}' @@ -109,8 +109,8 @@ function basic_setup() { # Basic teardown: remove all pods and containers function basic_teardown() { echo "# [teardown]" >&2 - run_podman '?' pod rm -t 0 --all --force - run_podman '?' rm -t 0 --all --force + run_podman '?' pod rm -t 0 --all --force --ignore + run_podman '?' rm -t 0 --all --force --ignore command rm -rf $PODMAN_TMPDIR } -- cgit v1.2.3-54-g00ecf