Skip to content

test: add full-stack integration suite#24

Draft
alithethird wants to merge 48 commits into
mainfrom
split/3-add-integration-tests
Draft

test: add full-stack integration suite#24
alithethird wants to merge 48 commits into
mainfrom
split/3-add-integration-tests

Conversation

@alithethird

@alithethird alithethird commented May 4, 2026

Copy link
Copy Markdown
Collaborator

What this PR does

  • Add monorepo integration suite under tests/integration/
  • Add stack-integration tox environment and required integration dependencies
  • Include end-to-end whole-mail-system test and full-stack scenarios
  • Resolve merge conflicts with origin/main, incorporating improvements from the create-mail-user action: better validation, tenacity-based retries, GDPR helpers, and jubilant upgraded to 1.10.0
  • Fix duplicate test path in tox.toml stack-integration environment

Why we need it

Provides a full-stack integration test suite that exercises the complete mail system (Dovecot, Postfix relay, Postfix relay configurator, OpenDKIM) end-to-end in a single tox environment, enabling confidence across the whole monorepo.

Checklist

  • I followed the contributing guide
  • I added or updated the documentation (if applicable)
  • I updated docs/changelog.md with user-relevant changes
  • I added a change artifact for user-relevant changes in docs/release-notes/artifacts. If no change artifact is necessary, I tagged the PR with the label no-release-note.
  • I used AI to assist with preparing this PR
  • I added or updated tests as needed (unit and integration)
  • If integration test modules are used: I updated the workflow configuration
    (e.g., in .github/workflows/integration_tests.yaml, ensure the modules list is correct)
  • If this is a Grafana dashboard: I added a screenshot of the dashboard
  • If this is Terraform: terraform fmt passes and tflint reports no errors
  • If this is Rockcraft: I updated the version

Test plan

  • All YAML workflow files validated with yaml.safe_load
  • All Python files validated with py_compile
  • pyproject.toml and tox.toml validated with tomllib
  • CodeQL security scan: 0 alerts

Review focus

  • tests/integration/conftest.py uses session-scoped Juju fixtures to serve both test_e2e.py and test_configurator_maps.py; private helper functions are replaced with imports from helpers.py
  • dovecot-charm/tests/integration/helpers.py now uses tenacity retry decorators and exposes GDPR helpers
  • cryptography>=42.0 is kept in integration dependencies for RSA key generation in generate_dkim_keypair()

@alithethird alithethird requested a review from a team as a code owner May 4, 2026 11:40
@alithethird alithethird requested review from weiiwang01 and yhaliaw and removed request for a team May 4, 2026 11:40
@alithethird alithethird added the no-release-note This PR does not require a change artifact label May 4, 2026
@alithethird alithethird marked this pull request as draft May 4, 2026 12:45
alithethird and others added 25 commits May 20, 2026 15:49
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…e channels

Co-authored-by: Copilot <copilot@github.com>
Add a create-mail-user charm action and switch e2e user setup to call it, so user provisioning is idempotent and no longer relies on ad-hoc shell commands in tests.
Postfix enforces sender ownership against the authenticated SASL identity. Use the mailbox user for smtp_auth_users and SMTP login so the e2e flow matches sender_login checks.
The configurator fixture enforces sender_login_maps, which rejected the e2e mailbox sender. Add a sender_login_maps entry for e2euser@mailstack.internal so Postfix sender ownership checks pass in test_e2e.
@alithethird

Copy link
Copy Markdown
Collaborator Author

@copilot resolve the merge conflicts in this pull request

Copilot AI commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Merge conflicts resolved in 538f888. All 14 conflicted files have been resolved, keeping the full-stack integration test additions while incorporating origin/main's improvements (create-mail-user action validation, tenacity retries, GDPR helpers, jubilant 1.10.0 upgrade). Also fixed a duplicate test path in tox.toml (31f4550).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Libraries: Out of sync no-release-note This PR does not require a change artifact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants