tests/image-tests: filter out cases with ostree URL

These tests depend on external dependencies which are difficult to setup
during image-test like http ostree repository. See
https://github.com/osbuild/osbuild-composer/pull/2389#issuecomment-1060338127
for more details.
This commit is contained in:
Jakub Rusz 2022-03-04 21:33:57 +01:00 committed by Ondřej Budai
parent e147e41879
commit ae07093404

View file

@ -42,10 +42,16 @@ test_divider () {
}
# Get a list of test cases.
# Exclude test cases that require external dependencies like a http ostree repo.
# These manifests exist only for correct manifest creation testing and cannot
# be built during this test.
get_test_cases () {
TEST_CASE_SELECTOR="${DISTRO_CODE/-/_}-${ARCH}"
pushd $IMAGE_TEST_CASES_PATH > /dev/null
ls "$TEST_CASE_SELECTOR"*.json
ALL_CASES=$(ls "$TEST_CASE_SELECTOR"*.json)
SKIP_CASES=$(jq -r 'if (.manifest.sources."org.osbuild.ostree" != null) then input_filename else empty end' "${TEST_CASE_SELECTOR}"*.json)
mapfile -t TEST_CASES < <(grep -vxFf <(printf '%s\n' "${SKIP_CASES[@]}") <(printf '%s\n' "${ALL_CASES[@]}"))
echo "${TEST_CASES[@]}"
popd > /dev/null
}