Improvements on CI tests: now user account checks are working.

Need to work on fail2ban tests.
This commit is contained in:
angus 2016-04-17 20:10:09 +02:00
parent b35c79a8dd
commit a6d666b450

View file

@ -52,7 +52,7 @@
}
@test "checking imap: server is ready with STARTTLS" {
run docker exec mail /bin/bash -c "nc -w 1 0.0.0.0 143 | grep '* OK' | grep 'STARTTLS' | grep 'ready'"
run docker exec mail /bin/bash -c "nc -w 5 0.0.0.0 143 | grep '* OK' | grep 'STARTTLS' | grep 'ready'"
[ "$status" -eq 0 ]
}
@ -182,32 +182,15 @@
}
@test "checking accounts: user mail folders for user1" {
run docker exec mail ls -A /var/mail/localhost.localdomain/user1
run docker exec mail /bin/bash -c "ls -A /var/mail/localhost.localdomain/user1 | grep -E '.Drafts|.Sent|.Trash|cur|new|subscriptions|tmp' | wc -l"
[ "$status" -eq 0 ]
[ "${lines[0]}" = ".Drafts" ]
[ "${lines[1]}" = ".Sent" ]
[ "${lines[2]}" = ".Trash" ]
[ "${lines[3]}" = "cur" ]
[ "${lines[4]}" = "dovecot-uidlist" ]
[ "${lines[5]}" = "dovecot-uidvalidity" ]
[ "${lines[6]}" = "dovecot-uidvalidity.5712dae3" ]
[ "${lines[7]}" = "dovecot.index.cache" ]
[ "${lines[8]}" = "dovecot.index.log" ]
[ "${lines[9]}" = "new" ]
[ "${lines[10]}" = "subscriptions" ]
[ "${lines[11]}" = "tmp" ]
[ "$output" -eq 7 ]
}
@test "checking accounts: user mail folders for user2" {
run docker exec mail ls -A /var/mail/otherdomain.tld/user2
run docker exec mail /bin/bash -c "ls -A /var/mail/otherdomain.tld/user2 | grep -E '.Drafts|.Sent|.Trash|cur|new|subscriptions|tmp' | wc -l"
[ "$status" -eq 0 ]
[ "${lines[0]}" = ".Drafts" ]
[ "${lines[1]}" = ".Sent" ]
[ "${lines[2]}" = ".Trash" ]
[ "${lines[3]}" = "cur" ]
[ "${lines[4]}" = "new" ]
[ "${lines[5]}" = "subscriptions" ]
[ "${lines[6]}" = "tmp" ]
[ "$output" -eq 7 ]
}
#