diff options
author | Gary Wu <gary.i.wu@huawei.com> | 2018-09-27 10:38:50 -0700 |
---|---|---|
committer | Gary Wu <gary.i.wu@huawei.com> | 2018-09-27 10:39:43 -0700 |
commit | 9abb61ca2cea1907cab2cec312d6dca6e53a93cd (patch) | |
tree | c8ff0718b6626832efd3ff3acc48590dbd6cb64c /tests/externalapi-nbi/healthcheck | |
parent | a328a3e2e531240ea4a9ed2ce4a284af1be5e225 (diff) |
Move CSIT to integration/csit repo
To facilite branching of CSIT tests, all CSIT test
code and scripts are relocated to the integration/csit
repo.
Change-Id: I1e4c0eff44691f73f8098b3c52764107f6b8b8df
Issue-ID: INT-671
Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
Diffstat (limited to 'tests/externalapi-nbi/healthcheck')
-rw-r--r-- | tests/externalapi-nbi/healthcheck/__init__.robot | 2 | ||||
-rw-r--r-- | tests/externalapi-nbi/healthcheck/healthcheck.robot | 33 |
2 files changed, 35 insertions, 0 deletions
diff --git a/tests/externalapi-nbi/healthcheck/__init__.robot b/tests/externalapi-nbi/healthcheck/__init__.robot new file mode 100644 index 00000000..82635078 --- /dev/null +++ b/tests/externalapi-nbi/healthcheck/__init__.robot @@ -0,0 +1,2 @@ +*** Settings *** +Documentation ExternalAPI-NBI - healthcheck diff --git a/tests/externalapi-nbi/healthcheck/healthcheck.robot b/tests/externalapi-nbi/healthcheck/healthcheck.robot new file mode 100644 index 00000000..6c3ec296 --- /dev/null +++ b/tests/externalapi-nbi/healthcheck/healthcheck.robot @@ -0,0 +1,33 @@ +*** Settings *** +Documentation The main interface for interacting with External API/NBI +Library RequestsLibrary +Library Collections + +*** Variables *** +${GLOBAL_NBI_SERVER_PROTOCOL} http +${GLOBAL_INJECTED_NBI_IP_ADDR} localhost +${GLOBAL_NBI_SERVER_PORT} 8080 +${NBI_HEALTH_CHECK_PATH} /nbi/api/v3/status +${NBI_ENDPOINT} ${GLOBAL_NBI_SERVER_PROTOCOL}://${GLOBAL_INJECTED_NBI_IP_ADDR}:${GLOBAL_NBI_SERVER_PORT} + +*** Test Cases *** +NBI Health Check + Run NBI Health Check + +*** Keywords *** +Run NBI Health Check + [Documentation] Runs NBI Health check + ${resp}= Run NBI Get Request ${NBI_HEALTH_CHECK_PATH} + Should Be Equal As Integers ${resp.status_code} 200 + +Run NBI Get Request + [Documentation] Runs NBI Get request + [Arguments] ${data_path} + ${session}= Create Session session ${NBI_ENDPOINT} + ${resp}= Get Request session ${data_path} + Should Be Equal As Integers ${resp.status_code} 200 + Log Received response from NBI ${resp.text} + ${json}= Set Variable ${resp.json()} + ${status}= Get From Dictionary ${json} status + Should Be Equal ${status} ok + [Return] ${resp} |