mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-04 01:55:29 +02:00
tests: Use swaks
instead of nc
for sending mail (#3732)
See associated `CHANGELOG.md` entry for details. --------- Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
This commit is contained in:
parent
0889b0ff06
commit
9e81517fe3
119 changed files with 355 additions and 455 deletions
|
@ -38,7 +38,7 @@ function teardown() { _default_teardown ; }
|
|||
# - A warning is raised about usage of potentially insecure parameters.
|
||||
@test "Custom" {
|
||||
export CONTAINER_NAME=${CONTAINER2_NAME}
|
||||
local DH_PARAMS_CUSTOM='test/test-files/ssl/custom-dhe-params.pem'
|
||||
local DH_PARAMS_CUSTOM='test/files/ssl/custom-dhe-params.pem'
|
||||
local DH_CHECKSUM_CUSTOM=$(sha512sum "${DH_PARAMS_CUSTOM}" | awk '{print $1}')
|
||||
|
||||
_init_with_defaults
|
||||
|
|
|
@ -88,7 +88,7 @@ function _initial_setup() {
|
|||
# All of these certs support both FQDNs (`mail.example.test` and `example.test`),
|
||||
# Except for the wildcard cert (`*.example.test`), that was created with `example.test` intentionally excluded from SAN.
|
||||
# We want to maintain the same FQDN (`mail.example.test`) between the _acme_ecdsa and _acme_rsa tests.
|
||||
local LOCAL_BASE_PATH="${PWD}/test/test-files/ssl/example.test/with_ca/rsa"
|
||||
local LOCAL_BASE_PATH="${PWD}/test/files/ssl/example.test/with_ca/rsa"
|
||||
|
||||
function _prepare() {
|
||||
# Default `acme.json` for _acme_ecdsa test:
|
||||
|
@ -240,7 +240,7 @@ function _copy_to_letsencrypt_storage() {
|
|||
FQDN_DIR=$(echo "${DEST}" | cut -d '/' -f1)
|
||||
mkdir -p "${TEST_TMP_CONFIG}/letsencrypt/${FQDN_DIR}"
|
||||
|
||||
if ! cp "${PWD}/test/test-files/ssl/${SRC}" "${TEST_TMP_CONFIG}/letsencrypt/${DEST}"; then
|
||||
if ! cp "${PWD}/test/files/ssl/${SRC}" "${TEST_TMP_CONFIG}/letsencrypt/${DEST}"; then
|
||||
echo "Could not copy cert file '${SRC}'' to '${DEST}'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
@ -20,7 +20,7 @@ function setup_file() {
|
|||
export TEST_DOMAIN='example.test'
|
||||
|
||||
local CUSTOM_SETUP_ARGUMENTS=(
|
||||
--volume "${PWD}/test/test-files/ssl/${TEST_DOMAIN}/with_ca/ecdsa/:/config/ssl/:ro"
|
||||
--volume "${PWD}/test/files/ssl/${TEST_DOMAIN}/with_ca/ecdsa/:/config/ssl/:ro"
|
||||
--env LOG_LEVEL='trace'
|
||||
--env SSL_TYPE='manual'
|
||||
--env TLS_LEVEL='modern'
|
||||
|
@ -108,10 +108,10 @@ function teardown_file() { _default_teardown ; }
|
|||
|
||||
@test "manual cert changes are picked up by check-for-changes" {
|
||||
printf '%s' 'someThingsChangedHere' \
|
||||
>>"$(pwd)/test/test-files/ssl/${TEST_DOMAIN}/with_ca/ecdsa/key.ecdsa.pem"
|
||||
>>"$(pwd)/test/files/ssl/${TEST_DOMAIN}/with_ca/ecdsa/key.ecdsa.pem"
|
||||
|
||||
run timeout 15 docker exec "${CONTAINER_NAME}" bash -c "tail -F /var/log/supervisor/changedetector.log | sed '/Manual certificates have changed/ q'"
|
||||
assert_success
|
||||
|
||||
sed -i '/someThingsChangedHere/d' "$(pwd)/test/test-files/ssl/${TEST_DOMAIN}/with_ca/ecdsa/key.ecdsa.pem"
|
||||
sed -i '/someThingsChangedHere/d' "$(pwd)/test/files/ssl/${TEST_DOMAIN}/with_ca/ecdsa/key.ecdsa.pem"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue