2022-11-25 22:37:58 +00:00
|
|
|
load "${REPOSITORY_ROOT}/test/helper/setup"
|
|
|
|
load "${REPOSITORY_ROOT}/test/helper/common"
|
2019-08-08 19:33:55 +00:00
|
|
|
|
2022-11-25 21:59:14 +00:00
|
|
|
export TEST_NAME_PREFIX='default relay host:'
|
|
|
|
export CONTAINER_NAME='dms-test-default_relay_host'
|
2022-05-30 00:53:30 +00:00
|
|
|
|
2022-11-25 21:59:14 +00:00
|
|
|
function setup_file() {
|
|
|
|
init_with_defaults
|
2022-05-30 00:53:30 +00:00
|
|
|
|
2022-11-25 21:59:14 +00:00
|
|
|
local CUSTOM_SETUP_ARGUMENTS=(
|
|
|
|
--env DEFAULT_RELAY_HOST=default.relay.host.invalid:25 \
|
|
|
|
--env PERMIT_DOCKER=host \
|
|
|
|
)
|
2019-08-08 19:33:55 +00:00
|
|
|
|
2022-11-25 21:59:14 +00:00
|
|
|
common_container_setup 'CUSTOM_SETUP_ARGUMENTS'
|
2019-08-08 19:33:55 +00:00
|
|
|
}
|
|
|
|
|
2022-11-25 21:59:14 +00:00
|
|
|
function teardown_file() { _default_teardown ; }
|
2019-08-08 19:33:55 +00:00
|
|
|
|
2022-11-25 21:59:14 +00:00
|
|
|
@test "${TEST_NAME_PREFIX} default relay host is added to main.cf" {
|
|
|
|
_run_in_container bash -c 'grep -e "^relayhost =" /etc/postfix/main.cf'
|
2019-08-21 19:16:39 +00:00
|
|
|
assert_output 'relayhost = default.relay.host.invalid:25'
|
2020-10-19 11:13:42 +00:00
|
|
|
}
|