cyrusimap / cassandane

Other
6 stars 11 forks source link

Tests for XFER of user and mailbox #169

Closed elliefm closed 2 years ago

elliefm commented 2 years ago

This adds a bunch of tests for XFER of a user, and one test for XFER of a single mailbox. These tests are for the fixes in https://github.com/cyrusimap/cyrus-imapd/pull/3693

The XFER user tests are fairly exhaustive, because that was my focus. They are all :min_version_3_2 because an unrelated behaviour changed in 3.2 (implied RETURN (SPECIAL-USE) in LIST), and so as written the tests don't pass on 3.0. They can be tinkered with to prove the fixes work for 3.0 as well, but I didn't feel like duplicating them just for that.

The XFER mailbox test is singular for now, just to make sure nothing unexpected broke. It is :max_version_3_4 because it turns out 3.5 can create an intermediate on this code path, which is bad! That'll need fixing separately, so it'll get a test case separately too.

Also adds a convenience detail to IMAPMessageStore (if we know the real uid and uidvalidity when appending a message, update the local copy to match), and fixes a test in Pop3 that had a bogus assumption that the improved IMAPMessageStore exposed.

This does not yet add any tests for XFER where the name is a mailbox pattern, nor a partition name. I don't expect those cases to be affected by the bugs I've been addressing so far, so I'll write those tests later, when I'm working on those things.