Skip to content

✅ Move various IMAP client tests to their own files - #728

Merged
nevans merged 6 commits into
masterfrom
reorg-imap-client-tests
Aug 3, 2026
Merged

✅ Move various IMAP client tests to their own files#728
nevans merged 6 commits into
masterfrom
reorg-imap-client-tests

Conversation

@nevans

@nevans nevans commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

These tests weren't moved back when #515 moved most of the rest. This moves over 1000 lines from test_imap.rb into new files for:

  • #idle and #idle_done
  • #id
  • TLS: for both implicit TLS and #starttls
  • sending command data (integration test complements to the unit tests in test_command_data.rb)

Also: test_data_encoding.rb was renamed because it did not match the naming convention of using test_imap*.rb only for integration test files.

Still in test_imap.rb:

  • testing for some class methods (for default ports)
  • testing #disconnect - this could be moved to its own file. But it isn't an IMAP command; it directly manages client's connection. So I've left it here for now.
  • client error handling that is unrelated to any commands or command arguments (for example: connection errors, receiver thread errors)

This is partially deprecated.  Most tests should use `FakeServer`
instead.  But it may continue to be used for tests that intentionally
violate normal IMAP protocol behavior, for example when testing SSL
error conditions, abrupt network disconnects, etc, where it's simpler to
just use a straight TCP server socket.
@nevans
nevans force-pushed the reorg-imap-client-tests branch from 015692c to 04b84ad Compare July 31, 2026 22:04
nevans added 5 commits August 3, 2026 14:00
This matches the pattern used by most other current "integration tests".
This matches the pattern used by most other current "integration tests".
This matches the pattern used by most other current "integration tests".
In keeping with the naming convention that `test_imap*.rb` files are for
client integration tests, this test file must be renamed because it does
not create a client connection.  It only tests class methods.
@nevans
nevans force-pushed the reorg-imap-client-tests branch from 04b84ad to 877c739 Compare August 3, 2026 18:00
@nevans
nevans merged commit 1656074 into master Aug 3, 2026
34 checks passed
@nevans
nevans deleted the reorg-imap-client-tests branch August 3, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant