diff --git a/integration-tests/push-to-external-registry-idempotent/test.sh b/integration-tests/push-to-external-registry-idempotent/test.sh index 3c1a3376e5..efa69d0e1c 100755 --- a/integration-tests/push-to-external-registry-idempotent/test.sh +++ b/integration-tests/push-to-external-registry-idempotent/test.sh @@ -37,7 +37,6 @@ verify_single_release() { local image_url image_arch image_shasum image_url=$(jq -r '.status.artifacts.images[0]?.urls[0] // ""' <<< "${release_json}") - image_arch=$(jq -r '.status.artifacts.images[0]?.arches[0] // ""' <<< "${release_json}") image_shasum=$(jq -r '.status.artifacts.images[0]?.shasum // ""' <<< "${release_json}") echo "Checking Image URL..." @@ -48,12 +47,24 @@ verify_single_release() { failures=$((failures+1)) fi - echo "Checking Image Arch..." - if [ -n "${image_arch}" ]; then - echo "✅️ image_arch: ${image_arch}" + if [ -n "${PTSV_EXPECTED_ARCHES:-}" ]; then + local image_arches + image_arches=$(jq -r '.status.artifacts.images[0]?.arches // [] | sort | join(" ")' <<< "${release_json}") + if [ "${image_arches}" = "${PTSV_EXPECTED_ARCHES}" ]; then + echo "✅️ Found required image arches: $PTSV_EXPECTED_ARCHES" + else + echo "🔴 Expected image arches: '$PTSV_EXPECTED_ARCHES', found: ${image_arches}" + failures=$((failures+1)) + fi else - echo "🔴 image_arch was empty" - failures=$((failures+1)) + image_arch=$(jq -r '.status.artifacts.images[0]?.arches[0] // ""' <<< "${release_json}") + echo "Checking Image Arch..." + if [ -n "${image_arch}" ]; then + echo "✅️ image_arch: ${image_arch}" + else + echo "🔴 image_arch was empty" + failures=$((failures+1)) + fi fi echo "Checking Image Shasum..." diff --git a/integration-tests/run-test.sh b/integration-tests/run-test.sh index 179be3b12a..d6c5da611f 100755 --- a/integration-tests/run-test.sh +++ b/integration-tests/run-test.sh @@ -169,6 +169,10 @@ if [[ -n "${PTSV_BUILD_PIPELINE}" ]]; then ) fi +if [ -z "$PTSV_EXPECTED_ARCHES" ]; then + PTSV_EXPECTED_ARCHES="" +fi + # --- Main Script Execution --- # Trap EXIT signal to call cleanup function