aboutsummaryrefslogtreecommitdiffstats
path: root/robot
diff options
context:
space:
mode:
Diffstat (limited to 'robot')
-rw-r--r--robot/resources/nbi_interface.robot28
-rw-r--r--robot/testsuites/health-check.robot13
2 files changed, 37 insertions, 4 deletions
diff --git a/robot/resources/nbi_interface.robot b/robot/resources/nbi_interface.robot
new file mode 100644
index 00000000..076ecd20
--- /dev/null
+++ b/robot/resources/nbi_interface.robot
@@ -0,0 +1,28 @@
+*** Settings ***
+Documentation The main interface for interacting with External API/NBI
+Library RequestsLibrary
+
+Resource global_properties.robot
+
+*** Variables ***
+${NBI_HEALTH_CHECK_PATH} /nbi/api/v1/status
+${NBI_ENDPOINT} ${GLOBAL_NBI_SERVER_PROTOCOL}://${GLOBAL_INJECTED_NBI_IP_ADDR}:${GLOBAL_NBI_SERVER_PORT}
+
+
+*** 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}
diff --git a/robot/testsuites/health-check.robot b/robot/testsuites/health-check.robot
index 2091b596..eefbd493 100644
--- a/robot/testsuites/health-check.robot
+++ b/robot/testsuites/health-check.robot
@@ -1,8 +1,8 @@
*** Settings ***
Test Timeout 1 minute
-Documentation Testing ecomp components are available via calls.
+Documentation Testing ecomp components are available via calls.
...
-... Testing ecomp components are available via calls.
+... Testing ecomp components are available via calls.
Resource ../resources/dcae_interface.robot
Resource ../resources/sdngc_interface.robot
@@ -19,6 +19,7 @@ Resource ../resources/msb_interface.robot
Resource ../resources/clamp_interface.robot
Resource ../resources/music/music_interface.robot
Resource ../resources/test_templates/model_test_template.robot
+Resource ../resources/nbi_interface.robot
*** Test Cases ***
@@ -104,7 +105,7 @@ Basic VFC gvnfmdriver API Health Check
Basic VFC jujuvnfmdriver API Health Check
[Tags] health 3rdparty
- Run MSB Get Request /api/jujuvnfmdriver/v1/swagger.json
+ Run MSB Get Request /api/jujuvnfmdriver/v1/swagger.json
Basic VFC multivimproxy API Health Check
[Tags] health 3rdparty
@@ -165,9 +166,13 @@ Health Distribution Test
Portal Login Tests
[Tags] healthlogin
- Run Portal Login Tests
+ Run Portal Login Tests
Portal Application Access Tests
[Tags] healthportalapp
[Timeout] 180
Run Portal Application Access Tests
+
+Basic NBI Health Check
+ [Tags] externalapi
+ Run NBI Health Check