Adjust expected response based on osbuild-composer version

This commit is contained in:
Alexander Todorov 2023-12-18 10:39:12 +02:00 committed by Jakub Rusz
parent 7bcf8e5942
commit d6aff2f103

View file

@ -6,6 +6,7 @@
APISOCKET=/run/weldr/api.socket
source /etc/os-release
source /usr/libexec/tests/osbuild-composer/shared_lib.sh
# Build a grep pattern that results in an empty string when the expected distros are installed
case $ID in
@ -146,7 +147,11 @@ EOF
# there is a different reponse if legacy composer-cli is used
if rpm -q --quiet weldr-client; then
EXPECTED_RESPONSE="ERROR: BlueprintsError: '$REMAINING_DISTRO' is not a valid distribution (architecture '$(uname -m)')"
if nvrGreaterOrEqual "osbuild-composer" "97"; then
EXPECTED_RESPONSE="ERROR: BlueprintsError: '$REMAINING_DISTRO' is not a valid distribution (architecture '$(uname -m)')"
else
EXPECTED_RESPONSE="ERROR: BlueprintsError: '$REMAINING_DISTRO' is not a valid distribution"
fi
else
EXPECTED_RESPONSE="'$REMAINING_DISTRO' is not a valid distribution"
RESPONSE=${RESPONSE#*: }