mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
48 lines
1.6 KiB
Plaintext
48 lines
1.6 KiB
Plaintext
|
load "${REPOSITORY_ROOT}/test/helper/common"
|
||
|
load "${REPOSITORY_ROOT}/test/helper/setup"
|
||
|
|
||
|
TEST_NAME_PREFIX='Override Configs:'
|
||
|
CONTAINER_NAME='dms-test_config-overrides'
|
||
|
|
||
|
function setup_file() {
|
||
|
init_with_defaults
|
||
|
|
||
|
# Move override configs into main `/tmp/docker-mailserver` config location:
|
||
|
mv "${TEST_TMP_CONFIG}/override-configs/"* "${TEST_TMP_CONFIG}/"
|
||
|
|
||
|
common_container_setup
|
||
|
}
|
||
|
|
||
|
function teardown_file() { _default_teardown ; }
|
||
|
|
||
|
@test "${TEST_NAME_PREFIX}: Postfix - 'postfix-main.cf' overrides applied to '/etc/postfix/main.cf'" {
|
||
|
_run_in_container grep -q 'max_idle = 600s' /tmp/docker-mailserver/postfix-main.cf
|
||
|
assert_success
|
||
|
|
||
|
_run_in_container grep -q 'readme_directory = /tmp' /tmp/docker-mailserver/postfix-main.cf
|
||
|
assert_success
|
||
|
|
||
|
_run_in_container postconf
|
||
|
assert_success
|
||
|
assert_output --partial 'max_idle = 600s'
|
||
|
assert_output --partial 'readme_directory = /tmp'
|
||
|
}
|
||
|
|
||
|
@test "${TEST_NAME_PREFIX}: Postfix - 'postfix-master.cf' overrides applied to '/etc/postfix/master.cf'" {
|
||
|
_run_in_container grep -q 'submission/inet/smtpd_sasl_security_options=noanonymous' /tmp/docker-mailserver/postfix-master.cf
|
||
|
assert_success
|
||
|
|
||
|
_run_in_container postconf -M
|
||
|
assert_success
|
||
|
assert_output --partial '-o smtpd_sasl_security_options=noanonymous'
|
||
|
}
|
||
|
|
||
|
@test "${TEST_NAME_PREFIX}: Dovecot - 'dovecot.cf' overrides applied to '/etc/dovecot/local.conf'" {
|
||
|
_run_in_container grep -q 'mail_max_userip_connections = 69' /tmp/docker-mailserver/dovecot.cf
|
||
|
assert_success
|
||
|
|
||
|
_run_in_container doveconf
|
||
|
assert_success
|
||
|
assert_output --partial 'mail_max_userip_connections = 69'
|
||
|
}
|