Apply suggestions from code review
This commit is contained in:
parent
7c39c154db
commit
7f825835f4
|
@ -94,6 +94,7 @@ function _print_mail_log_of_queue_id_from_msgid() {
|
|||
run echo "${QUEUE_ID}"
|
||||
assert_line --regexp "^${QUEUE_ID_REGEX}$"
|
||||
|
||||
# Postfix specific logs:
|
||||
_filter_service_log 'mail' "${QUEUE_ID}"
|
||||
}
|
||||
|
||||
|
@ -104,5 +105,6 @@ function _print_mail_log_for_msgid() {
|
|||
local MSG_ID=$(__construct_msgid "${1:?The local-part for MSG_ID was not provided}")
|
||||
shift 1
|
||||
|
||||
# Dovecot specific logs:
|
||||
_filter_service_log 'mail' "msgid=${MSG_ID}"
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ function _send_email_with_msgid() {
|
|||
local MSG_ID=$(__construct_msgid "${1:?The local-part for MSG_ID was not provided}")
|
||||
shift 1
|
||||
|
||||
_send_email "${@}" --header "Message-Id: ${MID}"
|
||||
_send_email "${@}" --header "Message-Id: ${MSG_ID}"
|
||||
}
|
||||
|
||||
# Send a spam e-mail by utilizing GTUBE.
|
||||
|
|
|
@ -228,7 +228,7 @@ function _successful() {
|
|||
|
||||
@test "redirects mail to external aliases" {
|
||||
_service_log_should_contain_string 'mail' 'Passed CLEAN {RelayedInbound}'
|
||||
run bash -c "grep '<user@external.tld> -> <external1@otherdomain.tld>' <<< '${output}'"
|
||||
assert_output --partial '<user@external.tld> -> <external1@otherdomain.tld>'
|
||||
_should_output_number_of_lines 2
|
||||
# assert_output --partial 'external.tld=user@example.test> -> <external1@otherdomain.tld>'
|
||||
}
|
||||
|
|
|
@ -33,7 +33,8 @@ function teardown_file() { _default_teardown ; }
|
|||
assert_success
|
||||
}
|
||||
|
||||
@test 'Mail log is error-free' {
|
||||
# TODO: Remove in favor of a common helper method, as described in vmail-id.bats equivalent test-case
|
||||
@test 'Mail log is error free' {
|
||||
_service_log_should_not_contain_string 'mail' 'non-null host address bits in'
|
||||
_service_log_should_not_contain_string 'mail' ': error:'
|
||||
}
|
||||
|
|
|
@ -58,6 +58,7 @@ function teardown_file() { _default_teardown ; }
|
|||
_service_log_should_not_contain_string 'mail' '\(!\)connect'
|
||||
|
||||
# Postfix: https://github.com/docker-mailserver/docker-mailserver/pull/2597
|
||||
# Log line match example: https://github.com/docker-mailserver/docker-mailserver/pull/2598#issuecomment-1141176633
|
||||
_service_log_should_not_contain_string 'mail' 'using backwards-compatible default setting'
|
||||
|
||||
# Postgrey: https://github.com/docker-mailserver/docker-mailserver/pull/612#discussion_r117635774
|
||||
|
|
Loading…
Reference in New Issue