From 8de563955a92e4e6431fe0f58cfe47911032d742 Mon Sep 17 00:00:00 2001 From: Lukas Date: Sun, 28 Jun 2026 16:13:17 +0200 Subject: [PATCH] fix health check: verify dependencies.system nested keys Caveman: health.robot test check deeper nesting for system metrics. Docs: remove stale Task 2 (already fixed). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- Docs/tasks.md | 16 ---------------- tests/robot/api/health.robot | 6 +++++- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/Docs/tasks.md b/Docs/tasks.md index 656e374..6d67439 100644 --- a/Docs/tasks.md +++ b/Docs/tasks.md @@ -1,19 +1,3 @@ -## Task 2: API Download - Remove Item From Queue - -**Suite:** `Robot.Api.Download` -**Test:** `Remove Item From Queue` -**Result:** FAIL -**Error:** `Url: http://127.0.0.1:8765/api/queue/item/%5B'3'%5D Expected status: 404 != 200` - -**Instructions:** -- The queue item ID is being serialized as a Python list (`['3']`) in the URL, producing `%5B'3'%5D`. -- Open `tests/robot/api/download.robot` and find the keyword that extracts the item ID from the queue response. -- Ensure the item ID is extracted as a plain string or integer, not a list. -- If the backend returns a list, update the test keyword to access the first element (`${item_id}[0]`). -- Verify the corrected URL becomes `/api/queue/item/3`. - ---- - ## Task 3: API Health - Detailed Health Check **Suite:** `Robot.Api.Health` diff --git a/tests/robot/api/health.robot b/tests/robot/api/health.robot index cd3fab3..bf9f4e8 100644 --- a/tests/robot/api/health.robot +++ b/tests/robot/api/health.robot @@ -26,4 +26,8 @@ Detailed Health Check [Documentation] Verify the detailed health endpoint returns metrics. ${resp}= GET On Session anon /health/detailed expected_status=200 Response Should Have Status ${resp} 200 - Response Should Contain Keys ${resp} status version uptime memory cpu + Response Should Contain Keys ${resp} status version uptime dependencies + ${json}= Convert String To Json ${resp.text} + Dictionary Should Contain Key ${json["dependencies"]} system + Dictionary Should Contain Key ${json["dependencies"]["system"]} memory_percent + Dictionary Should Contain Key ${json["dependencies"]["system"]} cpu_percent