From 881da35dfddd43521f3ea4c4a35afbe7333eea51 Mon Sep 17 00:00:00 2001 From: Lukas Date: Fri, 26 Jun 2026 18:02:12 +0200 Subject: [PATCH] fix test: use pending_count instead of pending in queue status assertions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- Docs/tasks.md | 8 -------- tests/robot/api/download.robot | 4 ++-- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/Docs/tasks.md b/Docs/tasks.md index d0bd8cb..2641966 100644 --- a/Docs/tasks.md +++ b/Docs/tasks.md @@ -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 **Test Result:** FAIL — `List '${values}' has no item in index 0.` **File:** `tests/robot/api/download.robot` diff --git a/tests/robot/api/download.robot b/tests/robot/api/download.robot index e3f0b90..1c16c31 100644 --- a/tests/robot/api/download.robot +++ b/tests/robot/api/download.robot @@ -21,7 +21,7 @@ Get Empty Queue Status ${resp}= Get Queue Status Response Should Have Status ${resp} 200 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 # --------------------------------------------------------------------------- @@ -139,7 +139,7 @@ Queue Statistics Accuracy Add To Queue ${payload} ${resp}= Get Queue Status 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 ${total}= Get JSON Value ${resp} $.statistics.total Should Be Equal As Integers ${total} 2