From d6aff2f103d44f84205c0a4c9105c4670e40ae65 Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Mon, 18 Dec 2023 10:39:12 +0200 Subject: [PATCH] Adjust expected response based on osbuild-composer version --- test/cases/cross-distro.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/cases/cross-distro.sh b/test/cases/cross-distro.sh index 22f421c22..d2c2fe113 100755 --- a/test/cases/cross-distro.sh +++ b/test/cases/cross-distro.sh @@ -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#*: }