test helpers: add functionality for sending emails#3026
Merged
georglauterbach merged 7 commits intomasterfrom Jan 29, 2023
Merged
test helpers: add functionality for sending emails#3026georglauterbach merged 7 commits intomasterfrom
georglauterbach merged 7 commits intomasterfrom
Conversation
polarathene
previously approved these changes
Jan 25, 2023
This was referenced Jan 26, 2023
Closed
This was not planned, but as @polarthene mentioned in #3033 (comment) , filtering the mail log by email ID would be (the only) correct approach for the Rspamd test (to eliminate race conditions). I asserted the currect state, and came to the conclusion that this might (or actually is) something we want in more than one place. So I went ahead and implemented a solution. The solution for acquiring the ID is a bit slower because it ensures the mail queue is empty _before_ and _after_ the mail is sent. This is the tradeoff one has to make if they want to send multiple emails in one test file and get their IDs. I hope you like this approach. I will provide another PR that adjusts our current tests to use these new functions.
I think our work for our custom test framework should be noted in the docs for newcomers to better understand what they should do.
0a1651e to
3e98e5c
Compare
polarathene
approved these changes
Jan 29, 2023
Member
polarathene
left a comment
There was a problem hiding this comment.
LGTM 👍
Nice new helpers btw; thanks for the commit messages as added context and of course the documentation! 😀
casperklein
approved these changes
Jan 29, 2023
Contributor
|
Documentation preview for this PR is ready! 🎉 Built with commit: cfca305 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A small follow-up for things I noticed while getting Rspamd to work today. I should have thought about the permissions issue before, sorry. The disasbled modules were adjusted as well.I can report though that Rspamd works nicely on my setup now :DUPDATE: Correction; it works like a charm! It handles DKIM signing now (RSA+ED25519) & DNSBLs properly.This PR was a Rspamd PR, now it is a test functions PR needed for continueing with Rspamd and other PRs (such as #3033).
Type of change
Checklist:
docs/)