Merge pull request #12750 from rhatdan/error

Change Tests to ignore missing containers when removing --all
This commit is contained in:
OpenShift Merge Robot
2022-01-05 18:10:37 +01:00
committed by GitHub
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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
}