Added IMAP connection integration test

This commit is contained in:
Thomas VIAL 2015-11-22 01:57:52 +01:00
parent d7ce15957f
commit 07177f04cd
2 changed files with 8 additions and 0 deletions

View file

@ -0,0 +1,4 @@
a1 LOGIN user1@localhost.localdomain mypassword
a3 EXAMINE INBOX
a4 FETCH 1 BODY[]
a5 LOGOUT

View file

@ -10,6 +10,10 @@ assert_raises "docker exec mail ps aux --forest | grep '/usr/sbin/saslauthd'" 0
assert_raises "docker exec mail ps aux --forest | grep '/usr/sbin/clamd'" 0
assert_raises "docker exec mail ps aux --forest | grep '/usr/sbin/amavisd-new'" 0
# Testing IMAP server
assert_raises "docker exec mail nc -w 1 0.0.0.0 143 | grep '* OK' | grep 'STARTTLS' | grep 'Courier-IMAP ready'" 0
assert_raises "docker exec mail /bin/sh -c 'nc -w 1 0.0.0.0 143 < /tmp/test/email-templates/test-imap.txt'" 0
# Testing user creation
assert "docker exec mail sasldblistusers2" "user1@localhost.localdomain: userPassword\nuser2@otherdomain.tld: userPassword"
assert "docker exec mail ls -A /var/mail/localhost.localdomain/user1" "cur\nnew\ntmp"