From 1927abea4632493dea81c080bcd19f8ced508a6e Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Thu, 27 May 2021 11:45:27 +0300 Subject: [PATCH] tests: Adjust vmware.sh for GitLab CI --- test/cases/vmware.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test/cases/vmware.sh b/test/cases/vmware.sh index 10810f951..cbbece63d 100755 --- a/test/cases/vmware.sh +++ b/test/cases/vmware.sh @@ -10,13 +10,23 @@ function greenprint { echo -e "\033[1;32m${1}\033[0m" } +if [ "$ID" != "rhel" ]; then + greenprint "VMware test not supported on $ID" + exit 0 +fi + # Provision the software under tet. /usr/libexec/osbuild-composer-test/provision.sh GOVC_CMD=/tmp/govc +# Note: in GitLab CI the GOVMOMI_ variables are defined one-by-one +# instead of sourcing them from a file! +VCENTER_CREDS="${VCENTER_CREDS:-}" +if [ -n "$VCENTER_CREDS" ]; then # shellcheck source=/dev/null -source "$VCENTER_CREDS" + source "$VCENTER_CREDS" +fi # We need govc to talk to vSphere if ! hash govc; then