Added test case in tests.bats: container shouldn't start up when an
account.cf is present.
This commit is contained in:
parent
c8eaf655ca
commit
cfdefb624f
|
@ -195,7 +195,15 @@
|
||||||
# accounts
|
# 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" {
|
@test "checking accounts: user accounts" {
|
||||||
|
rm -f `pwd`/postfix/accounts.cf
|
||||||
run docker exec mail sasldblistusers2
|
run docker exec mail sasldblistusers2
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[ "${lines[0]}" = "user1@localhost.localdomain: userPassword" ]
|
[ "${lines[0]}" = "user1@localhost.localdomain: userPassword" ]
|
||||||
|
|
Loading…
Reference in New Issue