✨ feat(bdd): pkg/bdd/mailpit/ HTTP client + integration tests (ADR-0030 Phase A.2) (#60)
Co-authored-by: Gabriel Radureau <arcodange@gmail.com> Co-committed-by: Gabriel Radureau <arcodange@gmail.com>
This commit was merged in pull request #60.
This commit is contained in:
@@ -43,17 +43,19 @@ http://localhost:8025 — list of all captured messages, search, raw view, HTML
|
||||
### HTTP API (for automation)
|
||||
|
||||
```bash
|
||||
# Latest 10 messages
|
||||
# Latest 10 messages (no filter — /api/v1/messages is for pagination)
|
||||
curl -s 'http://localhost:8025/api/v1/messages?limit=10' | jq
|
||||
|
||||
# Messages for a specific recipient (used by BDD tests, cf. ADR-0030)
|
||||
curl -s 'http://localhost:8025/api/v1/messages?query=to:test-user@bdd.local' | jq
|
||||
# Messages for a specific recipient — use /api/v1/search, NOT /messages
|
||||
# (the latter's `query` param is for pagination only, not filtering ;
|
||||
# verified empirically 2026-05-05)
|
||||
curl -s 'http://localhost:8025/api/v1/search?query=to:test-user@bdd.local' | jq
|
||||
|
||||
# Get a specific message by ID (full content, headers, attachments)
|
||||
curl -s 'http://localhost:8025/api/v1/message/<id>' | jq
|
||||
|
||||
# Purge messages for a recipient (used in test cleanup)
|
||||
curl -X DELETE 'http://localhost:8025/api/v1/messages?query=to:test-user@bdd.local'
|
||||
# Purge messages for a recipient (used in test cleanup) — also via /search
|
||||
curl -X DELETE 'http://localhost:8025/api/v1/search?query=to:test-user@bdd.local'
|
||||
```
|
||||
|
||||
Full API: https://mailpit.axllent.org/docs/api-v1/
|
||||
|
||||
Reference in New Issue
Block a user