-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests(refactor): Improve consistency and documentation for test helpers #3012
Conversation
939cf5e
to
1d268ca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I spotted a few minor concerns and suggestions, and one bug (change to implicit container name in mail_changedetector.bats
). Otherwise looking pretty good 👍
1d268ca
to
8e0f126
Compare
mail_privacy.bats
I rewrote history so we can rebase-merge this. I incorporated the review feedback from @polarathene into the new commits. I think reviewing commit by commit is again a nice strategy, as this PR again is rather big. What's new with the new commits? I added one nice feature: for some test helper functions, we can now omit the container name if |
The test helper files located under `test/helper/` saw a significant refactoring, which streamlines function names, documentation and usage of helpers.
Tests that use the new helper functions now use the updated function names.
8e0f126
to
f4253e0
Compare
That's extremely tedious for us to review though with these kind of changes. It takes a long time to go through each commit and compare line by line like I did last time to catch any errors. Each time you rewrite history like that it reduces the quality of the review as less effort will be put into repeating that process.
I don't see what warrants a merge other than squash in this PR? I'd would have preferred to see new commits with requested changes so the diff of what actually changed was much smaller, then after approval by all means rewrite history then and I'll trust that's all it was.
That sounds great, and I love the VSCode screenshot showing off the doc tooltip! 😀 I'll start a review now, but like I said a thorough review is taxing, so I'm placing more trust in this time round that we don't have any accidents like in the initial review with testing the wrong container for a method 😖 (easy mistake to make, but hard to spot in large noisy/repetitive diffs) EDIT: Praise Github, it actually offers a diff of before / after the history rewrite 🙏 |
Yeah, again sorry for the force-push, but I think that squash-merging is not the way to go. If I am overruled, I will definitely squash-merge it though. Not a big deal :)
I definitely knew about that, thought you did too, haha :D That should do the trick and make the review easier, right?:) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also wanted to inquire about the changes that swap the load
order to setup,common
instead of common,setup
? Was there a reason for that all? I had been using the latter as alphabetical sorting 😅
Yes, but it still took me about 2 hours to comb through. I definitely would have missed a bunch if I had to wade through the full diff with old history interleaved/overwritten.
I'm not entirely opposed to it, but I'm not sure what the benefit is? The master branch would have a single logical commit tied to this PR which has full discussion of review and commit history. The changes are all related / dependent, so makes more sense to me for them to be bundled into a squash merge. If this is about the two commits that refactor |
No particular reason; I guess a matter of style again. I figured the setup functions are needed before the common functionality but it does not actually matter.
Yes, this may be a good idea to keep the diff small. I will update this PR and apply PF feedback; you can then go ahead and pick them out of this PR :) We can then squash this PR, that's fine with me. |
UPDATE: Applied PR feedback; you can go ahead and pick out the 2 two commits as mentioned earlier @polarathene :) |
1be0396
to
22f8918
Compare
LGTM 👍 I left your original two commits alone after extracting out the two files we discussed into their own PRs. Then merged the two review feedback commits into one. |
mail_privacy.bats
* added options to toggle OpenDKIM & OpenDMARC rspamd can provide DKIM signing and DMARC checking itself, so users should be able to disable OpenDKIM & OpenDMARC. The default is left at 1, so users have to to opt-in when the want to disable the features. * misc small enhancements * adjusted start of rspamd The order of starting redis + rspamd was reversed (now correct) and rspamd now starts with the correct user. * adjusted rspamd core configuration The main configuration was revised. This includes AV configuration as well as worker/proxy/controller configuration used to control the main rspamd processes. The configuration is not tested extensively, but well enough that I am confident to go forward with it until we declare rspamd support as stable. * update & improve the documentation * add tests These are some initial tests which test the most basic functionality. * tests(refactor): Improve consistency and documentation for test helpers (#3012) * added `ALWAYS_RUN` target `Makefile` recipies (#3013) This ensures the recipies are always run. Co-authored-by: georglauterbach <44545919+georglauterbach@users.noreply.github.com> * adjusted rspamd test to refactored test helper functions * improve documentation * apply suggestions from code review (no. 1 by @polarthene) Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com> * streamline heredoc (EOM -> EOF) * adjust rspamd test (remove unnecessary run arguments) Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
Description
Refactors test helper. Naming was incoherent and documentation was missing.
Type of change
Checklist:
docs/
)