|
|
dd5b1a823f
|
test(handlers): add HTTP handler coverage for ScheduleHandler — 28 cases
CI / all-required (pull_request) injected
sop-checklist / all-items-acked (pull_request) injected
Covers all untested HTTP handler paths on ScheduleHandler:
List:
- empty result → 200 []
- query error → 500
Create:
- missing cron_expr → 400
- missing prompt → 400
- invalid timezone → 400
- invalid cron → 400
- CRLF stripped from prompt (#958)
- default enabled=true (absent field)
- default timezone=UTC (absent field)
- explicit enabled=false
- INSERT DB error → 500
- next_run_at returned in 201 response
Update:
- cron change → SELECT current + UPDATE with recomputed next_run_at
- timezone change → SELECT current + UPDATE with recomputed next_run_at
- invalid timezone → 400
- invalid cron → 400
- schedule not found → 404
- UPDATE DB error → 500
- prompt CRLF stripped on update (#958)
Delete:
- success → 200
- not found (IDOR) → 404
- DELETE DB error → 500
RunNow:
- success → 200 with workspace_id + prompt
- not found → 404
- SELECT DB error → 500
History:
- empty result → 200 []
- query error → 500
- multiple entries with error_detail (#152)
Closes #980
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-14 12:39:57 +00:00 |
|