systests: clean up after tests; fix missing path in logs

Followup to #20016:
- remove obsolete (misleading) comment
- prune dangling <none>:<none> image

Also, in kube test, rmi pause_image to avoid nasty red warnings

Also, ouch, fix a stupid that I introduced in #19878: the PODMAN
command path got dropped from log messages.

Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
Ed Santiago
2023-09-19 06:39:57 -06:00
parent 63219d617e
commit aec58f515e
3 changed files with 6 additions and 2 deletions

View File

@ -121,7 +121,7 @@ EOF
local manifestlocal="test:1.0"
run_podman manifest create $manifestlocal
for arch in amd arm;do
# FIXME: --layers=false needed to work around #19860
# This leaves behind a <none>:<none> image that must be purged, below
run_podman build -t image_$arch --platform linux/${arch}64 -f $dockerfile
run_podman manifest add $manifestlocal containers-storage:localhost/image_$arch:latest
done
@ -145,6 +145,9 @@ EOF
run_podman rmi image_amd image_arm
run_podman manifest rm $manifestlocal
# Needed because the above build leaves a dangling <none>
run_podman image prune -f
}
# vim: filetype=sh

View File

@ -87,6 +87,7 @@ status | = | null
run_podman kube down $KUBE
run_podman pod rm -a
run_podman rm -a
run_podman rmi $(pause_image)
}
@test "podman kube generate - pod" {

View File

@ -340,7 +340,7 @@ function run_podman() {
MOST_RECENT_PODMAN_COMMAND="podman $*"
# stdout is only emitted upon error; this printf is to help in debugging
printf "\n%s %s %s\n" "$(timestamp)" "$_LOG_PROMPT" "$*"
printf "\n%s %s %s %s\n" "$(timestamp)" "$_LOG_PROMPT" "$PODMAN" "$*"
# BATS hangs if a subprocess remains and keeps FD 3 open; this happens
# if podman crashes unexpectedly without cleaning up subprocesses.
run timeout --foreground -v --kill=10 $PODMAN_TIMEOUT $PODMAN $_PODMAN_TEST_OPTS "$@" 3>/dev/null