From 79d71c62cc0dd3874617ab9ceabad4ddee9f8451 Mon Sep 17 00:00:00 2001 From: Alejandro Ruiz Date: Thu, 7 Nov 2024 13:07:01 +0100 Subject: [PATCH] e2e: wait for webhook to be ready --- scripts/e2e-docker-start | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/e2e-docker-start b/scripts/e2e-docker-start index cddc9c3cab..cdd69be5ba 100755 --- a/scripts/e2e-docker-start +++ b/scripts/e2e-docker-start @@ -59,3 +59,16 @@ if [ "$STATUS" != "200" ]; then fi echo "Dashboard UI is ready" + +echo "Waiting for webhook to be running..." +okay=0 +while [ $okay -lt 20 ] ; do + if docker exec cypress kubectl -n cattle-system get po -l app=rancher-webhook | grep -q '1/1.*Running' ; then + break + else + echo "Webhook not ready, checking again in 10s..." + okay=$((okay+1)) + sleep 10 + fi +done +echo "Rancher is ready"