From a2352fa3ea0c0bf66a65e6ca1a74dccc5f03fd9c Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Wed, 5 Jun 2024 15:16:02 +0200 Subject: [PATCH] test/system: fix up many tests that do not cleanup All tests should cleanup themselves and not leak stuff. Signed-off-by: Paul Holzinger --- test/system/030-run.bats | 7 ++--- test/system/035-logs.bats | 3 ++ test/system/045-start.bats | 5 ++++ test/system/050-stop.bats | 8 ++++++ test/system/060-mount.bats | 5 ++-- test/system/070-build.bats | 1 + test/system/075-exec.bats | 4 +++ test/system/090-events.bats | 4 ++- test/system/130-kill.bats | 2 ++ test/system/200-pod.bats | 1 + test/system/250-systemd.bats | 4 +++ test/system/252-quadlet.bats | 9 ++++++ test/system/255-auto-update.bats | 1 + test/system/260-sdnotify.bats | 3 ++ test/system/280-update.bats | 2 ++ test/system/410-selinux.bats | 2 +- test/system/450-interactive.bats | 2 +- test/system/500-networking.bats | 2 ++ test/system/505-networking-pasta.bats | 41 ++++++++++++++------------- test/system/520-checkpoint.bats | 2 ++ test/system/700-play.bats | 1 + test/system/710-kube.bats | 1 + 22 files changed, 81 insertions(+), 29 deletions(-) diff --git a/test/system/030-run.bats b/test/system/030-run.bats index 9c38961dff..1d648ea878 100644 --- a/test/system/030-run.bats +++ b/test/system/030-run.bats @@ -37,10 +37,7 @@ echo $rand | 0 | $rand # a way to do so. eval set "$cmd" - # FIXME: The $expected diff -u ${expected} ${logfile} + + run_podman rm -f -t0 logtest } @test "podman logs restarted - k8s-file" { @@ -165,6 +167,7 @@ function _log_test_restarted() { run_podman --events-backend=file logs test run_podman 125 --events-backend=file logs --follow test is "$output" "Error: using --follow with the journald --log-driver but without the journald --events-backend (file) is not supported" "journald logger requires journald eventer" + run_podman rm test } function _log_test_since() { diff --git a/test/system/045-start.bats b/test/system/045-start.bats index 52b2abc00d..5774438615 100644 --- a/test/system/045-start.bats +++ b/test/system/045-start.bats @@ -68,6 +68,8 @@ load helpers # Nothing on match run_podman start --filter restart-policy=none --all is "$output" "" + + run_podman rm -f $c1 $c2 $c3 } @test "podman start --filter invalid-restart-policy - return error" { @@ -76,6 +78,7 @@ load helpers run_podman 125 start --filter restart-policy=fakepolicy $cid is "$output" "Error: fakepolicy invalid restart policy" \ "CID of restart-policy= container" + run_podman rm -f $cid } @test "podman start --all --filter" { @@ -87,6 +90,8 @@ load helpers run_podman wait $cid_exited_0 $cid_exited_1 run_podman start --all --filter exited=0 is "$output" "$cid_exited_0" + + run_podman rm -f $cid_exited_0 $cid_exited_1 } @test "podman start print IDs or raw input" { diff --git a/test/system/050-stop.bats b/test/system/050-stop.bats index 9d2f5874fb..a1e8b55f8f 100644 --- a/test/system/050-stop.bats +++ b/test/system/050-stop.bats @@ -39,9 +39,13 @@ load helpers @test "podman stop --all" { # Start three containers, create (without running) a fourth run_podman run -d --name c1 $IMAGE sleep 20 + cid1="$output" run_podman run -d --name c2 $IMAGE sleep 40 + cid2="$output" run_podman run -d --name c3 $IMAGE sleep 60 + cid3="$output" run_podman create --name c4 $IMAGE sleep 80 + cid4="$output" # podman ps (without -a) should show the three running containers run_podman ps --sort names --format '{{.Names}}--{{.Status}}' @@ -71,6 +75,8 @@ load helpers is "${lines[1]}" "c2--Exited.*" "ps -a, second stopped container" is "${lines[2]}" "c3--Exited.*" "ps -a, third stopped container" is "${lines[3]}" "c4--Created.*" "ps -a, created container (unaffected)" + + run_podman rm $cid1 $cid2 $cid3 $cid4 } @test "podman stop print IDs or raw input" { @@ -194,6 +200,8 @@ load helpers # Exit code should be 137 as it was killed run_podman inspect --format '{{.State.ExitCode}}' stopme is "$output" "137" "Exit code of killed container" + + run_podman rm stopme } @test "podman stop -t 1 Generate warning" { diff --git a/test/system/060-mount.bats b/test/system/060-mount.bats index 4cedd3b4aa..7696551024 100644 --- a/test/system/060-mount.bats +++ b/test/system/060-mount.bats @@ -283,11 +283,12 @@ EOF is "$output" ".*$v1a" "podman images --inspect should include $v1a" is "$output" ".*$v1b" "podman images --inspect should include $v1b" - run_podman create --rm --mount type=glob,src=${PODMAN_TMPDIR}/v1\*,ro $IMAGE ls $vol1a $vol1b + run_podman create --mount type=glob,src=${PODMAN_TMPDIR}/v1\*,ro $IMAGE ls $vol1a $vol1b cid=$output - run_podman container inspect $output + run_podman container inspect $cid is "$output" ".*$vol1a" "podman images --inspect should include $vol1a" is "$output" ".*$vol1b" "podman images --inspect should include $vol1b" + run_podman rm $cid run_podman 125 run --rm --mount type=bind,source=${PODMAN_TMPDIR}/v2\*,ro=false $IMAGE touch $vol2 is "$output" "Error: must set volume destination" "Bind mounts require destination" diff --git a/test/system/070-build.bats b/test/system/070-build.bats index 2daf7edfac..fa217d1825 100644 --- a/test/system/070-build.bats +++ b/test/system/070-build.bats @@ -1134,6 +1134,7 @@ EOF run_podman run --rm --volumes-from test_ctr $IMAGE echo $rand_content is "$output" "$rand_content" "No error should be thrown about volume in use" + run_podman rm -f -v -t0 test_ctr run_podman rmi -f build_test } diff --git a/test/system/075-exec.bats b/test/system/075-exec.bats index 0c0f7cab8f..3aed8ff2c0 100644 --- a/test/system/075-exec.bats +++ b/test/system/075-exec.bats @@ -217,6 +217,8 @@ load helpers run_podman inspect --format "{{len .ExecIDs}}" $cid assert "$output" = "0" ".ExecIDs must be empty" + + run_podman rm -f -t0 $cid } # 'exec --preserve-fd' passes a list of additional file descriptors into the container @@ -239,6 +241,8 @@ load helpers assert "${lines[0]}" !~ [123][0-9] "/proc/self/fd must not contain 10-39" assert "${lines[1]}" = "fd9" "cat from fd 9" assert "${lines[2]}" = "$content" "cat from fd 40" + + run_podman rm -f -t0 $cid } # vim: filetype=sh diff --git a/test/system/090-events.bats b/test/system/090-events.bats index 993d7beebc..739a35c46d 100644 --- a/test/system/090-events.bats +++ b/test/system/090-events.bats @@ -134,7 +134,7 @@ function _events_disjunctive_filters() { run_podman 125 --events-backend=file logs --follow test is "$output" "Error: using --follow with the journald --log-driver but without the journald --events-backend (file) is not supported" \ "Should fail with reasonable error message when events-backend and events-logger do not match" - + run_podman rm test } @test "events with disjunctive filters - default" { @@ -358,6 +358,8 @@ EOF --stream=false assert "$output" != ".*ConmonPidFile.*" assert "$output" != ".*EffectiveCaps.*" + + run_podman rm $cname } @test "events - container inspect data - journald" { diff --git a/test/system/130-kill.bats b/test/system/130-kill.bats index c03a7e1121..0a00a57812 100644 --- a/test/system/130-kill.bats +++ b/test/system/130-kill.bats @@ -135,6 +135,7 @@ load helpers run_podman 125 start $random_name # FIXME(#14873): while older Podmans return 0 on wait, Docker does not. run_podman wait $random_name + run_podman rm $random_name } @test "podman kill - no restart" { @@ -149,6 +150,7 @@ load helpers is "$output" "42" "container exits with 42 on receiving SIGTERM" run_podman container inspect --format "{{.State.StoppedByUser}}" $ctr is "$output" "true" "container is marked to be stopped by a user" + run_podman rm $ctr } # vim: filetype=sh diff --git a/test/system/200-pod.bats b/test/system/200-pod.bats index 8eccee12ca..c81635446d 100644 --- a/test/system/200-pod.bats +++ b/test/system/200-pod.bats @@ -508,6 +508,7 @@ spec: is "$output" "stop" "custom exit policy" _ensure_pod_state $name-pod Exited run_podman pod rm $name-pod + run_podman network rm podman-default-kube-network } @test "pod resource limits" { diff --git a/test/system/250-systemd.bats b/test/system/250-systemd.bats index 832ee0d742..8dbc05f212 100644 --- a/test/system/250-systemd.bats +++ b/test/system/250-systemd.bats @@ -275,6 +275,7 @@ LISTEN_FDNAMES=listen_fdnames" | sort) run_podman create --name $cname $IMAGE top run_podman 125 generate systemd --new=false --template -n $cname is "$output" ".*--template cannot be set" "Error message should be '--template requires --new'" + run_podman rm $cname } @test "podman --cgroup=cgroupfs doesn't show systemd warning" { @@ -287,6 +288,7 @@ LISTEN_FDNAMES=listen_fdnames" | sort) container_uuid=$output run_podman inspect test --format '{{ .ID }}' is "${container_uuid}" "${output:0:32}" "UUID should be first 32 chars of Container id" + run_podman rm test } @test "podman --systemd fails on cgroup v1 with a private cgroupns" { @@ -480,6 +482,7 @@ $name stderr" "logs work with passthrough" run_podman 1 container exists $service_container run_podman 1 pod exists test_pod run_podman rmi $(pause_image) + run_podman network rm podman-default-kube-network rm -f $UNIT_DIR/$unit_name } @@ -492,5 +495,6 @@ $name stderr" "logs work with passthrough" is "$output" ".*[DEPRECATED] command:" run_podman generate --help is "$output" ".*\[DEPRECATED\] Generate systemd units" + run_podman rm test } # vim: filetype=sh diff --git a/test/system/252-quadlet.bats b/test/system/252-quadlet.bats index 7821172169..a429454461 100644 --- a/test/system/252-quadlet.bats +++ b/test/system/252-quadlet.bats @@ -324,6 +324,7 @@ EOF is "$output" "with space" service_cleanup $QUADLET_SERVICE_NAME inactive + run_podman volume rm $volume_name } # A quadlet container depends on a quadlet volume @@ -450,6 +451,7 @@ EOF is "$output" "with space" service_cleanup $QUADLET_SERVICE_NAME inactive + run_podman network rm $network_name } # A quadlet container depends on a quadlet network @@ -591,6 +593,7 @@ EOF service_cleanup $QUADLET_SERVICE_NAME inactive run_podman rmi $(pause_image) + run_podman network rm podman-default-kube-network } @test "quadlet kube - named network dependency" { @@ -960,6 +963,7 @@ EOF done < <(parse_table "$exit_tests") run_podman rmi $(pause_image) + run_podman network rm podman-default-kube-network } @test "quadlet kube - Working Directory" { @@ -1020,6 +1024,7 @@ EOF service_cleanup $QUADLET_SERVICE_NAME inactive run_podman rmi $(pause_image) + run_podman network rm podman-default-kube-network } @test "quadlet - image files" { @@ -1251,6 +1256,7 @@ EOF service_cleanup $pod_service inactive run_podman volume rm $quadlet_kube_volume_name run_podman rmi --ignore $(pause_image) + run_podman network rm podman-default-kube-network } @test "quadlet - kube down force" { @@ -1330,6 +1336,7 @@ EOF # Volume should not exist run_podman 1 volume exists ${quadlet_kube_volume_name} run_podman rmi --ignore $(pause_image) + run_podman network rm podman-default-kube-network } @test "quadlet - image tag" { @@ -1417,6 +1424,7 @@ EOF service_cleanup $container_service failed run_podman image rm --ignore $image_for_test run_podman rmi --ignore $(pause_image) + run_podman volume rm $volume_name } @test "quadlet - pod simple" { @@ -1546,5 +1554,6 @@ EOF service_cleanup $QUADLET_SERVICE_NAME inactive run_podman rmi $untagged_image:latest $built_image $(pause_image) + run_podman network rm podman-default-kube-network } # vim: filetype=sh diff --git a/test/system/255-auto-update.bats b/test/system/255-auto-update.bats index eac97801ed..8bde211055 100644 --- a/test/system/255-auto-update.bats +++ b/test/system/255-auto-update.bats @@ -564,6 +564,7 @@ EOF # Clean up systemctl stop $service_name run_podman rmi -f $(pause_image) $local_image $newID $oldID + run_podman network rm podman-default-kube-network rm -f $UNIT_DIR/$unit_name } diff --git a/test/system/260-sdnotify.bats b/test/system/260-sdnotify.bats index cdf7b51323..912178d612 100644 --- a/test/system/260-sdnotify.bats +++ b/test/system/260-sdnotify.bats @@ -318,6 +318,7 @@ READY=1" "sdnotify sent MAINPID and READY" # Clean up pod and pause image run_podman play kube --down $PODMAN_TMPDIR/test.yaml run_podman rmi $(pause_image) + run_podman network rm podman-default-kube-network } @test "sdnotify : play kube - with policies" { @@ -427,6 +428,7 @@ READY=1" "sdnotify sent MAINPID and READY" # Clean up pod and pause image run_podman play kube --down $yaml_source run_podman rmi $(pause_image) + run_podman network rm podman-default-kube-network } function generate_exit_code_yaml { @@ -517,6 +519,7 @@ none | false | false | 0 is "$output" "Error: unsupported exit-code propagation \"bogus\"" "error on unsupported exit-code propagation" run_podman rmi $(pause_image) + run_podman network rm podman-default-kube-network } @test "podman pull - EXTEND_TIMEOUT_USEC" { diff --git a/test/system/280-update.bats b/test/system/280-update.bats index b1ea6c717b..13699e20b6 100644 --- a/test/system/280-update.bats +++ b/test/system/280-update.bats @@ -155,6 +155,8 @@ device-write-iops = /dev/zero:4000 | - | - # Restart should ensure that the container comes back up and recreates the file wait_for_file ${PODMAN_TMPDIR}/alive + + run_podman rm -f -t0 testctr } # vim: filetype=sh diff --git a/test/system/410-selinux.bats b/test/system/410-selinux.bats index c7d71643b4..c985e1e65f 100644 --- a/test/system/410-selinux.bats +++ b/test/system/410-selinux.bats @@ -345,7 +345,7 @@ EOF run id -Z user=$(secon -u $output) role=$(secon -r $output) - CONTAINERS_CONF_OVERRIDE=$overrideConf run_podman run $IMAGE cat /proc/self/attr/current + CONTAINERS_CONF_OVERRIDE=$overrideConf run_podman run --rm $IMAGE cat /proc/self/attr/current level=$(secon -l $output) id -Z is "$output" "$user:$role:container_t:$level" "Confined label Correctly" diff --git a/test/system/450-interactive.bats b/test/system/450-interactive.bats index 18ff460866..4536d74491 100644 --- a/test/system/450-interactive.bats +++ b/test/system/450-interactive.bats @@ -118,7 +118,7 @@ function teardown() { run tty <$PODMAN_TEST_PTY expected_tty="$output" - run_podman run -v/dev:/dev --log-driver=passthrough-tty $IMAGE tty <$PODMAN_TEST_PTY + run_podman run --rm -v/dev:/dev --log-driver=passthrough-tty $IMAGE tty <$PODMAN_TEST_PTY is "$output" "$expected_tty" "passthrough-tty: tty matches" } diff --git a/test/system/500-networking.bats b/test/system/500-networking.bats index 3d0697364f..330e16edcc 100644 --- a/test/system/500-networking.bats +++ b/test/system/500-networking.bats @@ -722,6 +722,8 @@ nameserver 8.8.8.8" "nameserver order is correct" run_podman run --network host --dns 1.1.1.1 --rm $IMAGE cat /etc/resolv.conf assert "$output" =~ ".*nameserver 1\.1\.1\.1.*" \ "resolv.conf contains 1.1.1.1 nameserver" + + run_podman network rm -f $netname } @test "podman run port forward range" { diff --git a/test/system/505-networking-pasta.bats b/test/system/505-networking-pasta.bats index 80282e1c42..fb9c517bf8 100644 --- a/test/system/505-networking-pasta.bats +++ b/test/system/505-networking-pasta.bats @@ -230,7 +230,7 @@ function pasta_test_do() { done # and server, - run_podman run --net=pasta"${pasta_spec}" -p "${podman_spec}" "${IMAGE}" \ + run_podman run --rm --net=pasta"${pasta_spec}" -p "${podman_spec}" "${IMAGE}" \ sh -c 'for port in $(seq '"${xseq}"'); do '\ ' socat -u '"${bind}"' '"${recv}"' & '\ ' done; wait' @@ -244,7 +244,7 @@ function pasta_test_do() { @test "IPv4 default address assignment" { skip_if_no_ipv4 "IPv4 not routable on the host" - run_podman run --net=pasta $IMAGE ip -j -4 address show + run_podman run --rm --net=pasta $IMAGE ip -j -4 address show local container_address="$(ipv4_get_addr_global "${output}")" local host_address="$(default_addr 4)" @@ -256,7 +256,7 @@ function pasta_test_do() { @test "IPv4 address assignment" { skip_if_no_ipv4 "IPv4 not routable on the host" - run_podman run --net=pasta:-a,192.0.2.1 $IMAGE ip -j -4 address show + run_podman run --rm --net=pasta:-a,192.0.2.1 $IMAGE ip -j -4 address show local container_address="$(ipv4_get_addr_global "${output}")" @@ -268,7 +268,7 @@ function pasta_test_do() { skip_if_no_ipv4 "IPv4 not routable on the host" skip_if_no_ipv6 "IPv6 not routable on the host" - run_podman run --net=pasta:-6 $IMAGE ip -j -4 address show + run_podman run --rm --net=pasta:-6 $IMAGE ip -j -4 address show local container_address="$(ipv4_get_addr_global "${output}")" @@ -279,7 +279,7 @@ function pasta_test_do() { @test "IPv6 default address assignment" { skip_if_no_ipv6 "IPv6 not routable on the host" - run_podman run --net=pasta $IMAGE ip -j -6 address show + run_podman run --rm --net=pasta $IMAGE ip -j -6 address show local container_address="$(ipv6_get_addr_global "${output}")" local host_address="$(default_addr 6)" @@ -291,7 +291,7 @@ function pasta_test_do() { @test "IPv6 address assignment" { skip_if_no_ipv6 "IPv6 not routable on the host" - run_podman run --net=pasta:-a,2001:db8::1 $IMAGE ip -j -6 address show + run_podman run --rm --net=pasta:-a,2001:db8::1 $IMAGE ip -j -6 address show local container_address="$(ipv6_get_addr_global "${output}")" @@ -303,7 +303,7 @@ function pasta_test_do() { skip_if_no_ipv6 "IPv6 not routable on the host" skip_if_no_ipv4 "IPv4 not routable on the host" - run_podman run --net=pasta:-4 $IMAGE ip -j -6 address show + run_podman run --rm --net=pasta:-4 $IMAGE ip -j -6 address show local container_address="$(ipv6_get_addr_global "${output}")" @@ -331,7 +331,7 @@ function pasta_test_do() { @test "IPv4 default route" { skip_if_no_ipv4 "IPv4 not routable on the host" - run_podman run --net=pasta $IMAGE ip -j -4 route show + run_podman run --rm --net=pasta $IMAGE ip -j -4 route show local container_route="$(ipv4_get_route_default "${output}")" local host_route="$(ipv4_get_route_default)" @@ -343,7 +343,7 @@ function pasta_test_do() { @test "IPv4 default route assignment" { skip_if_no_ipv4 "IPv4 not routable on the host" - run_podman run --net=pasta:-a,192.0.2.2,-g,192.0.2.1 $IMAGE \ + run_podman run --rm --net=pasta:-a,192.0.2.2,-g,192.0.2.1 $IMAGE \ ip -j -4 route show local container_route="$(ipv4_get_route_default "${output}")" @@ -355,7 +355,7 @@ function pasta_test_do() { @test "IPv6 default route" { skip_if_no_ipv6 "IPv6 not routable on the host" - run_podman run --net=pasta $IMAGE ip -j -6 route show + run_podman run --rm --net=pasta $IMAGE ip -j -6 route show local container_route="$(ipv6_get_route_default "${output}")" local host_route="$(ipv6_get_route_default)" @@ -367,7 +367,7 @@ function pasta_test_do() { @test "IPv6 default route assignment" { skip_if_no_ipv6 "IPv6 not routable on the host" - run_podman run --net=pasta:-a,2001:db8::2,-g,2001:db8::1 $IMAGE \ + run_podman run --rm --net=pasta:-a,2001:db8::2,-g,2001:db8::1 $IMAGE \ ip -j -6 route show local container_route="$(ipv6_get_route_default "${output}")" @@ -379,7 +379,7 @@ function pasta_test_do() { ### Interfaces ################################################################# @test "Default MTU" { - run_podman run --net=pasta $IMAGE ip -j link show + run_podman run --rm --net=pasta $IMAGE ip -j link show container_tap_mtu="$(ether_get_mtu "${output}")" @@ -388,7 +388,7 @@ function pasta_test_do() { } @test "MTU assignment" { - run_podman run --net=pasta:-m,1280 $IMAGE ip -j link show + run_podman run --rm --net=pasta:-m,1280 $IMAGE ip -j link show container_tap_mtu="$(ether_get_mtu "${output}")" @@ -397,7 +397,7 @@ function pasta_test_do() { } @test "Loopback interface state" { - run_podman run --net=pasta $IMAGE ip -j link show + run_podman run --rm --net=pasta $IMAGE ip -j link show local jq_expr='.[] | select(.link_type == "loopback").flags | '\ ' contains(["UP"])' @@ -413,7 +413,7 @@ function pasta_test_do() { @test "External resolver, IPv4" { skip_if_no_ipv4 "IPv4 not routable on the host" - run_podman '?' run --net=pasta $IMAGE nslookup 127.0.0.1 + run_podman '?' run --rm --net=pasta $IMAGE nslookup 127.0.0.1 assert "$output" =~ "1.0.0.127.in-addr.arpa" \ "127.0.0.1 not resolved" @@ -422,7 +422,7 @@ function pasta_test_do() { @test "External resolver, IPv6" { skip_if_no_ipv6 "IPv6 not routable on the host" - run_podman run --net=pasta $IMAGE nslookup ::1 || : + run_podman '?' run --rm --net=pasta $IMAGE nslookup ::1 assert "$output" =~ "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" \ "::1 not resolved" @@ -743,7 +743,7 @@ function pasta_test_do() { @test "pasta(1) quits when the namespace is gone" { local pidfile="${PODMAN_TMPDIR}/pasta.pid" - run_podman run "--net=pasta:--pid,${pidfile}" $IMAGE true + run_podman run --rm "--net=pasta:--pid,${pidfile}" $IMAGE true sleep 1 ! ps -p $(cat "${pidfile}") && rm "${pidfile}" } @@ -752,7 +752,7 @@ function pasta_test_do() { @test "Unsupported protocol in port forwarding" { local port=$(random_free_port "" "" tcp) - run_podman 126 run --net=pasta -p "${port}:${port}/sctp" $IMAGE true + run_podman 126 run --rm --net=pasta -p "${port}:${port}/sctp" $IMAGE true is "$output" "Error: .*can't forward protocol: sctp" } @@ -769,12 +769,13 @@ EOF # 2023-06-29 DO NOT INCLUDE "--net=pasta" on this line! # This tests containers.conf:default_rootless_network_cmd (pr #19032) - CONTAINERS_CONF_OVERRIDE=$containersconf run_podman run $IMAGE ip link show myname + CONTAINERS_CONF_OVERRIDE=$containersconf run_podman run --rm $IMAGE ip link show myname assert "$output" =~ "$mac" "mac address is set on custom interface" # now, again but this time overwrite a option on the cli. mac2="aa:bb:cc:dd:ee:ff" - CONTAINERS_CONF_OVERRIDE=$containersconf run_podman run --net=pasta:--ns-mac-addr,"$mac2" $IMAGE ip link show myname + CONTAINERS_CONF_OVERRIDE=$containersconf run_podman run --rm \ + --net=pasta:--ns-mac-addr,"$mac2" $IMAGE ip link show myname assert "$output" =~ "$mac2" "mac address from cli is set on custom interface" } diff --git a/test/system/520-checkpoint.bats b/test/system/520-checkpoint.bats index 219ff175c7..4a6689634d 100644 --- a/test/system/520-checkpoint.bats +++ b/test/system/520-checkpoint.bats @@ -228,6 +228,8 @@ function teardown() { run_podman logs $cid trim=$(sed -z -e 's/[\r\n]\+//g' <<<"$output") is "$trim" "READY123123" "File lock restored" + + run_podman rm $cid } @test "podman checkpoint/restore ip and mac handling" { diff --git a/test/system/700-play.bats b/test/system/700-play.bats index 0944158c94..a4bc282481 100644 --- a/test/system/700-play.bats +++ b/test/system/700-play.bats @@ -17,6 +17,7 @@ function teardown() { run_podman rmi $id fi done <<<"$output" + run_podman network rm -f podman-default-kube-network basic_teardown } diff --git a/test/system/710-kube.bats b/test/system/710-kube.bats index b178c2950f..cb49260a6a 100644 --- a/test/system/710-kube.bats +++ b/test/system/710-kube.bats @@ -88,6 +88,7 @@ status | = | null run_podman pod rm -a run_podman rm -a run_podman rmi $(pause_image) + run_podman network rm podman-default-kube-network } @test "podman kube generate - pod" {