Add tests for main.cf overrides

This commit is contained in:
Chris54721 2016-03-18 20:07:58 +01:00
parent 19fed39dc4
commit 3cabf10520
3 changed files with 11 additions and 1 deletions

View file

@ -9,6 +9,7 @@ build:
run:
# Copy test files
cp test/accounts.cf postfix/
cp test/main.cf postfix/
cp test/virtual postfix/
# Run containers
docker run -d --name mail \
@ -51,6 +52,6 @@ tests:
clean:
# Get default files back
git checkout postfix/accounts.cf postfix/virtual
git checkout postfix/accounts.cf postfix/main.cf postfix/virtual
# Remove running test containers
docker rm -f mail mail_pop3 mail_smtponly

2
test/main.cf Normal file
View file

@ -0,0 +1,2 @@
max_idle = 600s
readme_directory = /tmp

View file

@ -217,6 +217,13 @@
[ "${lines[1]}" = "otherdomain.tld" ]
}
@test "checking postfix: main.cf overrides" {
run docker exec mail grep -q 'max_idle = 600s' /tmp/postfix/main.cf
[ "$status" -eq 0 ]
run docker exec mail grep -q 'readme_directory = /tmp' /tmp/postfix/main.cf
[ "$status" -eq 0 ]
}
#
# spamassassin
#