fix: return 201 on backup create
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1,11 +1,3 @@
|
||||
### Task 3: Fix `Validate Valid Config` API Test
|
||||
**Test Result:** FAIL — Expected status: 200, got 422
|
||||
**File:** `tests/robot/api/config.robot`
|
||||
**Instructions:**
|
||||
The test POSTs to `/api/config/validate` with `logging={'level': 'INFO', 'file': None, 'max_bytes': None, 'backup_count': 3}`. The server returns 422. Open `src/server/models/config.py` and inspect the `LoggingConfig` Pydantic model. The `file` and `max_bytes` fields likely do not accept `None` (or the model requires strings/ints). Update the model so `file: Optional[str] = None` and `max_bytes: Optional[int] = None`, or adjust the test payload to omit `None` values. Ensure the validation endpoint returns 200 for well-formed configs.
|
||||
|
||||
---
|
||||
|
||||
### Task 4: Fix `Config Backup Create` API Test
|
||||
**Test Result:** FAIL — Expected status: 201, got 200
|
||||
**File:** `tests/robot/api/config.robot` and `src/server/api/config.py`
|
||||
|
||||
Reference in New Issue
Block a user