rcourtman
|
9e056674cc
|
Add unit tests for DemoModeMiddleware (api)
26 test cases covering:
- Demo mode disabled (all requests pass through)
- Demo mode enabled with read-only methods (GET/HEAD/OPTIONS allowed)
- WebSocket upgrade handling (case-insensitive)
- Auth endpoint allowlist (login, OIDC, logout)
- Modification request blocking (POST/PUT/DELETE/PATCH)
- Partial path match rejection (security)
- Response format verification (JSON error response)
First test file for demo_middleware.go. Tests verify correct header
setting (X-Demo-Mode) and error response structure.
|
2025-11-30 13:34:08 +00:00 |
|