Skip to content
Merged
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
24 changes: 14 additions & 10 deletions test/system/libs/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,10 @@ function _pull_and_cache_distro_image() {
local -i ret_val

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

if [ "$ret_val" -eq 0 ]; then
Expand Down Expand Up @@ -211,9 +212,10 @@ function _setup_docker_registry() {
assert_success

# Add fedora-toolbox:34 image to the registry
run skopeo copy --dest-authfile "${BATS_SUITE_TMPDIR}/authfile.json" \
dir:"${IMAGE_CACHE_DIR}"/fedora-toolbox-34 \
docker://"${DOCKER_REG_URI}"/fedora-toolbox:34
run skopeo --command-timeout 60s copy \
--dest-authfile "${BATS_SUITE_TMPDIR}/authfile.json" \
dir:"${IMAGE_CACHE_DIR}"/fedora-toolbox-34 \
docker://"${DOCKER_REG_URI}"/fedora-toolbox:34
assert_success

run rm "${BATS_SUITE_TMPDIR}/authfile.json"
Expand Down Expand Up @@ -331,7 +333,9 @@ function pull_distro_image() {
fi

# https://github.com/containers/skopeo/issues/547 for the options for containers-storage
run skopeo copy "dir:${IMAGE_CACHE_DIR}/${image_archive}" "containers-storage:[overlay@$TOOLBX_ROOTLESS_STORAGE_PATH+$TOOLBX_ROOTLESS_STORAGE_PATH]${image}"
run skopeo --command-timeout 60s copy \
"dir:${IMAGE_CACHE_DIR}/${image_archive}" \
"containers-storage:[overlay@$TOOLBX_ROOTLESS_STORAGE_PATH+$TOOLBX_ROOTLESS_STORAGE_PATH]${image}"

# shellcheck disable=SC2154
if [ "$status" -ne 0 ]; then
Expand Down Expand Up @@ -363,9 +367,9 @@ function pull_default_image_and_copy() {
image="${IMAGES[$distro]}:$version"

# https://github.com/containers/skopeo/issues/547 for the options for containers-storage
run skopeo copy \
"containers-storage:[overlay@$TOOLBX_ROOTLESS_STORAGE_PATH+$TOOLBX_ROOTLESS_STORAGE_PATH]$image" \
"containers-storage:[overlay@$TOOLBX_ROOTLESS_STORAGE_PATH+$TOOLBX_ROOTLESS_STORAGE_PATH]$image-copy"
run skopeo --command-timeout 60s copy \
"containers-storage:[overlay@$TOOLBX_ROOTLESS_STORAGE_PATH+$TOOLBX_ROOTLESS_STORAGE_PATH]$image" \
"containers-storage:[overlay@$TOOLBX_ROOTLESS_STORAGE_PATH+$TOOLBX_ROOTLESS_STORAGE_PATH]$image-copy"

if [ "$status" -ne 0 ]; then
echo "Failed to copy image $image to $image-copy"
Expand Down
Loading