From 764bcd5a1bd6706e18768c184a344716b58233d8 Mon Sep 17 00:00:00 2001 From: Manuel Alejandro de Brito Fontes Date: Wed, 13 Jun 2018 16:27:17 -0400 Subject: [PATCH] Wait the result of the controller deployment before running any test (#2638) --- test/e2e/wait-for-nginx.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/e2e/wait-for-nginx.sh b/test/e2e/wait-for-nginx.sh index 52b628af3..72147db34 100755 --- a/test/e2e/wait-for-nginx.sh +++ b/test/e2e/wait-for-nginx.sh @@ -14,6 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +set -e + DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" export NAMESPACE=$1 @@ -22,3 +24,9 @@ echo "deploying NGINX Ingress controller in namespace $NAMESPACE" sed "s@\${NAMESPACE}@${NAMESPACE}@" $DIR/../manifests/ingress-controller/mandatory.yaml | kubectl apply --namespace=$NAMESPACE -f - cat $DIR/../manifests/ingress-controller/service-nodeport.yaml | kubectl apply --namespace=$NAMESPACE -f - + +# wait for the deployment and fail if there is an error before starting the execution of any test +kubectl rollout status \ + --request-timeout=3m \ + --namespace $NAMESPACE \ + deployment nginx-ingress-controller