mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
Add tests for main.cf overrides
This commit is contained in:
parent
19fed39dc4
commit
3cabf10520
3
Makefile
3
Makefile
|
@ -9,6 +9,7 @@ build:
|
||||||
run:
|
run:
|
||||||
# Copy test files
|
# Copy test files
|
||||||
cp test/accounts.cf postfix/
|
cp test/accounts.cf postfix/
|
||||||
|
cp test/main.cf postfix/
|
||||||
cp test/virtual postfix/
|
cp test/virtual postfix/
|
||||||
# Run containers
|
# Run containers
|
||||||
docker run -d --name mail \
|
docker run -d --name mail \
|
||||||
|
@ -51,6 +52,6 @@ tests:
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
# Get default files back
|
# 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
|
# Remove running test containers
|
||||||
docker rm -f mail mail_pop3 mail_smtponly
|
docker rm -f mail mail_pop3 mail_smtponly
|
||||||
|
|
2
test/main.cf
Normal file
2
test/main.cf
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
max_idle = 600s
|
||||||
|
readme_directory = /tmp
|
|
@ -217,6 +217,13 @@
|
||||||
[ "${lines[1]}" = "otherdomain.tld" ]
|
[ "${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
|
# spamassassin
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue