Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@polarathene
Copy link
Member

@polarathene polarathene commented Feb 7, 2023

Description

Extracting out the quota tests and revising them a little.

WIP - Almost done. (**EDIT: I was not able to complete the PR as intended, but it is likely fine to merge, tracking issue for potentially revisiting this work)

Type of change

  • Improvement (non-breaking change that does improve existing functionality)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • New and existing unit tests pass locally with my changes

Test cases are just cut + paste, no logic changed there yet.
Plus some additional bug fixes in the disabled test case
Removes the extra variables and filtering in favour of explicit values instead of matching for comparison.

- Easier at a glance to know what is actually expected.
- Additionally reworks the quota limit checks in other test cases. Using a different formatter for `doveadm` is easier to match the desired value (`Limit`).
@polarathene polarathene added area/tests kind/improvement Improve an existing feature, configuration file or the documentation labels Feb 7, 2023
@polarathene polarathene added this to the v12.0.0 milestone Feb 7, 2023
@polarathene polarathene self-assigned this Feb 7, 2023
@georglauterbach
Copy link
Member

@polarathene I can take the sedfile test. Which other tests would you like me to tackle?

@georglauterbach georglauterbach self-requested a review February 19, 2023 12:52
@polarathene
Copy link
Member Author

Which other tests would you like me to tackle?

I think we're mostly done. I've been a bit busy lately, but should be able to get back to resuming this PR and finishing off the test.bats, followed by the ldap test file. I don't think there's much left after that?

After that (but you're more than welcome to get started on all the parallel folder tests), it'd be good to see how many of the nc lines that send test mails can use that helper function you wrote to DRY up the usage there, which should assist the auth PR to be fairly simple? (probably with a variant of the helper function for handling nc with smtp auth)

It'd also be helpful for once adding in proper DNS I guess, so an FQDN can be used with a mail command or similar instead of nc 0.0.0.0.

@georglauterbach
Copy link
Member

KK! I will adjust sedfile.bats and then look at the sending of mails via helper.

@georglauterbach
Copy link
Member

This is now the last blocking PR for #3146.

@polarathene
Copy link
Member Author

This is now the last blocking PR for #3146.

This PR doesn't need to block v12 release. The full test suite refactoring didn't quite make it for v12 unfortunately.

I'll resume this PR later this month. Priority has been other issues and review for DMS v12 and commitments outside of DMS.


There's still a blocker apparently which should be resolved if ENABLE_SRS=1 is broken.

@polarathene polarathene modified the milestones: v12.0.0, v12.1.0 Mar 4, 2023
@github-actions github-actions bot added the meta/stale This issue / PR has become stale and will be closed if there is no further activity label Mar 25, 2023
@docker-mailserver docker-mailserver deleted a comment from github-actions bot Mar 26, 2023
@polarathene polarathene added stale-bot/ignore Indicates that this issue / PR shall not be closed by our stale-checking CI and removed meta/stale This issue / PR has become stale and will be closed if there is no further activity labels Mar 26, 2023
@georglauterbach
Copy link
Member

May I assist you in an way to get this PR merged?:)

@polarathene
Copy link
Member Author

May I assist you in an way to get this PR merged?:)

I think I have changes on the local branch since I halted progress on this.

You could probably assist by slowing down so I have less distractions 😝 😂


I'll try to resume this before the end of the month.

If you'd like to write a test for the getmail PR so that can get merged, that could be helpful. It should mostly be similar to fetchmail tests which are only for configuration I think, no point adding friction with proper tests if the similar existing feature we maintain is lacking at that too. I believe it needs to also bring in getmail via pip.

@georglauterbach georglauterbach removed this from the v12.1.0 milestone Apr 23, 2023
@georglauterbach georglauterbach added this to the v13.1.0 milestone Dec 3, 2023
Copy link
Member Author

@polarathene polarathene left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since I never seem to have sufficient time for addressing my contributions in DMS and this one is not only low priority for me but tricky to get access to my local copy due to technical issues earlier in the year.. If tests pass we might as well merge this as-is 🤷‍♂️

@polarathene polarathene marked this pull request as ready for review December 18, 2023 20:36
@polarathene
Copy link
Member Author

I've addressed conflicts and tests pass. Should be ok to merge 👍

I'd still like to revisit this properly, but it's better to move things along as we're nearing a full year since I had to put this on hold. A separate TODO issue has been opened instead as a reminder.

@github-actions
Copy link
Contributor

Documentation preview for this PR is ready! 🎉

Built with commit: 8a9e5c3

@polarathene polarathene merged commit 5908d9f into docker-mailserver:master Dec 19, 2023
reneploetz pushed a commit to reneploetz/docker-mailserver that referenced this pull request Dec 20, 2023
* chore: Extract out Dovecot Quota test cases into new test file

Test cases are just cut + paste, no logic changed there yet.

* chore: Rename test case descriptions

* chore: Use `setup ...` methods instead of direct calls

* chore: Adjust `_run_in_container_bash` to `_run_in_container`

Plus some additional bug fixes in the disabled test case

* tests(refactor): Revise ENV test cases for max mailbox and message sizes

* tests(refactor): Revise ENV test cases for mailbox and message limits v2

Removes the extra variables and filtering in favour of explicit values instead of matching for comparison.

- Easier at a glance to know what is actually expected.
- Additionally reworks the quota limit checks in other test cases. Using a different formatter for `doveadm` is easier to match the desired value (`Limit`).

* chore: Sync improvement from `tests.bats` master

---

NOTE: This PR has been merged to avoid additional maintenance burden without losing the improvements. It was not considered complete, but remaining tasks were not documented in the PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/tests kind/improvement Improve an existing feature, configuration file or the documentation stale-bot/ignore Indicates that this issue / PR shall not be closed by our stale-checking CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants