Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/system/libs/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ function _pull_and_cache_distro_image() {
local -i ret_val

for ((j = 0; j < num_of_retries; j++)); do
ret_val=0
error_message="$( (skopeo --command-timeout 10m copy \
--dest-compress \
"docker://${image}" \
"dir:${IMAGE_CACHE_DIR}/${image_archive}" >/dev/null) 2>&1)"
ret_val="$?"
"dir:${IMAGE_CACHE_DIR}/${image_archive}" >/dev/null) 2>&1)" || ret_val="$?"

if [ "$ret_val" -eq 0 ]; then
cached=true
Expand Down
20 changes: 10 additions & 10 deletions test/system/setup_suite.bash
Original file line number Diff line number Diff line change
Expand Up @@ -42,29 +42,29 @@ setup_suite() {
_setup_environment

if echo "$TOOLBX_TEST_SYSTEM_TAGS" | grep "arch" >/dev/null 2>/dev/null; then
_pull_and_cache_distro_image arch latest || false
_pull_and_cache_distro_image arch latest
fi

if echo "$TOOLBX_TEST_SYSTEM_TAGS" | grep "fedora" >/dev/null 2>/dev/null; then
# Cache the default image for the system
_pull_and_cache_distro_image "$system_id" "$system_version" || false
_pull_and_cache_distro_image "$system_id" "$system_version"
# Cache all images that will be needed during the tests
_pull_and_cache_distro_image fedora 34 || false
_pull_and_cache_distro_image rhel 8.10 || false
_pull_and_cache_distro_image fedora 34
_pull_and_cache_distro_image rhel 8.10
fi

if echo "$TOOLBX_TEST_SYSTEM_TAGS" | grep "ubuntu" >/dev/null 2>/dev/null; then
_pull_and_cache_distro_image ubuntu 16.04 || false
_pull_and_cache_distro_image ubuntu 18.04 || false
_pull_and_cache_distro_image ubuntu 20.04 || false
_pull_and_cache_distro_image ubuntu 16.04
_pull_and_cache_distro_image ubuntu 18.04
_pull_and_cache_distro_image ubuntu 20.04
fi

if echo "$TOOLBX_TEST_SYSTEM_TAGS" | grep "commands-options" >/dev/null 2>/dev/null; then
_pull_and_cache_distro_image busybox || false
_pull_and_cache_distro_image busybox
# If run on Fedora Rawhide, cache 2 extra images (previous Fedora versions)
if is_fedora_rawhide && (echo "$TOOLBX_TEST_SYSTEM_TAGS" | grep "fedora" >/dev/null 2>/dev/null); then
_pull_and_cache_distro_image fedora "$((system_version-1))" || false
_pull_and_cache_distro_image fedora "$((system_version-2))" || false
_pull_and_cache_distro_image fedora "$((system_version-1))"
_pull_and_cache_distro_image fedora "$((system_version-2))"
fi

_setup_docker_registry
Expand Down
Loading