mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-05 02:27:15 +02:00
first refactoring fr *.bats according to shellcheck
This commit is contained in:
parent
46998dd816
commit
9ce719213b
31 changed files with 141 additions and 134 deletions
|
@ -12,10 +12,10 @@ function setup_file() {
|
|||
# We use a temporary config directory since we'll be dynamically editing
|
||||
# it with setup.sh.
|
||||
tmp_confdir=$(mktemp -d /tmp/docker-mailserver-config-relay-hosts-XXXXX)
|
||||
cp -aT test/config/relay-hosts "$tmp_confdir"
|
||||
cp -aT test/config/relay-hosts "${tmp_confdir}"
|
||||
|
||||
docker run -d --name mail_with_relays \
|
||||
-v "$tmp_confdir":/tmp/docker-mailserver \
|
||||
-v "${tmp_confdir}":/tmp/docker-mailserver \
|
||||
-v "$(pwd)/test/test-files":/tmp/docker-mailserver-test:ro \
|
||||
-e RELAY_HOST=default.relay.com \
|
||||
-e RELAY_PORT=2525 \
|
||||
|
@ -24,17 +24,17 @@ function setup_file() {
|
|||
--cap-add=SYS_PTRACE \
|
||||
-e PERMIT_DOCKER=host \
|
||||
-e DMS_DEBUG=0 \
|
||||
-h mail.my-domain.com -t ${NAME}
|
||||
-h mail.my-domain.com -t "${NAME}"
|
||||
wait_for_finished_setup_in_container mail_with_relays
|
||||
}
|
||||
|
||||
function teardown_file() {
|
||||
docker rm -f mail_with_relays
|
||||
rm -rf "$tmp_confdir"
|
||||
rm -rf "${tmp_confdir}"
|
||||
}
|
||||
|
||||
@test "first" {
|
||||
# this test must come first to reliably identify when to run setup_file
|
||||
skip 'this test must come first to reliably identify when to run setup_file'
|
||||
}
|
||||
|
||||
@test "checking relay hosts: default mapping is added from env vars" {
|
||||
|
@ -87,5 +87,5 @@ function teardown_file() {
|
|||
}
|
||||
|
||||
@test "last" {
|
||||
# this test is only there to reliably mark the end for the teardown_file
|
||||
skip 'this test is only there to reliably mark the end for the teardown_file'
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue