Update test suite after rebase to weldr-client-35.9

in order to avoid failures in nightly pipelines b/c JSON format has
changed
This commit is contained in:
Alexander Todorov 2023-02-20 15:10:30 +02:00 committed by Tomáš Hozza
parent a761184725
commit e064c12449
3 changed files with 5 additions and 12 deletions

View file

@ -1 +1 @@
460d034f182a6285a0133c86688c7281a28f548b 2c2662c86c0540a183b3f606affc621256c15ea3

View file

@ -133,7 +133,7 @@ build_image() {
while true; do while true; do
sudo composer-cli --json compose info "${COMPOSE_ID}" | tee "$COMPOSE_INFO" > /dev/null 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? # Is the compose finished?
if [[ $COMPOSE_STATUS != RUNNING ]] && [[ $COMPOSE_STATUS != WAITING ]]; then if [[ $COMPOSE_STATUS != RUNNING ]] && [[ $COMPOSE_STATUS != WAITING ]]; then

View file

@ -10,6 +10,7 @@ OSBUILD_COMPOSER_TEST_DATA=/usr/share/tests/osbuild-composer/
# Get OS data. # Get OS data.
source /usr/libexec/osbuild-composer-test/set-env-variables.sh 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 # Take the image type passed to the script or use qcow2 by default if nothing
# was passed. # was passed.
@ -166,21 +167,13 @@ EOF
# Start the compose # Start the compose
greenprint "🚀 Starting compose" greenprint "🚀 Starting compose"
sudo composer-cli --json compose start bp "$IMAGE_TYPE" | tee "$COMPOSE_START" sudo composer-cli --json compose start bp "$IMAGE_TYPE" | tee "$COMPOSE_START"
if rpm -q --quiet weldr-client; then COMPOSE_ID=$(get_build_info ".build_id" "$COMPOSE_START")
COMPOSE_ID=$(jq -r '.body.build_id' "$COMPOSE_START")
else
COMPOSE_ID=$(jq -r '.build_id' "$COMPOSE_START")
fi
# Wait for the compose to finish. # Wait for the compose to finish.
greenprint "⏱ Waiting for compose to finish: ${COMPOSE_ID}" greenprint "⏱ Waiting for compose to finish: ${COMPOSE_ID}"
while true; do while true; do
sudo composer-cli --json compose info "${COMPOSE_ID}" | tee "$COMPOSE_INFO" > /dev/null sudo composer-cli --json compose info "${COMPOSE_ID}" | tee "$COMPOSE_INFO" > /dev/null
if rpm -q --quiet weldr-client; then COMPOSE_STATUS=$(get_build_info ".queue_status" "$COMPOSE_INFO")
COMPOSE_STATUS=$(jq -r '.body.queue_status' "$COMPOSE_INFO")
else
COMPOSE_STATUS=$(jq -r '.queue_status' "$COMPOSE_INFO")
fi
# Is the compose finished? # Is the compose finished?
if [[ $COMPOSE_STATUS != RUNNING ]] && [[ $COMPOSE_STATUS != WAITING ]]; then if [[ $COMPOSE_STATUS != RUNNING ]] && [[ $COMPOSE_STATUS != WAITING ]]; then