diff --git a/deploy/ci/automation/helmtest.sh b/deploy/ci/automation/helmtest.sh index cc91f0be6f..c13d38c38e 100755 --- a/deploy/ci/automation/helmtest.sh +++ b/deploy/ci/automation/helmtest.sh @@ -46,10 +46,12 @@ function waitForHelmRelease { COUNT=$(kubectl get po --namespace=${NAMESPACE} | wc -l) kubectl get po --namespace=${NAMESPACE} if [ $COUNT -ge 3 ]; then + # COUNT includes the column header line READY=$(kubectl get po --namespace=${NAMESPACE} | grep "Running" | wc -l) COMPLETED=$(kubectl get po --namespace=${NAMESPACE} | grep "Completed" | wc -l) - TOTAL=$(($READY1+ $COMPLETED)) - if [ $TOTAL -eq $COUNT ]; then + TOTAL=$(($READY + $COMPLETED)) + EXPECTED=$(($COUNT - 1)) + if [ $TOTAL -eq $EXPECTED ]; then READY1=$(kubectl get po --namespace=${NAMESPACE} | grep "3/3" | wc -l) READY2=$(kubectl get po --namespace=${NAMESPACE} | grep "1/1" | wc -l) READY=$(($READY1 + $READY2))