diff --git a/Makefile b/Makefile index 05029946..a64deb56 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/test/main.cf b/test/main.cf new file mode 100644 index 00000000..37155392 --- /dev/null +++ b/test/main.cf @@ -0,0 +1,2 @@ +max_idle = 600s +readme_directory = /tmp diff --git a/test/tests.bats b/test/tests.bats index be681fb1..89de473e 100644 --- a/test/tests.bats +++ b/test/tests.bats @@ -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 #