mirror of
https://github.com/containers/podman.git
synced 2025-05-21 00:56:36 +08:00
Merge pull request #12750 from rhatdan/error
Change Tests to ignore missing containers when removing --all
This commit is contained in:
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user