diff --git a/test/openshift/e2e/parallel/1-057_validate_notifications/05-verify-email.yaml b/test/openshift/e2e/parallel/1-057_validate_notifications/05-verify-email.yaml index adf7a6828..817b1f912 100644 --- a/test/openshift/e2e/parallel/1-057_validate_notifications/05-verify-email.yaml +++ b/test/openshift/e2e/parallel/1-057_validate_notifications/05-verify-email.yaml @@ -3,17 +3,25 @@ kind: TestStep commands: - script: | set -e - sleep 5 smtp4dev_pod=$(kubectl get pod -l=app=smtp4dev -o NAME -n $NAMESPACE) - exit_code=$(kubectl -n $NAMESPACE exec --stdin "${smtp4dev_pod}" -- /bin/bash \ - -c 'if [[ $(grep -rnw /tmp -e "Subject: Application my-app-3 has been created.") ]]; then - exit 0; else - exit 1; - fi') + while : + do + if [[ $timer -eq 120 ]]; then + echo "timed out while waiting for email notification" + exit 1 + fi + + exit_code=$(kubectl -n $NAMESPACE exec --stdin "${smtp4dev_pod}" -- /bin/bash \ + -c 'if [[ $(grep -rnw /tmp -e "Subject: Application my-app-3 has been created.") ]]; then + exit 0; else + exit 1; + fi') - if [[ $exit_code -eq 0 ]]; then + if [[ $exit_code -eq 0 ]]; then exit 0 - else - exit 1 - fi \ No newline at end of file + fi + + timer=$((timer+5)) + sleep 5 + done \ No newline at end of file