From 1f46b56cadd5ebb521064dcd60a237dd01107a25 Mon Sep 17 00:00:00 2001 From: Nestor Acuna Blanco Date: Thu, 25 Jul 2024 10:15:07 +0200 Subject: [PATCH] fix: check if TARGET environment variable is set for e2e testing The end-to-end tests require the TARGET environment variable to be set. It is better to catch any failures related to this early on. Signed-off-by: Nestor Acuna Blanco --- automation/test.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/automation/test.sh b/automation/test.sh index 46956d54..e2d996ce 100755 --- a/automation/test.sh +++ b/automation/test.sh @@ -66,6 +66,12 @@ function latest_version() { tail -n1 } +# Check if the TARGET environment variable is set +if [ -z "$TARGET" ]; then + echo "Error: a target is needed: please set the TARGET environment variable" + exit 1 +fi + # Latest released Kubevirt version export KUBEVIRT_VERSION=$(latest_version "kubevirt")