summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2016-12-22 18:24:59 +0100
committerKali Kaneko (leap communications) <kali@leap.se>2016-12-26 14:55:46 +0100
commit3ec7145e50c10ef06b135f0a980c44faf22e14c2 (patch)
treeb5695b9d3338579b74ed1fd017132c6dbfde1164 /tests
parentcf8f358c585786aa5e00513fe3c9c382a6118cae (diff)
[test] first working e2e test
Diffstat (limited to 'tests')
-rwxr-xr-xtests/e2e/e2e-test.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/e2e/e2e-test.sh b/tests/e2e/e2e-test.sh
index 3006c5b..6e50604 100755
--- a/tests/e2e/e2e-test.sh
+++ b/tests/e2e/e2e-test.sh
@@ -8,9 +8,11 @@
#
# as an example:
# export FROM_EXTERNAL_OPTS='-f user@example.org --tlsc --au user@example.or -ap MYPASSWORD -s smtp.example.org'
+#
+# TODO:
+# - Timeout waiting for mail
-set -x
set -e
PROVIDER='cdev.bitmask.net'
@@ -60,9 +62,10 @@ echo "IMAP/SMTP PASSWD: $imap_pw"
# Send testmail
$SWAKS $FROM_EXTERNAL_OPTS
-# XXX wait until we the get mail we just sent.
-
-while [[ ! $(./tests/e2e/getmail --mailbox INBOX --subject "$MAIL_UUID" $user $imap_pw) ]]
+# wait until we the get mail we just sent.
+while ! ./tests/e2e/getmail --mailbox INBOX --subject "$MAIL_UUID" "$user" "$imap_pw" > /dev/null
do
sleep 10
done
+
+echo "Succeeded - mail arrived"