Add MailboxIntegrationTest against a real mailbox instance

This commit is contained in:
Torsten Grote
2022-01-07 14:29:32 -03:00
parent 9fa54bf15c
commit 519837e829
3 changed files with 160 additions and 19 deletions

21
wait-for-mailbox.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
set -e
URL="http://127.0.0.1:8000/status"
attempt_counter=0
max_attempts=200 # 10min - CI for mailbox currently takes ~5min
echo "Waiting for mailbox to come online at $URL"
until [[ "$(curl -s -o /dev/null -w '%{http_code}' $URL)" == "401" ]]; do
if [ ${attempt_counter} -eq ${max_attempts} ]; then
echo "Timed out waiting for mailbox"
exit 1
fi
printf '.'
attempt_counter=$((attempt_counter + 1))
sleep 3
done
echo "Mailbox started"