Merge pull request #211 from Crafter6432/usermanagement

Usermanagement
This commit is contained in:
Thomas VIAL 2016-06-20 12:18:15 +02:00 committed by GitHub
commit 1d942fa4d2
4 changed files with 66 additions and 1 deletions

View file

@ -466,3 +466,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" ]
}