From d19a070fafe82167232868761911e5013eeaebb5 Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Sun, 22 Sep 2019 11:45:07 +0300 Subject: [PATCH] Add canary status checks to Istio e2e tests --- test/e2e-tests.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/test/e2e-tests.sh b/test/e2e-tests.sh index 5fb75fe1..f0e04da7 100755 --- a/test/e2e-tests.sh +++ b/test/e2e-tests.sh @@ -124,6 +124,21 @@ until ${ok}; do fi done +echo '>>> Waiting for canary finalization' +retries=50 +count=0 +ok=false +until ${ok}; do + kubectl -n test get canary/podinfo | grep 'Succeeded' && ok=true || ok=false + sleep 5 + count=$(($count + 1)) + if [[ ${count} -eq ${retries} ]]; then + kubectl -n istio-system logs deployment/flagger + echo "No more retries left" + exit 1 + fi +done + echo '✔ Canary promotion test passed' if [[ "$1" = "canary" ]]; then @@ -186,6 +201,21 @@ until ${ok}; do fi done +echo '>>> Waiting for B/G finalization' +retries=50 +count=0 +ok=false +until ${ok}; do + kubectl -n test get canary/podinfo | grep 'Succeeded' && ok=true || ok=false + sleep 5 + count=$(($count + 1)) + if [[ ${count} -eq ${retries} ]]; then + kubectl -n istio-system logs deployment/flagger + echo "No more retries left" + exit 1 + fi +done + echo '✔ B/G promotion test passed' cat <