Test against inbuxa itself; rename Sieve names for an inbuxa session #39

Merged
jcoffey-dev merged 1 commits from feat/inbuxa-live-tests into main 2026-10-30 16:47:56 +00:00
Owner

Roadmap item 14: a live test against inbuxa itself, plus a bug it found.

The test (tests/integration_inbuxa.rs, #[ignore], run before each release):

  • It runs on the 27.1-rc.4 server image from GHCR, pinned by digest.
  • The rig starts the server in recovery mode to create a domain and an administrator. It then starts it normally on the same volume, where the administrator creates an API key. Basic is let through on that second start only so the test can sign in as the users it checks.
  • One test runs migrate --plan: import-directory sets up two accounts, then each account is imported from Maildir and exported with that one admin key. It checks:
    • each user's mail is in that user's mailbox, and the admin's stays empty;
    • a message filed in two folders arrives once, in both;
    • a final --again pass sends nothing.
  • The other test checks that a second export carries over a flag changed at the source, and that Sieve scripts get inbuxa's names.

This also settles what #38 left open: a plan can export each account into inbuxa with one admin token, using --account-name {email}.

The bug: export renamed vnd.stalwart.* to vnd.inbuxa.* only when the target listed vnd.inbuxa.* in sieveExtensions. inbuxa runs those extensions without listing them, as Stalwart did with its own. So scripts went into inbuxa unchanged, and inbuxa stored them with names it doesn't use. The target now also counts as inbuxa when its session has urn:inbuxa:jmap. A new mock test covers an inbuxa session with no vendor names listed; on the old code it would fail.

Checks:

  • cargo test --locked: 1498 pass;
  • clippy is clean;
  • integration_inbuxa: 2 of 2 pass, and no containers or volumes are left behind.

Not covered: an export that is interrupted and then resumed. There's no reliable way to cut one off at a known point in a live test.

Roadmap item 14: a live test against inbuxa itself, plus a bug it found. **The test** (`tests/integration_inbuxa.rs`, `#[ignore]`, run before each release): - It runs on the 27.1-rc.4 server image from GHCR, pinned by digest. - The rig starts the server in recovery mode to create a domain and an administrator. It then starts it normally on the same volume, where the administrator creates an API key. Basic is let through on that second start only so the test can sign in as the users it checks. - One test runs `migrate --plan`: `import-directory` sets up two accounts, then each account is imported from Maildir and exported with that one admin key. It checks: - each user's mail is in that user's mailbox, and the admin's stays empty; - a message filed in two folders arrives once, in both; - a final `--again` pass sends nothing. - The other test checks that a second export carries over a flag changed at the source, and that Sieve scripts get inbuxa's names. This also settles what #38 left open: a plan can export each account into inbuxa with one admin token, using `--account-name {email}`. **The bug:** `export` renamed `vnd.stalwart.*` to `vnd.inbuxa.*` only when the target listed `vnd.inbuxa.*` in `sieveExtensions`. inbuxa runs those extensions without listing them, as Stalwart did with its own. So scripts went into inbuxa unchanged, and inbuxa stored them with names it doesn't use. The target now also counts as inbuxa when its session has `urn:inbuxa:jmap`. A new mock test covers an inbuxa session with no vendor names listed; on the old code it would fail. Checks: - `cargo test --locked`: 1498 pass; - clippy is clean; - `integration_inbuxa`: 2 of 2 pass, and no containers or volumes are left behind. Not covered: an export that is interrupted and then resumed. There's no reliable way to cut one off at a known point in a live test.
jcoffey-dev added 1 commit 2026-10-30 16:44:13 +00:00
Test against inbuxa itself; rename Sieve names for an inbuxa session
ci / test (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 3m31s
ci / announce (pull_request) Skipped
64755ff47b
tests/integration_inbuxa.rs runs against the 27.1-rc.4 server image,
pinned by digest. Its rig starts the server in recovery mode to make a
domain and an administrator, then normally on the same volume, where the
administrator makes an API key. One test runs a migrate plan that sets up
two accounts with import-directory and exports each with that one key: each
account's mail lands in its own mailbox and nowhere else, a message filed
in two folders arrives once in both, and a final --again pass sends
nothing. The other checks that a second export carries over a flag changed
at the source, and that Sieve scripts get inbuxa's names.

That second check found a bug: export renamed vnd.stalwart.* to
vnd.inbuxa.* only when the target listed vnd.inbuxa.* among its
sieveExtensions. inbuxa runs them without listing them, as Stalwart does
its own, so scripts went into inbuxa unchanged. The target now also counts
as inbuxa when its session has urn:inbuxa:jmap.
jcoffey-dev merged commit 40dce4a3cb into main 2026-10-30 16:47:56 +00:00
jcoffey-dev deleted branch feat/inbuxa-live-tests 2026-10-30 16:47:56 +00:00
Sign in to join this conversation.