Implement ./setup.sh email list (#287)

This commit adds a script nammed 'listmailuser'. './setup.sh' uses this
this script for its subcommand './setup.sh email list'. A test have
been added too.
This commit is contained in:
Josef Friedrich 2016-08-29 13:44:36 +02:00 committed by Thomas VIAL
parent 69ee54513e
commit 98e59a7abe
4 changed files with 27 additions and 4 deletions

View file

@ -591,6 +591,12 @@
[ -z "$output" ]
}
@test "checking accounts: listmailuser" {
run docker exec mail /bin/sh -c "listmailuser | head -n 1"
[ "$status" -eq 0 ]
[ "$output" = user1@localhost.localdomain ]
}
@test "checking accounts: no error is generated when deleting a user if /tmp/docker-mailserver/postfix-accounts.cf is missing" {
run docker run --rm \
-v "$(pwd)/test/config/without-accounts/":/tmp/docker-mailserver/ \