aboutsummaryrefslogtreecommitdiffstats
path: root/robot
diff options
context:
space:
mode:
Diffstat (limited to 'robot')
-rw-r--r--robot/resources/sdnc_interface.robot27
-rw-r--r--robot/testsuites/health-check.robot4
2 files changed, 31 insertions, 0 deletions
diff --git a/robot/resources/sdnc_interface.robot b/robot/resources/sdnc_interface.robot
index d8a73cf2..2e714217 100644
--- a/robot/resources/sdnc_interface.robot
+++ b/robot/resources/sdnc_interface.robot
@@ -28,6 +28,9 @@ ${SDNC_ADMIN_ENDPOINT} ${GLOBAL_SDNC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDN
${SDNC_ADMIN_SIGNUP_URL} ${SDNC_ADMIN_ENDPOINT}/signup
${SDNC_ADMIN_LOGIN_URL} ${SDNC_ADMIN_ENDPOINT}/login
${SDNC_ADMIN_VNF_PROFILE_URL} ${SDNC_ADMIN_ENDPOINT}/mobility/getVnfProfile
+${GRAPI_SIPath} ${SDNC_INDEX_PATH}/config/GENERIC-RESOURCE-API:services/service/${GR_SI}
+${Data_GRAPI} { "service": [ { "service-instance-id": "GRSIdummy123" } ] }
+${GR_SI} GRSIdummy123
*** Keywords ***
Run SDNC Health Check
@@ -36,6 +39,30 @@ Run SDNC Health Check
Should Be Equal As Strings ${resp.status_code} 200
Should Be Equal As Strings ${resp.json()['output']['response-code']} 200
+Run SDNC Health Check Generic Resource API
+ [Documentation] Runs an GENERIC-RESOURCE-API API check for SDNC healthcheck
+ ${delete_response} Run SDNC Delete Request ${GRAPI_SIPath}
+ #Put Dummy data
+ ${Put_resp}= SDNC.Run Put Request ${SDNC_REST_ENDPOINT} ${GRAPI_SIPath} data=${Data_GRAPI} auth=${GLOBAL_SDNC_AUTHENTICATION}
+ Should Be Equal As Strings ${Put_resp.status_code} 201
+ #Get request and validation
+ ${resp}= SDNC.Run Get Request ${SDNC_REST_ENDPOINT} ${GRAPI_SIPath} auth=${GLOBAL_SDNC_AUTHENTICATION}
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${res_body}= Convert to string ${resp.content}
+ Should contain ${res_body} ${GR_SI}
+ #Delete Dummy Data
+ ${delete_response} Run SDNC Delete Request ${GRAPI_SIPath}
+ Should Be Equal As Strings ${delete_response.status_code} 200
+
+Run SDNC Delete Request
+ [Documentation] Runs an SDNC Delete Request
+ [Arguments] ${URL}
+ Disable Warnings
+ ${session}= Create Session SDNC ${SDNC_REST_ENDPOINT} auth=${GLOBAL_SDNC_AUTHENTICATION}
+ ${headers}= Create Dictionary Accept=*/* Accept-Encoding=gzip, deflate, br Connection=keep-alive
+ ${resp}= Delete Request SDNC ${URL} data=${None} headers=${headers}
+ [Return] ${resp}
+
Preload Vcpe Networks
Preload Network cpe_public 10.2.0.2 10.2.0.1
Preload Network cpe_signal 10.4.0.2 10.4.0.1
diff --git a/robot/testsuites/health-check.robot b/robot/testsuites/health-check.robot
index 5624b841..c80ed715 100644
--- a/robot/testsuites/health-check.robot
+++ b/robot/testsuites/health-check.robot
@@ -197,6 +197,10 @@ Basic SDNC Health Check
[Tags] health core health-sdnc
Run SDNC Health Check
+Enhanced SDNC Health Check
+ [Tags] health core health-sdnc
+ Run SDNC Health Check Generic Resource API
+
Basic SO Health Check
[Tags] health core health-so
SO.Run Get Request ${GLOBAL_SO_APIHAND_ENDPOINT} ${GLOBAL_SO_HEALTH_CHECK_PATH}