ci: refactored sedfile & used _send_mail where possible (#3103)

Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
This commit is contained in:
Georg Lauterbach 2023-02-22 10:26:04 +01:00 committed by GitHub
parent 853301338c
commit 35692a9111
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 55 additions and 76 deletions

View file

@ -13,6 +13,7 @@
#
# @param ${1} = template file (path) name
# @param ${2} = container name [OPTIONAL]
# @param ${3} = port `nc` will use [OPTIONAL]
#
# ## Attention
#
@ -22,8 +23,9 @@
function _send_email() {
local TEMPLATE_FILE=${1:?Must provide name of template file}
local CONTAINER_NAME=$(__handle_container_name "${2:-}")
local PORT=${3:-25}
_run_in_container_bash "nc 0.0.0.0 25 < /tmp/docker-mailserver-test/email-templates/${TEMPLATE_FILE}.txt"
_run_in_container_bash "nc 0.0.0.0 ${PORT} < /tmp/docker-mailserver-test/email-templates/${TEMPLATE_FILE}.txt"
assert_success
}