Skip to content

tests: refactor POP3, IMAP (actually SASLauthd + RIMAP) & relay#3062

Merged
georglauterbach merged 8 commits intomasterfrom
test/rewitesX
Feb 6, 2023
Merged

tests: refactor POP3, IMAP (actually SASLauthd + RIMAP) & relay#3062
georglauterbach merged 8 commits intomasterfrom
test/rewitesX

Conversation

@georglauterbach
Copy link
Copy Markdown
Member

@georglauterbach georglauterbach commented Feb 5, 2023

Description

Refactors more tests so that they can be run in parallel.

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
  • I have made corresponding changes to the documentation (README.md or the documentation under docs/)
  • If necessary I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@georglauterbach georglauterbach added area/ci kind/improvement Improve an existing feature, configuration file or the documentation labels Feb 5, 2023
@georglauterbach georglauterbach added this to the v12.0.0 milestone Feb 5, 2023
@georglauterbach georglauterbach self-assigned this Feb 5, 2023
Correcting small nitpicks
polarathene
polarathene previously approved these changes Feb 5, 2023
Copy link
Copy Markdown
Member

@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.

Great work! LGTM 😀

Comment thread test/tests/parallel/set1/spam_virus/amavis.bats Outdated
Comment on lines +30 to +45
local AMAVIS_DEFAULTS_FILE='/etc/amavis/conf.d/20-debian_defaults'
_run_in_container grep '\$sa_tag_level_deflt' "${AMAVIS_DEFAULTS_FILE}"
assert_success
assert_output --partial '= 2.0'

_run_in_container grep '\$sa_tag2_level_deflt' "${AMAVIS_DEFAULTS_FILE}"
assert_success
assert_output --partial '= 6.31'

_run_in_container grep '\$sa_kill_level_deflt' "${AMAVIS_DEFAULTS_FILE}"
assert_success
assert_output --partial '= 6.31'

_run_in_container grep '\$sa_spam_subject_tag' "${AMAVIS_DEFAULTS_FILE}"
assert_success
assert_output --partial "= '***SPAM*** ';"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Although, these are the defaults already supplied so I'm not sure how helpful that is vs a test that supplies different default values to ensure they're actually updating the config checked?

EDIT: Oh, I see these were from an existing test that is checking the default config (_and I guess the default ENV values since they're the same 🤷‍♂️ _).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah, I just took this from the POP3 test. I don't have the slightest clue why this was in the POP3 test file.. I'd keep it as-is for now.

Comment thread test/tests/serial/no_container.bats Outdated
Comment thread test/tests/serial/no_container.bats Outdated
& change needless adjustment of comments

Co-authored-by: Brennan Kinney <[email protected]>
@georglauterbach
Copy link
Copy Markdown
Member Author

@polarathene which tests are you going to tackle next? So that we don't overlap.

@polarathene
Copy link
Copy Markdown
Member

polarathene commented Feb 6, 2023

@polarathene which tests are you going to tackle next?

I've got the quota tests being extracted out from tests.bats presently. It should have a PR in the next 24 hours 👍

After that I'll probably tackle the LDAP one.


If you're up for it, restrict-access has a small bug with the sed logic that would repeatedly add the same content each time it's run. I don't think it's causing any problems but it's been on my backlog for a couple weeks now I think 😅 (I noticed it while working on the setup-cli.bats tests I think)

@georglauterbach
Copy link
Copy Markdown
Member Author

@polarathene which tests are you going to tackle next?

I've got the quota tests being extracted out from tests.bats presently. It should have a PR in the next 24 hours 👍

After that I'll probably tackle the LDAP one.

👍🏼

If you're up for it, restrict-access has a small bug with the sed logic that would repeatedly add the same content each time it's run. I don't think it's causing any problems but it's been on my backlog for a couple weeks now I think 😅 (I noticed it while working on the setup-cli.bats tests I think)

I can look into that.

@georglauterbach georglauterbach merged commit 2caec2c into master Feb 6, 2023
@georglauterbach georglauterbach deleted the test/rewitesX branch February 6, 2023 22:59
georglauterbach added a commit that referenced this pull request Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci kind/improvement Improve an existing feature, configuration file or the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants