From 7a98ead2084f3287a3ad6dcc40b3c8ed0dcdb3e5 Mon Sep 17 00:00:00 2001 From: Srdjan Grubor Date: Tue, 14 May 2019 11:47:43 -0500 Subject: [PATCH] Fixed stop script from switching namespaces needlessly Stop script was switching namespaces when namespace in question might not have been available so now we ensure that this does not happen. --- stop | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/stop b/stop index a343a0a..097823c 100755 --- a/stop +++ b/stop @@ -3,11 +3,6 @@ set -euo pipefail . utils.sh -set_namespace $TEST_APP_NAMESPACE_NAME -$cli get pods - -set_namespace default - if [[ $PLATFORM == openshift ]]; then oc login -u $OSHIFT_CLUSTER_ADMIN_USERNAME fi @@ -17,8 +12,8 @@ if has_namespace $TEST_APP_NAMESPACE_NAME; then printf "Waiting for $TEST_APP_NAMESPACE_NAME namespace deletion to complete" - while : ; do - printf "." + while true; do + printf '.' if has_namespace "$TEST_APP_NAMESPACE_NAME"; then sleep 5