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
|
|
|
|
2023-01-03 05:58:09 +00:00
|
|
|
TEST_NAME_PREFIX='[Relay] ENV:'
|
|
|
|
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=(
|
2023-01-03 05:58:09 +00:00
|
|
|
--env DEFAULT_RELAY_HOST=default.relay.host.invalid:25
|
|
|
|
--env PERMIT_DOCKER=host
|
2022-11-25 21:59:14 +00:00
|
|
|
)
|
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
|
|
|
|
2023-01-03 05:58:09 +00:00
|
|
|
@test "${TEST_NAME_PREFIX} 'DEFAULT_RELAY_HOST' should configure 'main.cf:relayhost'" {
|
2022-11-25 21:59:14 +00:00
|
|
|
_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
|
|
|
}
|