diff --git a/test/cases/container-embedding.sh b/test/cases/container-embedding.sh index ba17901e6..35b5ab805 100755 --- a/test/cases/container-embedding.sh +++ b/test/cases/container-embedding.sh @@ -141,6 +141,11 @@ else exit 1 fi +if ! nvrGreaterOrEqual "osbuild" "83"; then + echo "INFO: osbuild version is older. Exiting test here" + exit 0 +fi + # Check that the local name was set in the names array FEDORA_NAME_EXISTS=$(jq -e --arg name "${FEDORA_LOCAL_NAME}" 'any(."container-images"[].Names[] | select(. != null and . == $name); .)' <<< "${INFO}") diff --git a/test/cases/image_tests.sh b/test/cases/image_tests.sh index 44ddc1ebf..a81a737cd 100755 --- a/test/cases/image_tests.sh +++ b/test/cases/image_tests.sh @@ -3,6 +3,7 @@ set -euo pipefail # Get OS and architecture details. source /usr/libexec/osbuild-composer-test/set-env-variables.sh +source /usr/libexec/tests/osbuild-composer/shared_lib.sh if [[ -n "$CI_BUILD_ID" ]]; then BUILD_ID="${BUILD_ID:-${CI_BUILD_ID}}" @@ -57,6 +58,18 @@ get_test_cases () { else SKIP_CASES=("${SKIP_OSTREE[@]}") fi + + # skip container test if running on old osbuild version + # b/c manifests have been modified to include the + # "manifest-lists" and "skopeo-index" options which are + # not yet supported on 8.8 and 9.2 downstream + if nvrGreaterOrEqual "osbuild" "83"; then + echo + else + SKIP_ME=$(grep edge_commit_with_container-boot <<< "$ALL_CASES") + SKIP_CASES=("${SKIP_CASES[@]}" "$SKIP_ME") + fi + mapfile -t TEST_CASES < <(grep -vxFf <(printf '%s\n' "${SKIP_CASES[@]}") <(printf '%s\n' "${ALL_CASES[@]}")) echo "${TEST_CASES[@]}" popd > /dev/null