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>
34 lines
1.6 KiB
Plaintext
34 lines
1.6 KiB
Plaintext
*** Settings ***
|
|
Documentation Health check API tests for Aniworld.
|
|
... Covers basic and detailed health endpoints.
|
|
|
|
Resource ${CURDIR}/../resources/common.resource
|
|
Resource ${CURDIR}/../resources/api_keywords.resource
|
|
|
|
Test Setup Create Anonymous Session
|
|
Test Teardown Delete All Sessions
|
|
|
|
*** Test Cases ***
|
|
# ---------------------------------------------------------------------------
|
|
# Basic Health
|
|
# ---------------------------------------------------------------------------
|
|
Basic Health Check
|
|
[Documentation] Verify the basic health endpoint returns 200.
|
|
${resp}= GET On Session anon /health expected_status=200
|
|
Response Should Have Status ${resp} 200
|
|
${status}= Get JSON Value ${resp} $.status
|
|
Should Be Equal As Strings ${status} healthy
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Detailed Health
|
|
# ---------------------------------------------------------------------------
|
|
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 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
|