Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
fi

timer=$((timer+5))
sleep 5
done
Loading