mirror of
https://github.com/containers/podman.git
synced 2025-05-22 09:36:57 +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() {
|
function teardown() {
|
||||||
lofile=${PODMAN_TMPDIR}/disk.img
|
lofile=${PODMAN_TMPDIR}/disk.img
|
||||||
if [ -f ${lofile} ]; then
|
if [ -f ${lofile} ]; then
|
||||||
run_podman '?' rm -t 0 --all --force
|
run_podman '?' rm -t 0 --all --force --ignore
|
||||||
|
|
||||||
while read path dev; do
|
while read path dev; do
|
||||||
if [[ "$path" == "$lofile" ]]; then
|
if [[ "$path" == "$lofile" ]]; then
|
||||||
|
@ -56,7 +56,7 @@ fi
|
|||||||
# Setup helper: establish a test environment with exactly the images needed
|
# Setup helper: establish a test environment with exactly the images needed
|
||||||
function basic_setup() {
|
function basic_setup() {
|
||||||
# Clean up all containers
|
# Clean up all containers
|
||||||
run_podman rm -t 0 --all --force
|
run_podman rm -t 0 --all --force --ignore
|
||||||
|
|
||||||
# ...including external (buildah) ones
|
# ...including external (buildah) ones
|
||||||
run_podman ps --all --external --format '{{.ID}} {{.Names}}'
|
run_podman ps --all --external --format '{{.ID}} {{.Names}}'
|
||||||
@ -109,8 +109,8 @@ function basic_setup() {
|
|||||||
# Basic teardown: remove all pods and containers
|
# Basic teardown: remove all pods and containers
|
||||||
function basic_teardown() {
|
function basic_teardown() {
|
||||||
echo "# [teardown]" >&2
|
echo "# [teardown]" >&2
|
||||||
run_podman '?' pod rm -t 0 --all --force
|
run_podman '?' pod rm -t 0 --all --force --ignore
|
||||||
run_podman '?' rm -t 0 --all --force
|
run_podman '?' rm -t 0 --all --force --ignore
|
||||||
|
|
||||||
command rm -rf $PODMAN_TMPDIR
|
command rm -rf $PODMAN_TMPDIR
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user