Add container-based E2E tests for SMTP and IMAP#147
Merged
Conversation
Added E2E tests using Docker containers to verify SMTP and IMAP functionality, following the same pattern as existing HTTP, MySQL, PostgreSQL, and SSH tests. Changes: - Added Mailpit container for SMTP E2E testing (port 1025) - Added Greenmail container for IMAP E2E testing (ports 3025, 3143, 3993, 8080) - Updated examples/imap.yml to support test environment setup: - Added mail_to, tls_enabled, skip_search_tests variables - Added SMTP step to send test emails before IMAP operations - Added skipif conditions for Greenmail compatibility (UID SEARCH not supported) - Updated testdata/verify-examples.yml with new test jobs: - SMTP Server Start and SMTP Workflow Tests - IMAP Server Start and IMAP Workflow Tests Technical details: - SMTP uses Mailpit for lightweight testing - IMAP uses Greenmail which supports SMTP, IMAP, and POP3 - IMAP tests skip UID SEARCH commands (not supported by Greenmail) - Uses TLS=false for IMAP tests to avoid certificate verification issues Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Port 8080 was already used by the HTTP test server (httpbin container). Changed Greenmail's API port mapping from 8080:8080 to 8081:8080 to avoid conflict when both jobs run in parallel.
This comment has been minimized.
This comment has been minimized.
1 similar comment
Code Metrics Report
Details | | main (8b24287) | #147 (428695b) | +/- |
|---------------------|----------------|----------------|------|
| Coverage | 48.7% | 48.7% | 0.0% |
| Files | 52 | 52 | 0 |
| Lines | 5249 | 5249 | 0 |
| Covered | 2560 | 2560 | 0 |
| Code to Test Ratio | 1:1.1 | 1:1.1 | 0.0 |
| Code | 10573 | 10573 | 0 |
| Test | 12109 | 12109 | 0 |
- | Test Execution Time | 8s | 24s | +16s |Reported by octocov |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Added E2E tests using Docker containers for SMTP and IMAP, following the same pattern as existing HTTP, MySQL, PostgreSQL, and SSH tests.
Changes
SMTP E2E Testing
testdata/verify-examples.yml:SMTP Server Start: Launches Mailpit containerSMTP Workflow Tests: Runsexamples/smtp.ymlIMAP E2E Testing
examples/imap.yml:mail_to,tls_enabled,skip_search_testsskipifconditions for Greenmail compatibilitytestdata/verify-examples.yml:IMAP Server Start: Launches Greenmail containerIMAP Workflow Tests: Runsexamples/imap.ymlTechnical Details
Why Greenmail for IMAP?
SKIP_SEARCH_TESTS=trueTest Environment Configuration
Test Plan
E2E tests verify:
🤖 Generated with Claude Code