Create OOF Robot Health Check 75/44475/2
authorEric Debeau <eric.debeau@orange.com>
Tue, 24 Apr 2018 17:22:41 +0000 (17:22 +0000)
committerEric Debeau <eric.debeau@orange.com>
Tue, 24 Apr 2018 18:01:22 +0000 (18:01 +0000)
Add tag

Change-Id: I285f58ca2c99102bf67efe45b37214677ba9d861
Issue-ID: OPTFRA-219
Signed-off-by: Eric Debeau <eric.debeau@orange.com>
robot/resources/oof_interface.robot [new file with mode: 0644]
robot/testsuites/health-check.robot

diff --git a/robot/resources/oof_interface.robot b/robot/resources/oof_interface.robot
new file mode 100644 (file)
index 0000000..7a061ec
--- /dev/null
@@ -0,0 +1,25 @@
+*** Settings ***
+Documentation     The main interface for interacting with OOF
+Library           RequestsLibrary
+
+Resource          global_properties.robot
+
+*** Variables ***
+${OOF_HEALTH_CHECK_PATH}        /api/oof/v1/healthcheck
+${OOF_ENDPOINT}     ${GLOBAL_OOF_SERVER_PROTOCOL}://${GLOBAL_INJECTED_OOF_IP_ADDR}:${GLOBAL_OOF_SERVER_PORT}
+
+
+*** Keywords ***
+Run OOF Health Check
+     [Documentation]    Runs OOF Health check
+     ${resp}=    Run OOF Get Request    ${OOF_HEALTH_CHECK_PATH}
+     Should Be Equal As Integers   ${resp.status_code}   200
+
+Run OOF Get Request
+     [Documentation]    Runs OOF Get request
+     [Arguments]    ${data_path}
+     ${session}=    Create Session   session   ${OOF_ENDPOINT}
+     ${resp}=   Get Request   session   ${data_path}
+     Should Be Equal As Integers   ${resp.status_code}   200
+     Log    Received response from OOF ${resp.text}
+     [Return]    ${resp}
index e2b647c..6f9c984 100644 (file)
@@ -23,6 +23,7 @@ Resource          ../resources/nbi_interface.robot
 Resource          ../resources/cli_interface.robot
 Resource          ../resources/vnfsdk_interface.robot
 Resource          ../resources/log_interface.robot
+Resource          ../resources/oof_interface.robot
 
 
 *** Test Cases ***
@@ -86,6 +87,10 @@ Basic Multicloud-vio API Health Check
      [Tags]    health    multicloud
      Run MSB Get Request  /api/multicloud-vio/v0/swagger.json
 
+Basic OOF Health Check
+    [Tags]    health    core
+    Run OOF Health Check
+
 Basic Policy Health Check
     [Tags]    health    core
     Run Policy Health Check