From e064c12449c158e3205d48807be91c795b4e9de7 Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Mon, 20 Feb 2023 15:10:30 +0200 Subject: [PATCH] Update test suite after rebase to weldr-client-35.9 in order to avoid failures in nightly pipelines b/c JSON format has changed --- schutzbot/terraform | 2 +- test/cases/minimal-raw.sh | 2 +- tools/libvirt_test.sh | 13 +++---------- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/schutzbot/terraform b/schutzbot/terraform index 8e7f4a872..ae6d09e27 100644 --- a/schutzbot/terraform +++ b/schutzbot/terraform @@ -1 +1 @@ -460d034f182a6285a0133c86688c7281a28f548b +2c2662c86c0540a183b3f606affc621256c15ea3 diff --git a/test/cases/minimal-raw.sh b/test/cases/minimal-raw.sh index 14c37fc33..2b00de328 100755 --- a/test/cases/minimal-raw.sh +++ b/test/cases/minimal-raw.sh @@ -133,7 +133,7 @@ build_image() { while true; do sudo composer-cli --json compose info "${COMPOSE_ID}" | tee "$COMPOSE_INFO" > /dev/null - COMPOSE_STATUS=$(jq -r '.[0].body.queue_status' "$COMPOSE_INFO") + COMPOSE_STATUS=$(get_build_info ".queue_status" "$COMPOSE_INFO") # Is the compose finished? if [[ $COMPOSE_STATUS != RUNNING ]] && [[ $COMPOSE_STATUS != WAITING ]]; then diff --git a/tools/libvirt_test.sh b/tools/libvirt_test.sh index 28369d21f..7a3a640c2 100755 --- a/tools/libvirt_test.sh +++ b/tools/libvirt_test.sh @@ -10,6 +10,7 @@ OSBUILD_COMPOSER_TEST_DATA=/usr/share/tests/osbuild-composer/ # Get OS data. source /usr/libexec/osbuild-composer-test/set-env-variables.sh +source /usr/libexec/tests/osbuild-composer/shared_lib.sh # Take the image type passed to the script or use qcow2 by default if nothing # was passed. @@ -166,21 +167,13 @@ EOF # Start the compose greenprint "🚀 Starting compose" sudo composer-cli --json compose start bp "$IMAGE_TYPE" | tee "$COMPOSE_START" - if rpm -q --quiet weldr-client; then - COMPOSE_ID=$(jq -r '.body.build_id' "$COMPOSE_START") - else - COMPOSE_ID=$(jq -r '.build_id' "$COMPOSE_START") - fi + COMPOSE_ID=$(get_build_info ".build_id" "$COMPOSE_START") # Wait for the compose to finish. greenprint "⏱ Waiting for compose to finish: ${COMPOSE_ID}" while true; do sudo composer-cli --json compose info "${COMPOSE_ID}" | tee "$COMPOSE_INFO" > /dev/null - if rpm -q --quiet weldr-client; then - COMPOSE_STATUS=$(jq -r '.body.queue_status' "$COMPOSE_INFO") - else - COMPOSE_STATUS=$(jq -r '.queue_status' "$COMPOSE_INFO") - fi + COMPOSE_STATUS=$(get_build_info ".queue_status" "$COMPOSE_INFO") # Is the compose finished? if [[ $COMPOSE_STATUS != RUNNING ]] && [[ $COMPOSE_STATUS != WAITING ]]; then