E2E scripting and documentation improvements (#2228)

* prevent terminal from closing after unsuccessful source

* CLUSTER needs to be set locally
This commit is contained in:
Jason Healy 2022-07-07 09:26:26 -06:00 коммит произвёл GitHub
Родитель 89274ea6d4
Коммит e2093f95da
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 12 добавлений и 11 удалений

Просмотреть файл

@ -61,7 +61,8 @@ End to end tests are run using ginkgo. You can run subsets of tests or ignore so
# source your environment file
. ./secrets/env
# set the LOCAL_E2E env if you are testing locally
# set the CLUSTER and LOCAL_E2E env if you are testing locally
export CLUSTER=<cluster-name>
export LOCAL_E2E="true"
# source the e2e helper file

Просмотреть файл

@ -89,13 +89,13 @@ if [ -z "${LOCAL_E2E}" ] ; then
fi
if [ -z "${CLUSTER}" ] ; then
echo "CLUSTER is not set , aborting"
exit 1
echo "CLUSTER is not set, aborting"
return 1
fi
if [ -z "${DATABASE_NAME}" ] ; then
echo "DATABASE_NAME is not set , aborting"
exit 1
echo "DATABASE_NAME is not set, aborting"
return 1
fi
echo "######################################"
@ -117,11 +117,11 @@ echo
echo "PROXY_HOSTNAME=$PROXY_HOSTNAME"
echo "######################################"
[ "$LOCATION" ] || ( echo ">> LOCATION is not set please validate your ./secrets/env"; exit 128 )
[ "$RESOURCEGROUP" ] || ( echo ">> RESOURCEGROUP is not set; please validate your ./secrets/env"; exit 128 )
[ "$PROXY_HOSTNAME" ] || ( echo ">> PROXY_HOSTNAME is not set; please validate your ./secrets/env"; exit 128 )
[ "$DATABASE_ACCOUNT_NAME" ] || ( echo ">> DATABASE_ACCOUNT_NAME is not set; please validate your ./secrets/env"; exit 128 )
[ "$DATABASE_NAME" ] || ( echo ">> DATABASE_NAME is not set; please validate your ./secrets/env"; exit 128 )
[ "$AZURE_SUBSCRIPTION_ID" ] || ( echo ">> AZURE_SUBSCRIPTION_ID is not set; please validate your ./secrets/env"; exit 128 )
[ "$LOCATION" ] || ( echo ">> LOCATION is not set please validate your ./secrets/env"; return 128 )
[ "$RESOURCEGROUP" ] || ( echo ">> RESOURCEGROUP is not set; please validate your ./secrets/env"; return 128 )
[ "$PROXY_HOSTNAME" ] || ( echo ">> PROXY_HOSTNAME is not set; please validate your ./secrets/env"; return 128 )
[ "$DATABASE_ACCOUNT_NAME" ] || ( echo ">> DATABASE_ACCOUNT_NAME is not set; please validate your ./secrets/env"; return 128 )
[ "$DATABASE_NAME" ] || ( echo ">> DATABASE_NAME is not set; please validate your ./secrets/env"; return 128 )
[ "$AZURE_SUBSCRIPTION_ID" ] || ( echo ">> AZURE_SUBSCRIPTION_ID is not set; please validate your ./secrets/env"; return 128 )
az account set -s $AZURE_SUBSCRIPTION_ID >/dev/null