Added test case in tests.bats: container shouldn't start up when an

account.cf is present.
This commit is contained in:
angus 2016-04-19 11:50:49 +02:00
parent c8eaf655ca
commit cfdefb624f
1 changed files with 8 additions and 0 deletions

View File

@ -195,7 +195,15 @@
# accounts
#
@test "checking accounts.cf: if present shouldn't start the container" {
cp `pwd`/postfix/disab.accounts.cf `pwd`/postfix/accounts.cf
run docker run --rm --name test_on_accounts -v "$(pwd)/postfix":/tmp/postfix `docker inspect --format '{{ .Config.Image }}' mail`
[ "$status" -eq 1 ]
[ "${lines[1]}" = "SECURITY WARNING ==> ABORTED startup !" ]
}
@test "checking accounts: user accounts" {
rm -f `pwd`/postfix/accounts.cf
run docker exec mail sasldblistusers2
[ "$status" -eq 0 ]
[ "${lines[0]}" = "user1@localhost.localdomain: userPassword" ]