From 649a585e7d02e45787a18d6ba81af8da8d03aa26 Mon Sep 17 00:00:00 2001 From: Alejandro Ruiz Date: Fri, 8 Nov 2024 16:31:38 +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 13944eedfe7..8127b0d49d5 100755 --- a/scripts/e2e-docker-start +++ b/scripts/e2e-docker-start @@ -49,3 +49,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"