From 7066b02bf7599ef750c04a9496dfbce49ffcf961 Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Thu, 18 Mar 2021 13:07:07 +0100 Subject: [PATCH] ostree-ng.sh: use non-default ostree ref Run tests with user-specified ostree ref. The ref needs to be specified in the container build as well (without a URL) to be used for the commit that will be served to the installer. The same variable/ref is also used to retrieve the $UPGRADE_HASH for the final OS test. --- test/cases/ostree-ng.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/cases/ostree-ng.sh b/test/cases/ostree-ng.sh index b03425f8d..418be05a0 100755 --- a/test/cases/ostree-ng.sh +++ b/test/cases/ostree-ng.sh @@ -60,7 +60,7 @@ EOF # Set up variables. OSBUILD_COMPOSER_TEST_DATA=/usr/share/tests/osbuild-composer/ -OSTREE_REF="rhel/8/${ARCH}/edge" +OSTREE_REF="test/rhel/8/${ARCH}/edge" OS_VARIANT="rhel8-unknown" TEST_UUID=$(uuidgen) IMAGE_KEY="osbuild-composer-ostree-test-${TEST_UUID}" @@ -129,7 +129,10 @@ build_image() { else sudo curl --silent --header "Content-Type: application/json" --unix-socket /run/weldr/api.socket http://localhost/api/v1/compose --data "{ \"blueprint_name\": \"$blueprint_name\", - \"compose_type\": \"$image_type\" + \"compose_type\": \"$image_type\", + \"ostree\": { + \"ref\": \"$OSTREE_REF\" + } }" | tee "$COMPOSE_START" fi COMPOSE_ID=$(jq -r '.build_id' "$COMPOSE_START") @@ -488,7 +491,7 @@ done; # Get ostree commit value. greenprint "🕹 Get ostree upgrade commit value" -UPGRADE_HASH=$(curl ${URL}refs/heads/rhel/8/x86_64/edge) +UPGRADE_HASH=$(curl ${URL}refs/heads/"${OSTREE_REF}") # Clean compose and blueprints. greenprint "🧽 Clean up upgrade blueprint and compose"