test/system: Remove redundant clean-up
The IMAGE_CACHE_DIR environment variable is defined as
"${BATS_SUITE_TMPDIR}/image-cache" [1]. Earlier, it used to be
"${BATS_RUN_TMPDIR}/image-cache".
There's no need to clean up anything inside BATS_RUN_TMPDIR or
BATS_SUITE_TMPDIR after the test suite has finished running, because
their life cycle is managed by Bats [2].
[1] Commit 3a549a6252
https://github.com/containers/toolbox/commit/3a549a6252e990d6
https://github.com/containers/toolbox/pull/1452
[2] https://bats-core.readthedocs.io/en/stable/writing-tests.html
Fallout from 9820550c82
https://github.com/containers/toolbox/pull/1645
This commit is contained in:
parent
d64682af0d
commit
a5a0d5350f
|
|
@ -120,12 +120,6 @@ function _pull_and_cache_distro_image() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Removes the folder with cached images
|
|
||||||
function _clean_cached_images() {
|
|
||||||
rm --force --recursive "${IMAGE_CACHE_DIR}"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# Prepares a locally hosted image registry
|
# Prepares a locally hosted image registry
|
||||||
#
|
#
|
||||||
# The registry is set up with Podman set to an alternative root. It won't
|
# The registry is set up with Podman set to an alternative root. It won't
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
#
|
#
|
||||||
# Copyright © 2021 – 2024 Red Hat, Inc.
|
# Copyright © 2021 – 2025 Red Hat, Inc.
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
|
|
@ -85,6 +85,5 @@ teardown_suite() {
|
||||||
_clean_docker_registry
|
_clean_docker_registry
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_clean_cached_images
|
|
||||||
podman system reset --force >/dev/null
|
podman system reset --force >/dev/null
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue