add forgotten tests.bat

This commit is contained in:
Thorsten von Eicken 2016-05-23 21:30:22 -07:00
parent 12ff51daaa
commit dcad03f3f0

View file

@ -140,10 +140,16 @@
[ "$output" = 1 ]
}
@test "checking smtp: user1 should have received 2 mails" {
@test "checking smtp: delivers mail to regexp alias" {
run docker exec mail /bin/sh -c "grep 'to=<user1@localhost.localdomain>, orig_to=<test123@localhost.localdomain>' /var/log/mail/mail.log | grep 'status=sent' | wc -l"
[ "$status" -eq 0 ]
[ "$output" = 1 ]
}
@test "checking smtp: user1 should have received 3 mails" {
run docker exec mail /bin/sh -c "ls -A /var/mail/localhost.localdomain/user1/new | wc -l"
[ "$status" -eq 0 ]
[ "$output" = 2 ]
[ "$output" = 3 ]
}
@test "checking smtp: rejects mail to unknown user" {
@ -152,7 +158,7 @@
[ "$output" = 1 ]
}
@test "checking smtp: redirects mail to external alias" {
@test "checking smtp: redirects mail to external aliases" {
run docker exec mail /bin/sh -c "grep -- '-> <external1@otherdomain.tld>' /var/log/mail/mail.log | wc -l"
[ "$status" -eq 0 ]
[ "$output" = 1 ]