added tests for addmailuser delmailuser

This commit is contained in:
shim_ 2016-06-14 16:17:06 +02:00
parent b9aceb9d6f
commit 7c63d00d77
1 changed files with 20 additions and 0 deletions

View File

@ -471,3 +471,23 @@
run docker exec mail_pop3 /bin/bash -c "nc -z 0.0.0.0 4190"
[ "$status" -ne 0 ]
}
#
# accounts
#
@test "checking accounts: user3 should have been added to /tmp/docker-mailserver/postfix-accounts.cf" {
docker exec mail /bin/sh -c "addmailuser user3@domain.tld mypassword"
run docker exec mail /bin/sh -c "grep user3@domain.tld -i /tmp/docker-mailserver/postfix-accounts.cf"
[ "$status" -eq 0 ]
[ ! -z "$output" ]
}
@test "checking accounts: user3 should have been removed from /tmp/docker-mailserver/postfix-accounts.cf" {
docker exec mail /bin/sh -c "delmailuser user3@domain.tld"
run docker exec mail /bin/sh -c "grep user3@domain.tld -i /tmp/docker-mailserver/postfix-accounts.cf"
[ "$status" -eq 1 ]
[ -z "$output" ]
}