mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
1005bb3b09
* provide complete refactoring of openDKIM usage and tests * fix leftover linting errors * correct defualt key size and README usage * provide independent order for arguments * added `config` and adjusted usage information * fixing shift in setup.sh * adjust usage information to use new style and rename script * use updated argument keysize instead of size
29 lines
857 B
Bash
29 lines
857 B
Bash
load 'test_helper/common'
|
|
|
|
function setup() {
|
|
local PRIVATE_CONFIG
|
|
PRIVATE_CONFIG="$(duplicate_config_for_container relay-hosts)"
|
|
docker run -d --name mail_with_default_relay \
|
|
-v "${PRIVATE_CONFIG}":/tmp/docker-mailserver \
|
|
-v "$(pwd)/test/test-files":/tmp/docker-mailserver-test:ro \
|
|
-e DEFAULT_RELAY_HOST=default.relay.host.invalid:25 \
|
|
--cap-add=SYS_PTRACE \
|
|
-e PERMIT_DOCKER=host \
|
|
-e DMS_DEBUG=0 \
|
|
-h mail.my-domain.com -t "${NAME}"
|
|
wait_for_finished_setup_in_container mail_with_default_relay
|
|
}
|
|
|
|
function teardown() {
|
|
docker rm -f mail_with_default_relay
|
|
}
|
|
|
|
#
|
|
# default relay host
|
|
#
|
|
|
|
@test "checking default relay host: default relay host is added to main.cf" {
|
|
run docker exec mail_with_default_relay /bin/sh -c 'grep -e "^relayhost =" /etc/postfix/main.cf'
|
|
assert_output 'relayhost = default.relay.host.invalid:25'
|
|
}
|