fix: return 201 on backup create

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-06-26 17:13:57 +02:00
parent 6e9c2b853a
commit ea59db302d
2 changed files with 1 additions and 9 deletions

View File

@@ -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`