| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
The new function, called `_send_email_with_mid`, aligns with suggestions from @polarethene and is heavily simplified compared to its predecessor `_send_email_and_get_id`. New helpers will be introduced to filter logs according to the MID constructed in this function.
|
I'll review this after v13.3 is out, trying to wrap up some tasks in time for that 😅 |
Sorry, something went wrong.
Nice! This is basically just me implementing what you proposed in #3747 (comment). |
Sorry, something went wrong.
There was a problem hiding this comment.
I'll apply these.
Bulk of the changes are:
Sorry, something went wrong.
- `_mid` / `MID` => `_msgid` / `MSG_ID` - Revised documentation / tooltip comments
There was a problem hiding this comment.
I'd personally prefer being more explicit about those that are using regex, potentially with a _regex variant of such methods 🤷♂️
Probably unlikely to be an issue but technically all those logs being checked for addresses will treat the . as any character rather than an actual .? Fixed string matching by default seems better suited?
Feel free to delay that to a separate PR.
Great work! 🥳
Sorry, something went wrong.
Moreover, I added a function to print the whole mail log. Appropriate comments were added to this function to indicate that one should only use this function when necessary.
There was a problem hiding this comment.
I'll apply some of these, and leave some others unresolved for better visibility to you 👍
Sorry, something went wrong.
There was a problem hiding this comment.
Just the prior review feedback and some additional feedback here to address and this looks good to go! 😁 🚀
Sorry, something went wrong.
| _service_log_should_contain_string 'rspamd' 'reject "ClamAV FOUND VIRUS "Eicar-Signature"' | ||
|
|
||
| _print_mail_log_for_id "${MAIL_ID_VIRUS}" | ||
| _print_mail_log_of_queue_id_from_msgid 'rspamd-test-email-virus' |
There was a problem hiding this comment.
Similar to the dms-test-email-spam, it might be nice to have the equivalent for virus. Not required to be addressed in this PR though since there's plenty of noise here already 😅
Sorry, something went wrong.
|
Huzzah! A failure like I expected 😛 not ok 86 [Rspamd] (full) RSPAMD_LEARN works in 3193ms # (from function `assert_success' in file test/test_helper/bats-assert/src/assert_success.bash, line 42, # from function `_service_log_should_contain_string' in file test/helper/log_and_filtering.bash, line 50, # in test file test/tests/parallel/set1/spam_virus/rspamd_full.bats, line 290) # `_service_log_should_contain_string 'mail' 'imapsieve: Matched static mailbox rule [2]'' failed # # -- command failed -- # status : 1 # output : # -- # |
Sorry, something went wrong.
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
There was a problem hiding this comment.
LGTM 👍
May want to merge this after the base image upgrade PR?
Sorry, something went wrong.
|
Yes, this is fine with me :) |
Sorry, something went wrong.
|
I resolved merge conflicts and enabled auto-merge. When you approve @polarathene, this will automatically be merged into master. |
Sorry, something went wrong.
There was a problem hiding this comment.
🚀
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description
This PR is intended to solve concerns raised in #3747 (comment) by @polarathene.
A new file for log filter helpers was created. Thereafter, _send_email_and_get_id was reworked to become _send_email_with_mid. I paid attention to using sub-shells only where necessary. This new way of sending + filtering allows for greater flexibility and the implementation has become easier. Last but not least, I updated the service log filters and applied them throughout all our tests to improve code quality.
Review commit by commit.
Type of change
Checklist: