mirror of
https://github.com/containers/podman.git
synced 2025-07-01 00:01:02 +08:00
Merge pull request #21764 from edsantiago/systest_cleanup
systests: auto-update: minor cleanup
This commit is contained in:
@ -8,27 +8,33 @@ load helpers.network
|
|||||||
load helpers.registry
|
load helpers.registry
|
||||||
load helpers.systemd
|
load helpers.systemd
|
||||||
|
|
||||||
SNAME_FILE=$BATS_TMPDIR/services
|
export SNAME_FILE
|
||||||
|
|
||||||
function setup() {
|
function setup() {
|
||||||
skip_if_remote "systemd tests are meaningless over remote"
|
skip_if_remote "systemd tests are meaningless over remote"
|
||||||
basic_setup
|
basic_setup
|
||||||
|
|
||||||
|
SNAME_FILE=${PODMAN_TMPDIR}/services
|
||||||
}
|
}
|
||||||
|
|
||||||
function teardown() {
|
function teardown() {
|
||||||
while read line; do
|
if [[ -e $SNAME_FILE ]]; then
|
||||||
if [[ "$line" =~ "podman-auto-update" ]]; then
|
while read line; do
|
||||||
echo "Stop timer: $line.timer"
|
if [[ "$line" =~ "podman-auto-update" ]]; then
|
||||||
systemctl stop $line.timer
|
echo "Stop timer: $line.timer"
|
||||||
systemctl disable $line.timer
|
systemctl stop $line.timer
|
||||||
else
|
systemctl disable $line.timer
|
||||||
systemctl stop $line
|
else
|
||||||
fi
|
systemctl stop $line
|
||||||
rm -f $UNIT_DIR/$line.{service,timer}
|
fi
|
||||||
done < $SNAME_FILE
|
rm -f $UNIT_DIR/$line.{service,timer}
|
||||||
|
done < $SNAME_FILE
|
||||||
|
|
||||||
rm -f $SNAME_FILE
|
rm -f $SNAME_FILE
|
||||||
run_podman '?' rmi -f \
|
fi
|
||||||
|
SNAME_FILE=
|
||||||
|
|
||||||
|
run_podman rmi -f \
|
||||||
quay.io/libpod/alpine:latest \
|
quay.io/libpod/alpine:latest \
|
||||||
quay.io/libpod/busybox:latest \
|
quay.io/libpod/busybox:latest \
|
||||||
quay.io/libpod/localtest:latest \
|
quay.io/libpod/localtest:latest \
|
||||||
@ -37,7 +43,7 @@ function teardown() {
|
|||||||
|
|
||||||
# The rollback tests may leave some dangling images behind, so let's prune
|
# The rollback tests may leave some dangling images behind, so let's prune
|
||||||
# them to leave a clean state.
|
# them to leave a clean state.
|
||||||
run_podman '?' image prune -f
|
run_podman image prune -f
|
||||||
basic_teardown
|
basic_teardown
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user