Refactor trigger_rescan to use anime_service
- Use anime_service.rescan() instead of direct trigger_rescan import - Change Optional[Any] to Optional[Dict[str, Any]] in ConfigUpdate for better type hints - Add ValidationError handling in ConfigUpdate.apply_to - Update tests to match new implementation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1,21 +1,3 @@
|
||||
## Task 12: Update Scheduler Config — Should accept valid scheduler updates
|
||||
|
||||
**Test Result:** FAIL — `Url: http://127.0.0.1:8765/api/scheduler/config Expected status: 422 != 200`
|
||||
|
||||
**Instructions:**
|
||||
The `Update Scheduler Config` API test expects a `200 OK` when updating scheduler settings, but gets `422 Unprocessable Entity`. Review the `/api/scheduler/config` endpoint validation. The payload is likely being rejected by Pydantic or manual validation. Check which field is triggering the 422 and correct the validation logic.
|
||||
|
||||
---
|
||||
|
||||
## Task 13: Trigger Manual Rescan — Should trigger rescan successfully
|
||||
|
||||
**Test Result:** FAIL — `Url: http://127.0.0.1:8765/api/scheduler/trigger-rescan Expected status: 500 != 200`
|
||||
|
||||
**Instructions:**
|
||||
The `Trigger Manual Rescan` API test expects a `200 OK` from `/api/scheduler/trigger-rescan`, but gets `500 Internal Server Error`. Review the endpoint implementation. There is likely an unhandled exception when triggering the rescan. Add proper error handling and ensure the rescan can be triggered successfully.
|
||||
|
||||
---
|
||||
|
||||
## Task 14: Invalid Schedule Time — Should reject malformed schedule_time with 422
|
||||
|
||||
**Test Result:** FAIL — `Url: http://127.0.0.1:8765/api/scheduler/config Expected status: 422 != 200`
|
||||
|
||||
Reference in New Issue
Block a user