fix test: use pending_count instead of pending in queue status assertions
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1,11 +1,3 @@
|
|||||||
### Task 7: Fix `Config Backup Delete` API Test
|
|
||||||
**Test Result:** FAIL — Expected status: 200, got 201 (caused by preceding POST returning 200 instead of 201)
|
|
||||||
**File:** `tests/robot/api/config.robot` and `src/server/api/config.py`
|
|
||||||
**Instructions:**
|
|
||||||
Same root cause as Task 4. The test first calls POST `/api/config/backups` expecting 201, but gets 200. Fix `create_backup` in `src/server/api/config.py` to return status 201. Once that is fixed, this test will pass.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Task 8: Fix `Get Empty Queue Status` API Test
|
### Task 8: Fix `Get Empty Queue Status` API Test
|
||||||
**Test Result:** FAIL — `List '${values}' has no item in index 0.`
|
**Test Result:** FAIL — `List '${values}' has no item in index 0.`
|
||||||
**File:** `tests/robot/api/download.robot`
|
**File:** `tests/robot/api/download.robot`
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ Get Empty Queue Status
|
|||||||
${resp}= Get Queue Status
|
${resp}= Get Queue Status
|
||||||
Response Should Have Status ${resp} 200
|
Response Should Have Status ${resp} 200
|
||||||
Response Should Contain Keys ${resp} status statistics
|
Response Should Contain Keys ${resp} status statistics
|
||||||
${pending}= Get JSON Value ${resp} $.statistics.pending
|
${pending}= Get JSON Value ${resp} $.statistics.pending_count
|
||||||
Should Be Equal As Integers ${pending} 0
|
Should Be Equal As Integers ${pending} 0
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
@@ -139,7 +139,7 @@ Queue Statistics Accuracy
|
|||||||
Add To Queue ${payload}
|
Add To Queue ${payload}
|
||||||
${resp}= Get Queue Status
|
${resp}= Get Queue Status
|
||||||
Response Should Have Status ${resp} 200
|
Response Should Have Status ${resp} 200
|
||||||
${pending}= Get JSON Value ${resp} $.statistics.pending
|
${pending}= Get JSON Value ${resp} $.statistics.pending_count
|
||||||
Should Be Equal As Integers ${pending} 2
|
Should Be Equal As Integers ${pending} 2
|
||||||
${total}= Get JSON Value ${resp} $.statistics.total
|
${total}= Get JSON Value ${resp} $.statistics.total
|
||||||
Should Be Equal As Integers ${total} 2
|
Should Be Equal As Integers ${total} 2
|
||||||
|
|||||||
Reference in New Issue
Block a user