Do not run tempest run if the custom params are placeholders
Stop starting the tempest run in the offline workspace in
case the tempest_custom.yaml file has placeholders because the
preparation script is not executed.
Related-PROD: PROD-37187
Change-Id: I2eb44279424d3cc98b334ba63a73a6af63359880
diff --git a/k8s/workspace/run-openstack-func-full.sh b/k8s/workspace/run-openstack-func-full.sh
index c1b0aea..df02d60 100644
--- a/k8s/workspace/run-openstack-func-full.sh
+++ b/k8s/workspace/run-openstack-func-full.sh
@@ -4,6 +4,12 @@
cd $MY_PROJFOLDER/tmp
. $MY_PROJFOLDER/env.sh
. $MY_PROJFOLDER/envs/${tenv}rc
+
+if grep -q "public_subnet_uuid" "$MY_PROJFOLDER/yamls/tempest_custom.yaml"; then
+ echo "The ${MY_PROJFOLDER}/yamls/tempest_custom.yaml file is not updated, it has the placeholders. Please run '. $MY_PROJFOLDER/env.sh && . $MY_PROJFOLDER/envs/mosrc && bash $MY_PROJFOLDER/scripts/update-openstack-resources.sh' before running tempest."
+ exit 1
+fi
+
# Just in case
unset TARGET_CLUSTER
unset TARGET_NAMESPACE
diff --git a/k8s/workspace/run-openstack-func-smoke.sh b/k8s/workspace/run-openstack-func-smoke.sh
index cfa71e3..165902f 100644
--- a/k8s/workspace/run-openstack-func-smoke.sh
+++ b/k8s/workspace/run-openstack-func-smoke.sh
@@ -4,6 +4,12 @@
cd $MY_PROJFOLDER/tmp
. $MY_PROJFOLDER/env.sh
. $MY_PROJFOLDER/envs/${tenv}rc
+
+if grep -q "public_subnet_uuid" "$MY_PROJFOLDER/yamls/tempest_custom.yaml"; then
+ echo "The ${MY_PROJFOLDER}/yamls/tempest_custom.yaml file is not updated, it has the placeholders. Please run '. $MY_PROJFOLDER/env.sh && . $MY_PROJFOLDER/envs/mosrc && bash $MY_PROJFOLDER/scripts/update-openstack-resources.sh' before running tempest."
+ exit 1
+fi
+
# Just in case
unset TARGET_CLUSTER
unset TARGET_NAMESPACE