diff --git a/test/cases/regression-old-worker-new-composer.sh b/test/cases/regression-old-worker-new-composer.sh index 512817fd6b4..1fa00cb8453 100644 --- a/test/cases/regression-old-worker-new-composer.sh +++ b/test/cases/regression-old-worker-new-composer.sh @@ -31,6 +31,13 @@ DESIRED_WORKER_RPM="osbuild-composer-worker-$((CURRENT_WORKER_VERSION - 3))" DESIRED_TAG_SHA=$(curl -s "https://api.github.com/repos/osbuild/osbuild-composer/git/ref/tags/v$((CURRENT_WORKER_VERSION-3))" | jq -r '.object.sha') DESIRED_COMMIT_SHA=$(curl -s "https://api.github.com/repos/osbuild/osbuild-composer/git/tags/$DESIRED_TAG_SHA" | jq -r '.object.sha') +# Get commit hash of latest composer version, only used for verification. +CURRENT_COMPOSER_VERSION=$(rpm -q --qf '%{version}\n' osbuild-composer) +VERIFICATION_COMPOSER_RPM="osbuild-composer-$((CURRENT_COMPOSER_VERSION - 1))" + +COMPOSER_LATEST_TAG_SHA=$(curl -s "https://api.github.com/repos/osbuild/osbuild-composer/git/ref/tags/v$((CURRENT_COMPOSER_VERSION-1))" | jq -r '.object.sha') +COMPOSER_LATEST_COMMIT_SHA=$(curl -s "https://api.github.com/repos/osbuild/osbuild-composer/git/tags/$COMPOSER_LATEST_TAG_SHA" | jq -r '.object.sha') + COMPOSER_CONTAINER_NAME="composer" # Container image used for cloud provider CLI tools @@ -380,8 +387,10 @@ $AWS_CMD s3api put-object-tagging \ greenprint "✅ Successfully tagged S3 object" +setup_repo osbuild-composer "$COMPOSER_LATEST_COMMIT_SHA" 10 + greenprint "Installing osbuild-composer-tests for image-info" -sudo dnf install -y osbuild-composer-tests +sudo dnf install -y $VERIFICATION_COMPOSER_RPM curl "${S3_URL}" --output "${WORKDIR}/disk.qcow2"