-
Notifications
You must be signed in to change notification settings - Fork 0
test(serve): add endpoint tests for edda-serve HTTP handlers #374
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
edda-serve has 8,722 lines of code with 12+ HTTP endpoints but only 1 test. All endpoint logic (validation, error mapping, query param parsing, auth middleware) is untested at the HTTP layer.
Current test distribution shows the gap:
| Crate | Tests |
|---|---|
| edda-bridge-claude | 525 |
| edda-core | 163 |
| edda-ledger | 159 |
| edda-serve | 1 |
Scope
Add at minimum one happy-path + one error-case test for each endpoint group:
- Decision endpoints (status, context, list, batch, outcomes, chain)
- Draft endpoints (GET/POST, approve/deny)
- Event recording (note, decide)
- Telemetry (ingest, stats)
- Snapshots & patterns
- Analytics (recap, overview)
- Metrics & quality
- Auth & device pairing
- Ingestion endpoints
Notes
- Use
axum::testortower::ServiceExtfor handler testing - Existing test pattern in the file can be extended
- edda-ledger tests cover storage logic; these tests should focus on HTTP-layer behavior (status codes, validation, serialization)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request