mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
Added IMAP connection integration test
This commit is contained in:
parent
d7ce15957f
commit
07177f04cd
4
test/email-templates/test-imap.txt
Normal file
4
test/email-templates/test-imap.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
a1 LOGIN user1@localhost.localdomain mypassword
|
||||
a3 EXAMINE INBOX
|
||||
a4 FETCH 1 BODY[]
|
||||
a5 LOGOUT
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue