test/system: Skip caching of an image if it is already cached

https://github.com/containers/toolbox/pull/1024
This commit is contained in:
Ondřej Míchal 2022-03-17 12:25:39 +02:00
parent 754c6fb4d1
commit fc71b9de34

View file

@ -89,6 +89,10 @@ function _pull_and_cache_distro_image() {
image_archive="${image_archive}-${version}"
fi
if [[ -d ${IMAGE_CACHE_DIR}/${image_archive} ]] ; then
return 0
fi
for ((i = ${num_of_retries}; i > 0; i--)); do
run $PODMAN pull ${image}