diff --git a/test/helper/log_and_filtering.bash b/test/helper/log_and_filtering.bash index e4ac7390..dec46cfe 100644 --- a/test/helper/log_and_filtering.bash +++ b/test/helper/log_and_filtering.bash @@ -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}" } diff --git a/test/tests/parallel/set1/spam_virus/rspamd_full.bats b/test/tests/parallel/set1/spam_virus/rspamd_full.bats index e039eb56..7b53b017 100644 --- a/test/tests/parallel/set1/spam_virus/rspamd_full.bats +++ b/test/tests/parallel/set1/spam_virus/rspamd_full.bats @@ -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