Apply suggestions from code review
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
This commit is contained in:
parent
5da61f97ef
commit
f9549829c5
|
@ -27,7 +27,8 @@ function _filter_service_log() {
|
|||
shift 2
|
||||
|
||||
local FILE="/var/log/supervisor/${SERVICE}.log"
|
||||
[[ -f ${FILE} ]] || FILE="/var/log/mail/${SERVICE}.log" # Fallback to alternative log location:
|
||||
# Alternative log location fallback:
|
||||
[[ -f ${FILE} ]] || FILE="/var/log/mail/${SERVICE}.log"
|
||||
_run_in_container grep "${@}" "${STRING}" "${FILE}"
|
||||
}
|
||||
|
||||
|
|
|
@ -139,9 +139,9 @@ function teardown_file() { _default_teardown ; }
|
|||
_print_mail_log_of_queue_id_from_msgid 'rspamd-test-email-virus'
|
||||
assert_output --partial 'milter-reject'
|
||||
assert_output --partial '5.7.1 ClamAV FOUND VIRUS "Eicar-Signature"'
|
||||
refute_output --partial "stored mail into mailbox 'INBOX'"
|
||||
|
||||
_print_mail_log_for_msgid 'dms-test-email-spam'
|
||||
refute_output --partial "stored mail into mailbox 'INBOX'"
|
||||
assert_failure
|
||||
|
||||
_count_files_in_directory_in_container /var/mail/localhost.localdomain/user1/new/ 1
|
||||
|
@ -273,8 +273,8 @@ function teardown_file() { _default_teardown ; }
|
|||
_nc_wrapper 'nc/rspamd_imap_move_to_junk.txt' '0.0.0.0 143'
|
||||
sleep 1 # wait for the transaction to finish
|
||||
|
||||
_service_log_should_contain_string 'mail' 'imapsieve: Matched static mailbox rule \[1\]'
|
||||
_service_log_should_not_contain_string 'mail' 'imapsieve: Matched static mailbox rule \[2\]'
|
||||
_service_log_should_contain_string 'mail' 'imapsieve: Matched static mailbox rule [1]'
|
||||
_service_log_should_not_contain_string 'mail' 'imapsieve: Matched static mailbox rule [2]'
|
||||
|
||||
_show_complete_mail_log
|
||||
for LINE in "${LEARN_SPAM_LINES[@]}"; do
|
||||
|
|
Loading…
Reference in New Issue