summaryrefslogtreecommitdiff
path: root/test/system/helpers.bash
diff options
context:
space:
mode:
Diffstat (limited to 'test/system/helpers.bash')
-rw-r--r--test/system/helpers.bash8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/system/helpers.bash b/test/system/helpers.bash
index 4591c9015..73cf1e5b2 100644
--- a/test/system/helpers.bash
+++ b/test/system/helpers.bash
@@ -34,6 +34,14 @@ function basic_setup() {
# Clean up all containers
run_podman rm --all --force
+ # ...including external (buildah) ones
+ run_podman ps --all --external --format '{{.ID}} {{.Names}}'
+ for line in "${lines[@]}"; do
+ set $line
+ echo "# setup(): removing stray external container $1 ($2)" >&3
+ run_podman rm $1
+ done
+
# Clean up all images except those desired
found_needed_image=
run_podman images --all --format '{{.Repository}}:{{.Tag}} {{.ID}}'