aboutsummaryrefslogtreecommitdiffstats
path: root/robot
diff options
context:
space:
mode:
authorNagendra90287 <nagendrakumar.pal@amdocs.com>2020-08-31 21:51:42 +0530
committerMorgan Richomme <morgan.richomme@orange.com>2020-09-16 19:37:29 +0000
commitda8e4c387c06cd481964169a5612e2905abfb6b7 (patch)
treee3f3a804246ce247230aec4edf568d95e84dc674 /robot
parent56521ebd9c8b76047d12f39df04f72d167fb3563 (diff)
A&AI health check improvement:
Issue-ID: AAI-3123 Change-Id: Ib3d53712b0ad3a0e73e4eed931bde0b301eb50a4 Signed-off-by: Nagendra90287 <nagendrakumar.pal@amdocs.com> Change-Id: I36b3914e829485d0137e532f84d1569e710ca428 Signed-off-by: Nagendra90287 <nagendrakumar.pal@amdocs.com>
Diffstat (limited to 'robot')
-rw-r--r--robot/resources/aai/aai_interface.robot41
-rw-r--r--robot/testsuites/health-check.robot5
2 files changed, 44 insertions, 2 deletions
diff --git a/robot/resources/aai/aai_interface.robot b/robot/resources/aai/aai_interface.robot
index d43f35c4..64026993 100644
--- a/robot/resources/aai/aai_interface.robot
+++ b/robot/resources/aai/aai_interface.robot
@@ -7,8 +7,13 @@ Resource ../global_properties.robot
*** Variables ***
${AAI_HEALTH_PATH} /aai/util/echo?action=long
-${VERSIONED_INDEX_PATH} /aai/v11
+${VERSIONED_INDEX_PATH} /aai/v19
${AAI_FRONTEND_ENDPOINT} ${GLOBAL_AAI_SERVER_PROTOCOL}://${GLOBAL_INJECTED_AAI_IP_ADDR}:${GLOBAL_AAI_SERVER_PORT}
+${model_invariant_id} AAI-HealthCheck-Dummy
+${data_path} ${VERSIONED_INDEX_PATH}/service-design-and-creation/models/model/${model_invariant_id}
+${PUT_data} {"model-invariant-id": "AAI-HealthCheck-Dummy","model-type": "service"}
+${traversal_data_path} ${VERSIONED_INDEX_PATH}/query?format=count
+${traversal_data} {"start" : "service-design-and-creation/models"}
*** Keywords ***
@@ -17,6 +22,38 @@ Run A&AI Health Check
${resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${AAI_HEALTH_PATH} auth=${GLOBAL_AAI_AUTHENTICATION}
Should Be Equal As Strings ${resp.status_code} 200
+Run Resource API AAI Inventory check
+ [Documentation] Runs A&AI Inventory health check Resource API
+ ${GET_res}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${data_path} auth=${GLOBAL_AAI_AUTHENTICATION}
+ Run Keyword If ${GET_res.status_code}== 200 Run Delete dummy data ${GET_res}
+ Run Resource API
+
+Run Delete dummy data
+ [Documentation] Delete Existing dummy data
+ [Arguments] ${GET_res}
+ ${json} = Set Variable ${GET_res.json()}
+ ${resource_version} Set Variable ${json["resource-version"]}
+ ${delete_response}= AAI.Run Delete Request ${AAI_FRONTEND_ENDPOINT} ${data_path} ${resource_version} auth=${GLOBAL_AAI_AUTHENTICATION}
+ Should Be Equal As Strings ${delete_response.status_code} 204
+
+Run Resource API
+ [Documentation] Resource API check with put get and delete request
+ #PUT Request
+ ${Put_resp}= AAI.Run Put Request ${AAI_FRONTEND_ENDPOINT} ${data_path} ${PUT_data} auth=${GLOBAL_AAI_AUTHENTICATION}
+ Should Be Equal As Strings ${Put_resp.status_code} 201
+ #GET Request
+ ${GET_resp}= AAI.Run Get Request ${AAI_FRONTEND_ENDPOINT} ${data_path} auth=${GLOBAL_AAI_AUTHENTICATION}
+ Should Be Equal As Strings ${GET_resp.status_code} 200
+ ${res_body}= Convert to string ${GET_resp.content}
+ Should contain ${res_body} ${model_invariant_id}
+ #DELETE Request
+ Run Delete dummy data ${GET_resp}
+
+Run Traversal API AAI Inventory check
+ [Documentation] Runs A&AI Inventory health check Traversal API
+ ${Put_resp}= AAI.Run Put Request ${AAI_FRONTEND_ENDPOINT} ${traversal_data_path} ${traversal_data} auth=${GLOBAL_AAI_AUTHENTICATION}
+ Should Be Equal As Strings ${Put_resp.status_code} 200
+
Delete A&AI Entity
[Documentation] Deletes an entity in A&AI
[Arguments] ${uri}
@@ -27,4 +64,4 @@ Delete A&AI Entity Exists
[Documentation] Deletes an A&AI entity
[Arguments] ${uri} ${resource_version_id}
${put_resp}= AAI.Run Delete Request ${AAI_FRONTEND_ENDPOINT} ${VERSIONED_INDEX_PATH}${uri} ${resource_version_id} auth=${GLOBAL_AAI_AUTHENTICATION}
- Should Be Equal As Strings ${put_resp.status_code} 204 \ No newline at end of file
+ Should Be Equal As Strings ${put_resp.status_code} 204
diff --git a/robot/testsuites/health-check.robot b/robot/testsuites/health-check.robot
index 3aed94bb..9e9e8394 100644
--- a/robot/testsuites/health-check.robot
+++ b/robot/testsuites/health-check.robot
@@ -35,6 +35,11 @@ Basic A&AI Health Check
[Tags] health core health-aai
Run A&AI Health Check
+Enhanced A&AI Health Check
+ [Tags] health core health-aai
+ Run Resource API AAI Inventory check
+ Run Traversal API AAI Inventory check
+
Basic AAF Health Check
[Tags] health small health-aaf
Run AAF Health Check