diff --git a/test/cases/ostree-ami-image.sh b/test/cases/ostree-ami-image.sh index d494cd775..a0d7b2315 100755 --- a/test/cases/ostree-ami-image.sh +++ b/test/cases/ostree-ami-image.sh @@ -1,13 +1,14 @@ #!/bin/bash set -euo pipefail +# Get OS data. +source /etc/os-release +ARCH=$(uname -m) + # Provision the software under test. /usr/libexec/osbuild-composer-test/provision.sh none -# Get OS data. -source /usr/libexec/osbuild-composer-test/set-env-variables.sh source /usr/libexec/tests/osbuild-composer/shared_lib.sh -ARCH=$(uname -m) # Start libvirtd and test it. greenprint "🚀 Starting libvirt daemon" @@ -44,10 +45,10 @@ EOF if ! sudo virsh net-info integration > /dev/null 2>&1; then sudo virsh net-define /tmp/integration.xml -fi +fi if [[ $(sudo virsh net-info integration | grep 'Active' | awk '{print $2}') == 'no' ]]; then sudo virsh net-start integration -fi +fi # Set up variables. TEST_UUID=$(uuidgen) @@ -537,7 +538,7 @@ sudo tee "$IGNITION_CONFIG_SAMPLE_PATH" > /dev/null << EOF EOF sudo chmod +r "${IGNITION_CONFIG_SAMPLE_PATH}" "${IGNITION_CONFIG_PATH}" -# Start AWS cli installation +# Start AWS cli installation curl "https://awscli.amazonaws.com/awscli-exe-linux-${ARCH}.zip" -o "awscliv2.zip" unzip awscliv2.zip > /dev/null sudo ./aws/install --update diff --git a/test/cases/ostree-ignition.sh b/test/cases/ostree-ignition.sh index 2fdc127a1..c25393f13 100755 --- a/test/cases/ostree-ignition.sh +++ b/test/cases/ostree-ignition.sh @@ -1,13 +1,13 @@ #!/bin/bash set -euox pipefail -# Provision the software under test. -/usr/libexec/osbuild-composer-test/provision.sh none - # Get OS data. source /etc/os-release ARCH=$(uname -m) +# Provision the software under test. +/usr/libexec/osbuild-composer-test/provision.sh none + source /usr/libexec/tests/osbuild-composer/shared_lib.sh # workaround for bug https://bugzilla.redhat.com/show_bug.cgi?id=2213660 @@ -576,7 +576,7 @@ ansible_python_interpreter=/usr/bin/python3 ansible_user=${IGNITION_USER} ansible_private_key_file=${SSH_KEY} ansible_ssh_common_args="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" -ansible_become=yes +ansible_become=yes ansible_become_method=sudo ansible_become_pass=${IGNITION_USER_PASSWORD} EOF @@ -714,7 +714,7 @@ ansible_python_interpreter=/usr/bin/python3 ansible_user=${IGNITION_USER} ansible_private_key_file=${SSH_KEY} ansible_ssh_common_args="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" -ansible_become=yes +ansible_become=yes ansible_become_method=sudo ansible_become_pass=${IGNITION_USER_PASSWORD} EOF @@ -1059,7 +1059,7 @@ ansible_python_interpreter=/usr/bin/python3 ansible_user=${IGNITION_USER} ansible_private_key_file=${SSH_KEY} ansible_ssh_common_args="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" -ansible_become=yes +ansible_become=yes ansible_become_method=sudo ansible_become_pass=${IGNITION_USER_PASSWORD} EOF diff --git a/test/cases/ostree-iot-qcow2.sh b/test/cases/ostree-iot-qcow2.sh index 1f99ed33f..8c1275969 100755 --- a/test/cases/ostree-iot-qcow2.sh +++ b/test/cases/ostree-iot-qcow2.sh @@ -1,15 +1,14 @@ #!/bin/bash set -euo pipefail -# Provision the software under test. -/usr/libexec/osbuild-composer-test/provision.sh none - -source /usr/libexec/tests/osbuild-composer/shared_lib.sh - # Get OS data. source /etc/os-release ARCH=$(uname -m) +# Provision the software under test. +/usr/libexec/osbuild-composer-test/provision.sh none + +source /usr/libexec/tests/osbuild-composer/shared_lib.sh # Start libvirtd and test it. greenprint "🚀 Starting libvirt daemon" diff --git a/test/cases/ostree-ng.sh b/test/cases/ostree-ng.sh index 5c350c90e..b33fa408f 100755 --- a/test/cases/ostree-ng.sh +++ b/test/cases/ostree-ng.sh @@ -1,11 +1,13 @@ #!/bin/bash set -euo pipefail +# Get OS data. +source /etc/os-release +ARCH=$(uname -m) + # Provision the software under test. /usr/libexec/osbuild-composer-test/provision.sh none -# Get OS data. -source /usr/libexec/osbuild-composer-test/set-env-variables.sh source /usr/libexec/tests/osbuild-composer/shared_lib.sh # workaround for bug https://bugzilla.redhat.com/show_bug.cgi?id=2213660 diff --git a/test/cases/ostree-pulp.sh b/test/cases/ostree-pulp.sh index b3e11ace1..49cea8c9f 100644 --- a/test/cases/ostree-pulp.sh +++ b/test/cases/ostree-pulp.sh @@ -2,7 +2,9 @@ set -euo pipefail # Get OS data. -source /usr/libexec/osbuild-composer-test/set-env-variables.sh +source /etc/os-release +ARCH=$(uname -m) + source /usr/libexec/tests/osbuild-composer/shared_lib.sh # Get compose url if it's running on unsubscried RHEL diff --git a/test/cases/ostree-raw-image.sh b/test/cases/ostree-raw-image.sh index 0c3930cde..22b7350e1 100755 --- a/test/cases/ostree-raw-image.sh +++ b/test/cases/ostree-raw-image.sh @@ -1,15 +1,15 @@ #!/bin/bash set -euo pipefail +# Get OS data. +source /etc/os-release +ARCH=$(uname -m) + # Provision the software under test. /usr/libexec/osbuild-composer-test/provision.sh none source /usr/libexec/tests/osbuild-composer/shared_lib.sh -# Get OS data. -source /etc/os-release -ARCH=$(uname -m) - # workaround for bug https://bugzilla.redhat.com/show_bug.cgi?id=2213660 if [[ "$VERSION_ID" == "9.3" || "$VERSION_ID" == "9" ]]; then sudo tee /etc/sysconfig/libvirtd << EOF > /dev/null diff --git a/test/cases/ostree-simplified-installer.sh b/test/cases/ostree-simplified-installer.sh index 5550cf760..93175ce43 100755 --- a/test/cases/ostree-simplified-installer.sh +++ b/test/cases/ostree-simplified-installer.sh @@ -1,14 +1,13 @@ #!/bin/bash - set -euo pipefail -# Provision the software under test. -/usr/libexec/osbuild-composer-test/provision.sh none - # Get OS data. source /etc/os-release ARCH=$(uname -m) +# Provision the software under test. +/usr/libexec/osbuild-composer-test/provision.sh none + source /usr/libexec/tests/osbuild-composer/shared_lib.sh # Start firewalld diff --git a/test/cases/ostree-vsphere.sh b/test/cases/ostree-vsphere.sh index b4c4b86be..9630efa88 100755 --- a/test/cases/ostree-vsphere.sh +++ b/test/cases/ostree-vsphere.sh @@ -1,13 +1,13 @@ #!/bin/bash - set -euo pipefail +# Get OS data. +source /etc/os-release +ARCH=$(uname -m) + # Provision the software under test. /usr/libexec/osbuild-composer-test/provision.sh none -# Get OS data. -source /usr/libexec/osbuild-composer-test/set-env-variables.sh - source /usr/libexec/tests/osbuild-composer/shared_lib.sh # Install govc diff --git a/test/cases/ostree.sh b/test/cases/ostree.sh index 17a3a70de..565a72217 100755 --- a/test/cases/ostree.sh +++ b/test/cases/ostree.sh @@ -2,7 +2,9 @@ set -euo pipefail # Get OS data. -source /usr/libexec/osbuild-composer-test/set-env-variables.sh +source /etc/os-release +ARCH=$(uname -m) + source /usr/libexec/tests/osbuild-composer/shared_lib.sh # Get compose url if it's running on unsubscried RHEL