From 5350b42b1df7894e02331b4fb06ed5a364275a1a Mon Sep 17 00:00:00 2001 From: Jakub Rusz Date: Tue, 7 Sep 2021 16:15:54 +0200 Subject: [PATCH] tests: enable vmware test on RHEL-9 These changes enable the use of weldr-client with the test and also there was a need to change the vm.create command a little bit. Without the increased CPU and RAM RHEL-9 would not boot and a network adapter had to be specified to use a newer one because the default one does not work with RHEL-9. --- test/cases/vmware.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/test/cases/vmware.sh b/test/cases/vmware.sh index 0c73050c8..4ae7279af 100755 --- a/test/cases/vmware.sh +++ b/test/cases/vmware.sh @@ -139,13 +139,21 @@ trap 'sudo pkill -P ${WORKER_JOURNAL_PID}' EXIT # Start the compose and upload to VMWare. greenprint "🚀 Starting compose" sudo composer-cli --json compose start bash vmdk "$IMAGE_KEY" "$VMWARE_CONFIG" | tee "$COMPOSE_START" -COMPOSE_ID=$(jq -r '.build_id' "$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 # 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 - COMPOSE_STATUS=$(jq -r '.queue_status' "$COMPOSE_INFO") + 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 # Is the compose finished? if [[ $COMPOSE_STATUS != RUNNING ]] && [[ $COMPOSE_STATUS != WAITING ]]; then @@ -180,7 +188,8 @@ $GOVC_CMD vm.create -u "${GOVMOMI_USERNAME}":"${GOVMOMI_PASSWORD}"@"${GOVMOMI_UR -ds="${GOVMOMI_DATASTORE}" \ -folder="${GOVMOMI_FOLDER}" \ -net="${GOVMOMI_NETWORK}" \ - -m=2048 -g=rhel8_64Guest -on=true -firmware=bios \ + -net.adapter=vmxnet3 \ + -m=4096 -c=2 -g=rhel8_64Guest -on=true -firmware=bios \ -disk="${IMAGE_KEY}"/"${IMAGE_KEY}".vmdk \ --disk.controller=ide \ "${IMAGE_KEY}"