summaryrefslogtreecommitdiff
path: root/test/system
diff options
context:
space:
mode:
Diffstat (limited to 'test/system')
-rw-r--r--test/system/035-logs.bats6
-rw-r--r--test/system/040-ps.bats2
-rw-r--r--test/system/055-rm.bats4
-rw-r--r--test/system/060-mount.bats6
-rw-r--r--test/system/065-cp.bats63
-rw-r--r--test/system/070-build.bats2
-rw-r--r--test/system/075-exec.bats4
-rw-r--r--test/system/080-pause.bats7
-rw-r--r--test/system/125-import.bats6
-rw-r--r--test/system/150-login.bats2
-rw-r--r--test/system/160-volumes.bats2
-rw-r--r--test/system/200-pod.bats8
-rw-r--r--test/system/220-healthcheck.bats3
-rw-r--r--test/system/250-systemd.bats2
-rw-r--r--test/system/255-auto-update.bats2
-rw-r--r--test/system/410-selinux.bats2
-rw-r--r--test/system/450-interactive.bats4
-rw-r--r--test/system/500-networking.bats26
-rw-r--r--test/system/600-completion.bats2
-rw-r--r--test/system/700-play.bats19
-rw-r--r--test/system/helpers.bash6
21 files changed, 83 insertions, 95 deletions
diff --git a/test/system/035-logs.bats b/test/system/035-logs.bats
index 76ce12b81..44b66676e 100644
--- a/test/system/035-logs.bats
+++ b/test/system/035-logs.bats
@@ -114,7 +114,7 @@ $s_after"
run_podman logs --since $after test
is "$output" "$s_after"
- run_podman rm -f test
+ run_podman rm -t 1 -f test
}
@test "podman logs - since k8s-file" {
@@ -167,7 +167,7 @@ $s_after"
run_podman logs --until $after test
is "$output" "$s_both" "podman logs --until after"
- run_podman rm -f test
+ run_podman rm -t 0 -f test
}
@test "podman logs - until k8s-file" {
@@ -195,7 +195,7 @@ function _log_test_follow() {
$contentB
$contentC" "logs -f on exitted container works"
- run_podman rm -f $cname
+ run_podman rm -t 0 -f $cname
}
@test "podman logs - --follow k8s-file" {
diff --git a/test/system/040-ps.bats b/test/system/040-ps.bats
index 63f57efdc..09a0f8de1 100644
--- a/test/system/040-ps.bats
+++ b/test/system/040-ps.bats
@@ -138,7 +138,7 @@ EOF
is "$output" "Error: container .* is mounted and cannot be removed without using force: container state improper" "podman rm <buildah container> without -f"
# With -f, we can remove it.
- run_podman rm -f "$cid"
+ run_podman rm -t 0 -f "$cid"
run_podman ps --external -a
is "${#lines[@]}" "1" "storage container has been removed"
diff --git a/test/system/055-rm.bats b/test/system/055-rm.bats
index a5770f20f..7fe81c084 100644
--- a/test/system/055-rm.bats
+++ b/test/system/055-rm.bats
@@ -30,7 +30,7 @@ load helpers
is "$output" "Error: cannot remove container $cid as it is running - running or paused containers cannot be removed without force: container state improper" "error message"
# rm -f should succeed
- run_podman rm -f $cid
+ run_podman rm -t 0 -f $cid
}
@test "podman rm container from storage" {
@@ -70,7 +70,7 @@ load helpers
# See https://github.com/containers/podman/issues/3795
@test "podman rm -f" {
rand=$(random_string 30)
- ( sleep 3; run_podman rm -f $rand ) &
+ ( sleep 3; run_podman rm -t 0 -f $rand ) &
run_podman 137 run --name $rand $IMAGE sleep 30
}
diff --git a/test/system/060-mount.bats b/test/system/060-mount.bats
index ba37ea5e1..7addbd88e 100644
--- a/test/system/060-mount.bats
+++ b/test/system/060-mount.bats
@@ -125,8 +125,7 @@ load helpers
run_podman exec $cid find /image-mount/etc/
# Clean up
- run_podman stop -t 0 $cid
- run_podman rm -f $cid
+ run_podman rm -t 0 -f $cid
}
@test "podman run --mount image inspection" {
@@ -148,8 +147,7 @@ load helpers
run_podman inspect --format "{{(index .Mounts 0).RW}}" $cid
is "$output" "true" "inspect data includes image mount source"
- run_podman stop -t 0 $cid
- run_podman rm -f $cid
+ run_podman rm -t 0 -f $cid
}
@test "podman mount external container - basic test" {
diff --git a/test/system/065-cp.bats b/test/system/065-cp.bats
index 38c38d671..780fc6737 100644
--- a/test/system/065-cp.bats
+++ b/test/system/065-cp.bats
@@ -70,7 +70,7 @@ load helpers
"copy into nonexistent path in container"
run_podman kill cpcontainer
- run_podman rm -f cpcontainer
+ run_podman rm -t 0 -f cpcontainer
# CREATED container
while read id dest dest_fullname description; do
@@ -80,7 +80,7 @@ load helpers
run_podman exec cpcontainer cat $dest_fullname
is "$output" "${randomcontent[$id]}" "$description (cp -> ctr:$dest)"
run_podman kill cpcontainer
- run_podman rm -f cpcontainer
+ run_podman rm -t 0 -f cpcontainer
done < <(parse_table "$tests")
run_podman rmi -f $cpimage
@@ -99,7 +99,7 @@ load helpers
run_podman exec cpcontainer cat /tmp/file
is "$output" "${content}" "cp to running container's tmpfs"
run_podman kill cpcontainer
- run_podman rm -f cpcontainer
+ run_podman rm -t 0 -f cpcontainer
# CREATED container (with copy up)
run_podman create --mount type=tmpfs,dst=/tmp --name cpcontainer $IMAGE sleep infinity
@@ -108,7 +108,7 @@ load helpers
run_podman exec cpcontainer cat /tmp/file
is "$output" "${content}" "cp to created container's tmpfs"
run_podman kill cpcontainer
- run_podman rm -f cpcontainer
+ run_podman rm -t 0 -f cpcontainer
}
@@ -124,7 +124,7 @@ load helpers
run_podman exec cpcontainer stat -c "%u" /tmp/hostfile
is "$output" "$userid" "copied file is chowned to the container user"
run_podman kill cpcontainer
- run_podman rm -f cpcontainer
+ run_podman rm -t 0 -f cpcontainer
}
@test "podman cp (-a=false) file from host to container and check ownership" {
@@ -143,7 +143,7 @@ load helpers
run_podman exec cpcontainer stat -c "%u:%g" /tmp/a.txt
is "$output" "1042:1043" "copied file retains uid/gid from the tar"
run_podman kill cpcontainer
- run_podman rm -f cpcontainer
+ run_podman rm -t 0 -f cpcontainer
}
@@ -160,7 +160,7 @@ load helpers
run_podman cp $srcdir/hostfile cpcontainer:/tmp/hostfile
run_podman cp cpcontainer:/tmp/hostfile $srcdir/hostfile1
run_podman kill cpcontainer
- run_podman rm -f cpcontainer
+ run_podman rm -t 0 -f cpcontainer
}
@test "podman cp file from container to host" {
@@ -206,7 +206,7 @@ load helpers
rm $srcdir$dest_fullname
done < <(parse_table "$tests")
run_podman kill cpcontainer
- run_podman rm -f cpcontainer
+ run_podman rm -t 0 -f cpcontainer
# Created container
run_podman create --name cpcontainer --workdir=/srv $cpimage
@@ -219,7 +219,7 @@ load helpers
is "$(< $srcdir$dest_fullname)" "${randomcontent[$id]}" "$description (cp ctr:$src to \$srcdir$dest)"
rm $srcdir$dest_fullname
done < <(parse_table "$tests")
- run_podman rm -f cpcontainer
+ run_podman rm -t 0 -f cpcontainer
run_podman rmi -f $cpimage
}
@@ -281,7 +281,7 @@ load helpers
is "$output" "${randomcontent[$id]}" "$description (cp ctr:$src to /$dest)"
done < <(parse_table "$tests")
run_podman kill cpcontainer ${destcontainers[@]}
- run_podman rm -f cpcontainer ${destcontainers[@]}
+ run_podman rm -t 0 -f cpcontainer ${destcontainers[@]}
# From CREATED container
destcontainers=()
@@ -309,8 +309,7 @@ load helpers
is "$output" "${randomcontent[$id]}" "$description (cp ctr:$src to /$dest)"
done < <(parse_table "$tests")
run_podman kill ${destcontainers[@]}
- run_podman rm -f cpcontainer ${destcontainers[@]}
-
+ run_podman rm -t 0 -f cpcontainer ${destcontainers[@]}
run_podman rmi -f $cpimage
}
@@ -361,7 +360,7 @@ load helpers
is "${lines[1]}" "${randomcontent[1]}" "$description (cp -> ctr:$dest)"
done < <(parse_table "$tests")
run_podman kill cpcontainer
- run_podman rm -f cpcontainer
+ run_podman rm -t 0 -f cpcontainer
# CREATED container
while read src dest dest_fullname description; do
@@ -376,13 +375,13 @@ load helpers
is "${lines[0]}" "${randomcontent[0]}" "$description (cp -> ctr:$dest)"
is "${lines[1]}" "${randomcontent[1]}" "$description (cp -> ctr:$dest)"
run_podman kill cpcontainer
- run_podman rm -f cpcontainer
+ run_podman rm -t 0 -f cpcontainer
done < <(parse_table "$tests")
run_podman create --name cpcontainer --workdir=/srv $cpimage sleep infinity
run_podman 125 cp $srcdir cpcontainer:/etc/os-release
is "$output" "Error: destination must be a directory when copying a directory" "cannot copy directory to file"
- run_podman rm -f cpcontainer
+ run_podman rm -t 0 -f cpcontainer
run_podman rmi -f $cpimage
}
@@ -436,7 +435,7 @@ load helpers
rm -rf $destdir/*
done < <(parse_table "$tests")
run_podman kill cpcontainer
- run_podman rm -f cpcontainer
+ run_podman rm -t 0 -f cpcontainer
# CREATED container
run_podman create --name cpcontainer --workdir=/srv $cpimage
@@ -459,7 +458,7 @@ load helpers
touch $destdir/testfile
run_podman 125 cp cpcontainer:/etc/ $destdir/testfile
is "$output" "Error: destination must be a directory when copying a directory" "cannot copy directory to file"
- run_podman rm -f cpcontainer
+ run_podman rm -t 0 -f cpcontainer
run_podman rmi -f $cpimage
}
@@ -526,7 +525,7 @@ ${randomcontent[1]}" "$description"
${randomcontent[1]}" "$description"
done < <(parse_table "$tests")
run_podman kill cpcontainer ${destcontainers[@]}
- run_podman rm -f cpcontainer ${destcontainers[@]}
+ run_podman rm -t 0 -f cpcontainer ${destcontainers[@]}
# From CREATED container
destcontainers=()
@@ -563,7 +562,7 @@ ${randomcontent[1]}" "$description"
done < <(parse_table "$tests")
run_podman kill ${destcontainers[@]}
- run_podman rm -f cpcontainer ${destcontainers[@]}
+ run_podman rm -t 0 -f cpcontainer ${destcontainers[@]}
run_podman rmi -f $cpimage
}
@@ -595,7 +594,7 @@ ${randomcontent[1]}" "$description"
is "${lines[1]}" "${randomcontent[1]}" "eval symlink - running container"
run_podman kill cpcontainer
- run_podman rm -f cpcontainer
+ run_podman rm -t 0 -f cpcontainer
run rm -rf $srcdir/dest
# CREATED container
@@ -604,7 +603,7 @@ ${randomcontent[1]}" "$description"
run cat $destdir/dest/containerfile0 $destdir/dest/containerfile1
is "${lines[0]}" "${randomcontent[0]}" "eval symlink - created container"
is "${lines[1]}" "${randomcontent[1]}" "eval symlink - created container"
- run_podman rm -f cpcontainer
+ run_podman rm -t 0 -f cpcontainer
run_podman rmi $cpimage
}
@@ -638,7 +637,7 @@ ${randomcontent[1]}" "$description"
run ls $volume1_mount
is "$output" ""
- run_podman rm -f cpcontainer
+ run_podman rm -t 0 -f cpcontainer
run_podman volume rm $volume1 $volume2
}
@@ -658,7 +657,7 @@ ${randomcontent[1]}" "$description"
run_podman cp $srcdir/hostfile cpcontainer:/tmp/volume/mount
is "$(< $mountdir/hostfile)" "This file should be in the mount"
- run_podman rm -f cpcontainer
+ run_podman rm -t 0 -f cpcontainer
run_podman volume rm $volume
}
@@ -684,7 +683,7 @@ ${randomcontent[1]}" "$description"
# cp no longer supports wildcarding
run_podman 125 cp 'cpcontainer:/tmp/*' $dstdir
- run_podman rm -f cpcontainer
+ run_podman rm -t 0 -f cpcontainer
}
@@ -708,7 +707,7 @@ ${randomcontent[1]}" "$description"
# make sure there are no files in dstdir
is "$(/bin/ls -1 $dstdir)" "" "incorrectly copied symlink from host"
- run_podman rm -f cpcontainer
+ run_podman rm -t 0 -f cpcontainer
}
@@ -732,7 +731,7 @@ ${randomcontent[1]}" "$description"
# make sure there are no files in dstdir
is "$(/bin/ls -1 $dstdir)" "" "incorrectly copied symlink from host"
- run_podman rm -f cpcontainer
+ run_podman rm -t 0 -f cpcontainer
}
@@ -752,7 +751,7 @@ ${randomcontent[1]}" "$description"
# dstdir must be empty
is "$(/bin/ls -1 $dstdir)" "" "incorrectly copied symlink from host"
- run_podman rm -f cpcontainer
+ run_podman rm -t 0 -f cpcontainer
}
@@ -810,7 +809,7 @@ ${randomcontent[1]}" "$description"
is "$output" "$rand_content3" "cp creates file named x"
run_podman kill cpcontainer
- run_podman rm -f cpcontainer
+ run_podman rm -t 0 -f cpcontainer
}
@@ -848,7 +847,7 @@ ${randomcontent[1]}" "$description"
is "$output" "$rand_content" "Contents of file copied into container"
run_podman kill cpcontainer
- run_podman rm -f cpcontainer
+ run_podman rm -t 0 -f cpcontainer
}
@@ -897,7 +896,7 @@ ${randomcontent[1]}" "$description"
is "$output" 'Error: destination must be a directory when copying from stdin'
run_podman kill cpcontainer
- run_podman rm -f cpcontainer
+ run_podman rm -t 0 -f cpcontainer
}
@@ -945,12 +944,12 @@ ${randomcontent[1]}" "$description"
is "$(< $srcdir/tmp/empty.txt)" ""
run_podman kill cpcontainer
- run_podman rm -f cpcontainer
+ run_podman rm -t 0 -f cpcontainer
}
function teardown() {
# In case any test fails, clean up the container we left behind
- run_podman rm -f cpcontainer
+ run_podman rm -t 0 f cpcontainer
basic_teardown
}
diff --git a/test/system/070-build.bats b/test/system/070-build.bats
index 4e89e299a..d3dc14d81 100644
--- a/test/system/070-build.bats
+++ b/test/system/070-build.bats
@@ -969,7 +969,7 @@ function teardown() {
# A timeout or other error in 'build' can leave behind stale images
# that podman can't even see and which will cascade into subsequent
# test failures. Try a last-ditch force-rm in cleanup, ignoring errors.
- run_podman '?' rm -a -f
+ run_podman '?' rm -t 0 -a -f
run_podman '?' rmi -f build_test
# Many of the tests above leave interim layers behind. Clean them up.
diff --git a/test/system/075-exec.bats b/test/system/075-exec.bats
index de767a1e8..42954e5ec 100644
--- a/test/system/075-exec.bats
+++ b/test/system/075-exec.bats
@@ -53,7 +53,7 @@ load helpers
is "$(check_exec_pid)" "" "there isn't any exec pid hash file leak"
run_podman stop --time 1 $cid
- run_podman rm -f $cid
+ run_podman rm -t 0 -f $cid
}
# Issue #4785 - piping to exec statement - fixed in #4818
@@ -126,7 +126,7 @@ load helpers
is "$output" "" "exec output is identical with the file"
# Clean up
- run_podman rm -f $cid
+ run_podman rm -t 0 -f $cid
}
# vim: filetype=sh
diff --git a/test/system/080-pause.bats b/test/system/080-pause.bats
index 2314324a9..857c8bbf4 100644
--- a/test/system/080-pause.bats
+++ b/test/system/080-pause.bats
@@ -48,8 +48,7 @@ load helpers
# would imply that the container never paused.
is "$max_delta" "[3456]" "delta t between paused and restarted"
- run_podman stop -t 0 $cname
- run_podman rm -f $cname
+ run_podman rm -t 0 -f $cname
# Pause/unpause on nonexistent name or id - these should all fail
run_podman 125 pause $cid
@@ -75,7 +74,7 @@ load helpers
run_podman ps --format '{{.ID}} {{.Names}} {{.Status}}'
is "$output" "${cid:0:12} $cname Up.*" "podman ps on resumed container"
run_podman stop -t 0 $cname
- run_podman rm -f $cname
- run_podman rm -f notrunning
+ run_podman rm -t 0 -f $cname
+ run_podman rm -t 0 -f notrunning
}
# vim: filetype=sh
diff --git a/test/system/125-import.bats b/test/system/125-import.bats
index 5b8d84a2f..743da85b2 100644
--- a/test/system/125-import.bats
+++ b/test/system/125-import.bats
@@ -15,7 +15,7 @@ load helpers
run_podman run --name import $IMAGE sh -c "echo ${random_content} > /random.txt"
run_podman export import -o $archive
- run_podman rm -f import
+ run_podman rm -t 0 -f import
# Simple import
run_podman import -q $archive
@@ -71,7 +71,7 @@ EOF
# Export built container as tarball
run_podman export -o $PODMAN_TMPDIR/$b_cnt.tar $b_cnt
- run_podman rm -f $b_cnt
+ run_podman rm -t 0 -f $b_cnt
# Modify tarball contents
tar --delete -f $PODMAN_TMPDIR/$b_cnt.tar tmp/testfile1
@@ -102,7 +102,7 @@ EOF
run_podman ps -a --filter name=$a_cnt --format '{{.Status}}'
is "$output" "Exited (33) .*" "Exit by non-TERM/KILL"
- run_podman rm -f $a_cnt
+ run_podman rm -t 0 -f $a_cnt
run_podman rmi $b_img $a_img
}
diff --git a/test/system/150-login.bats b/test/system/150-login.bats
index c003a0409..33b8438bf 100644
--- a/test/system/150-login.bats
+++ b/test/system/150-login.bats
@@ -83,7 +83,7 @@ function setup() {
fi
# Run the registry container.
- run_podman '?' ${PODMAN_LOGIN_ARGS} rm -f registry
+ run_podman '?' ${PODMAN_LOGIN_ARGS} rm -t 0 -f registry
run_podman ${PODMAN_LOGIN_ARGS} run -d \
-p ${PODMAN_LOGIN_REGISTRY_PORT}:5000 \
--name registry \
diff --git a/test/system/160-volumes.bats b/test/system/160-volumes.bats
index c02525e0d..490d635e5 100644
--- a/test/system/160-volumes.bats
+++ b/test/system/160-volumes.bats
@@ -13,7 +13,7 @@ function setup() {
function teardown() {
run_podman '?' rm -a --volumes
- run_podman '?' volume rm -a -f
+ run_podman '?' volume rm -t 0 -a -f
basic_teardown
}
diff --git a/test/system/200-pod.bats b/test/system/200-pod.bats
index 027abf9dc..86f3610ab 100644
--- a/test/system/200-pod.bats
+++ b/test/system/200-pod.bats
@@ -4,8 +4,8 @@ load helpers
# This is a long ugly way to clean up pods and remove the pause image
function teardown() {
- run_podman pod rm -f -a
- run_podman rm -f -a
+ run_podman pod rm -f -t 0 -a
+ run_podman rm -f -t 0 -a
run_podman image list --format '{{.ID}} {{.Repository}}'
while read id name; do
if [[ "$name" =~ /pause ]]; then
@@ -57,7 +57,7 @@ function teardown() {
fi
# Clean up
- run_podman pod rm -f $podid
+ run_podman pod rm -f -t 0 $podid
}
@@ -301,7 +301,7 @@ EOF
# Clean up
run_podman rm $cid
- run_podman pod rm -f mypod
+ run_podman pod rm -t 0 -f mypod
run_podman rmi $infra_image
}
diff --git a/test/system/220-healthcheck.bats b/test/system/220-healthcheck.bats
index 28fe8eb92..1d4a2ea7e 100644
--- a/test/system/220-healthcheck.bats
+++ b/test/system/220-healthcheck.bats
@@ -108,8 +108,7 @@ Log[-1].Output |
is "$output" "unhealthy" "output from 'podman healthcheck run'"
# Clean up
- run_podman stop -t 0 healthcheck_c
- run_podman rm -f healthcheck_c
+ run_podman rm -t 0 -f healthcheck_c
run_podman rmi healthcheck_i
}
diff --git a/test/system/250-systemd.bats b/test/system/250-systemd.bats
index 4578d9e60..3607c1028 100644
--- a/test/system/250-systemd.bats
+++ b/test/system/250-systemd.bats
@@ -156,7 +156,7 @@ function service_cleanup() {
is "$output" ".*Restart=on-failure.*" "on-failure:xx is parsed correclty"
is "$output" ".*StartLimitBurst=42.*" "on-failure:xx is parsed correctly"
- run_podman rm -f $cname $cname2 $cname3
+ run_podman rm -t 0 -f $cname $cname2 $cname3
}
function set_listen_env() {
diff --git a/test/system/255-auto-update.bats b/test/system/255-auto-update.bats
index bb4b5c13f..99211f304 100644
--- a/test/system/255-auto-update.bats
+++ b/test/system/255-auto-update.bats
@@ -78,7 +78,7 @@ function generate_service() {
(cd $UNIT_DIR; run_podman generate systemd --new --files --name $cname)
echo "container-$cname" >> $SNAME_FILE
- run_podman rm -f $cname
+ run_podman rm -t 0 -f $cname
systemctl daemon-reload
systemctl start container-$cname
diff --git a/test/system/410-selinux.bats b/test/system/410-selinux.bats
index 7f7f23000..ed9e73a3e 100644
--- a/test/system/410-selinux.bats
+++ b/test/system/410-selinux.bats
@@ -105,7 +105,7 @@ function check_label() {
"'podman inspect' preserves all --security-opts"
run_podman exec myc touch /stop
- run_podman rm -f myc
+ run_podman rm -t 0 -f myc
}
# Sharing context between two containers not in a pod
diff --git a/test/system/450-interactive.bats b/test/system/450-interactive.bats
index 55c2afcd4..b817fe1a7 100644
--- a/test/system/450-interactive.bats
+++ b/test/system/450-interactive.bats
@@ -61,7 +61,7 @@ function teardown() {
run_podman run -it --name mystty $IMAGE stty size <$PODMAN_TEST_PTY
is "$output" "$rows $cols$CR" "stty under podman run reads the correct dimensions"
- run_podman rm -f mystty
+ run_podman rm -t 0 -f mystty
# FIXME: the checks below are flaking a lot (see #10710).
@@ -70,7 +70,7 @@ function teardown() {
# run_podman exec -it mystty stty size <$PODMAN_TEST_PTY
# is "$output" "$rows $cols" "stty under podman exec reads the correct dimensions"
#
-# run_podman rm -f mystty
+# run_podman rm -t 0 -f mystty
}
diff --git a/test/system/500-networking.bats b/test/system/500-networking.bats
index 29fa309f3..cb73cf24d 100644
--- a/test/system/500-networking.bats
+++ b/test/system/500-networking.bats
@@ -192,9 +192,9 @@ load helpers
is "$output" "Error: network name $mynetname already used: network already exists" \
"Trying to create an already-existing network"
- run_podman rm $cid
+ run_podman rm -t 0 -f $cid
run_podman network rm $mynetname
- run_podman 1 network rm $mynetname
+ run_podman 1 network rm -f $mynetname
}
@test "podman network reload" {
@@ -293,13 +293,13 @@ load helpers
is "$output" "$random_1" "curl 127.0.0.1:/index.txt"
# cleanup the container
- run_podman rm -f $cid
+ run_podman rm -t 0 -f $cid
# test that we cannot remove the default network
- run_podman 125 network rm -f $netname
+ run_podman 125 network rm -t 0 -f $netname
is "$output" "Error: default network $netname cannot be removed" "Remove default network"
- run_podman network rm -f $netname2
+ run_podman network rm -t 0 -f $netname2
}
@test "podman rootless cni adds /usr/sbin to PATH" {
@@ -314,7 +314,7 @@ load helpers
PATH=/usr/local/bin:/usr/bin run_podman run --rm --network $mynetname $IMAGE ip addr
is "$output" ".*eth0.*" "Interface eth0 not found in ip addr output"
- run_podman network rm -f $mynetname
+ run_podman network rm -t 0 -f $mynetname
}
@test "podman ipv6 in /etc/resolv.conf" {
@@ -357,7 +357,7 @@ load helpers
die "resolv.conf contains a ipv6 nameserver"
fi
- run_podman network rm -f $netname
+ run_podman network rm -t 0 -f $netname
# ipv6 cni
mysubnet=fd00:4:4:4:4::/64
@@ -372,7 +372,7 @@ load helpers
die "resolv.conf does not contain a ipv6 nameserver"
fi
- run_podman network rm -f $netname
+ run_podman network rm -t 0 -f $netname
}
# Test for https://github.com/containers/podman/issues/10052
@@ -463,9 +463,8 @@ load helpers
is "$output" "$random_1" "curl 127.0.0.1:/index.txt should still work"
# cleanup
- run_podman stop -t 0 $cid $background_cid
- run_podman rm -f $cid $background_cid
- run_podman network rm -f $netname $netname2
+ run_podman rm -t 0 -f $cid $background_cid
+ run_podman network rm -t 0 -f $netname $netname2
}
@test "podman network after restart" {
@@ -538,12 +537,11 @@ load helpers
run curl --retry 2 -s $SERVER/index.txt
is "$output" "$random_1" "curl 127.0.0.1:/index.txt after podman restart"
- run_podman stop -t 0 $cid
- run_podman rm -f $cid
+ run_podman rm -t 0 -f $cid
done
# Cleanup network
- run_podman network rm $netname
+ run_podman network rm -t 0 -f $netname
}
# vim: filetype=sh
diff --git a/test/system/600-completion.bats b/test/system/600-completion.bats
index 5f4610e9e..ac934732e 100644
--- a/test/system/600-completion.bats
+++ b/test/system/600-completion.bats
@@ -299,7 +299,7 @@ function _check_completion_end() {
run_podman image untag $IMAGE $random_image_name:$random_image_tag
for state in created running degraded exited; do
- run_podman pod rm --force $state-$random_pod_name
+ run_podman pod rm -t 0 --force $state-$random_pod_name
done
for state in created running pause exited; do
diff --git a/test/system/700-play.bats b/test/system/700-play.bats
index f41c50e4c..8cf279ada 100644
--- a/test/system/700-play.bats
+++ b/test/system/700-play.bats
@@ -7,8 +7,8 @@ load helpers
# This is a long ugly way to clean up pods and remove the pause image
function teardown() {
- run_podman pod rm -f -a
- run_podman rm -f -a
+ run_podman pod rm -t 0 -f -a
+ run_podman rm -t 0 -f -a
run_podman image list --format '{{.ID}} {{.Repository}}'
while read id name; do
if [[ "$name" =~ /pause ]]; then
@@ -77,8 +77,7 @@ RELABEL="system_u:object_r:container_file_t:s0"
fi
run_podman stop -a -t 0
- run_podman pod stop test_pod
- run_podman pod rm -f test_pod
+ run_podman pod rm -t 0 -f test_pod
}
@test "podman play" {
@@ -92,8 +91,7 @@ RELABEL="system_u:object_r:container_file_t:s0"
fi
run_podman stop -a -t 0
- run_podman pod stop test_pod
- run_podman pod rm -f test_pod
+ run_podman pod rm -t 0 -f test_pod
}
@test "podman play --network" {
@@ -111,8 +109,7 @@ RELABEL="system_u:object_r:container_file_t:s0"
is "$output" "slirp4netns" "network mode slirp4netns is set for the container"
run_podman stop -a -t 0
- run_podman pod stop test_pod
- run_podman pod rm -f test_pod
+ run_podman pod rm -t 0 -f test_pod
run_podman play kube --network none $PODMAN_TMPDIR/test.yaml
run_podman pod inspect --format {{.InfraContainerID}} "${lines[1]}"
@@ -121,8 +118,7 @@ RELABEL="system_u:object_r:container_file_t:s0"
is "$output" "none" "network mode none is set for the container"
run_podman stop -a -t 0
- run_podman pod stop test_pod
- run_podman pod rm -f test_pod
+ run_podman pod rm -t 0 -f test_pod
}
@test "podman play with user from image" {
@@ -165,7 +161,6 @@ _EOF
is "$output" bin "expect container within pod to run as the bin user"
run_podman stop -a -t 0
- run_podman pod stop test_pod
- run_podman pod rm -f test_pod
+ run_podman pod rm -t 0 -f test_pod
run_podman rmi -f userimage:latest
}
diff --git a/test/system/helpers.bash b/test/system/helpers.bash
index 03e1ab82b..97b6db05c 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 --all --force
+ run_podman rm -t 0 --all --force
# ...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 --all --force
- run_podman '?' rm --all --force
+ run_podman '?' pod rm -t 0 --all --force
+ run_podman '?' rm -t 0 --all --force
command rm -rf $PODMAN_TMPDIR
}