Skip to content

Bad tests in COPY and MOVE commands #37

Open
@shikharid

Description

@shikharid

These following tests have expectations nowhere defined in RFCs:

Test copy command 17/24 (line 32)

  • This tests expect that UIDs assigned in the destination mailbox will be exactly in-order of msg UIDs copied from source mailbox
  • For example: If msgs with UIDs 1,2,4 are moved from A->B, equivalent UIDs in B will be 1->1, 2->2, 4->3
  • RFC3501 nowhere asks servers to behave this way and server can choose to copy these msgs in any arbitrary order
  • A mapping of 1->2, 2->1. 3->2 is also valid
  • This test can either be disabled as broken
  • Or simplified by Just copying 1 msg at a time and doing the assertions instead of copying 3 at once

Test move command 12/13 (line 44)

  • This test moves a msg in the same mailbox
  • The test expects that a new UID will be assigned to the message
  • Although the RFC 6851 does allow for moving msgs in the same mailbox
  • But it does not specify that the server cannot optimise and consider it a NOOP
  • So the assertion here is not reasonable
  • The test should probably just look for a successful completion of the MOVE command

Again, happy to raise a PR fixing these. Let me know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions