summaryrefslogtreecommitdiffstats
path: root/robot
diff options
context:
space:
mode:
authorBrian Freeman <bf1936@att.com>2019-05-08 14:54:27 -0500
committerBrian Freeman <bf1936@att.com>2019-05-08 14:54:35 -0500
commit60abff0aa5c780a94924feb8422a05556239916a (patch)
tree7e6140b17a026a67de31db49f1673c1fa8daa91f /robot
parent0c6e520a97945c9921a4b236459649ded228d309 (diff)
cherry pick Policy Updates
https://gerrit.onap.org/r/#/c/87069 Issue-ID: POLICY-1630 Change-Id: I49af6d610408de503906f96d250ad22f63e5e210 Signed-off-by: Brian Freeman <bf1936@att.com>
Diffstat (limited to 'robot')
-rw-r--r--robot/resources/policy_interface.robot62
-rw-r--r--robot/testsuites/health-check.robot6
2 files changed, 68 insertions, 0 deletions
diff --git a/robot/resources/policy_interface.robot b/robot/resources/policy_interface.robot
index 91d0d98b..d4882811 100644
--- a/robot/resources/policy_interface.robot
+++ b/robot/resources/policy_interface.robot
@@ -13,6 +13,13 @@ ${POLICY_ENDPOINT} ${GLOBAL_POLICY_SERVER_PROTOCOL}://${GLOBAL_INJECTED_POLI
${POLICY_HEALTHCHECK_ENDPOINT} ${GLOBAL_POLICY_SERVER_PROTOCOL}://${GLOBAL_INJECTED_POLICY_HEALTHCHECK_IP_ADDR}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
${POLICY_TEMPLATES} robot/assets/templates/policy
${DROOLS_ENDPOINT} ${GLOBAL_POLICY_SERVER_PROTOCOL}://${GLOBAL_INJECTED_POLICY_IP_ADDR}:${GLOBAL_DROOLS_SERVER_PORT}
+${POLICY_API_IP} ${GLOBAL_INJECTED_POLICY_API_IP_ADDR}
+${POLICY_PAP_IP} ${GLOBAL_INJECTED_POLICY_PAP_IP_ADDR}
+${POLICY_DISTRIBUTION_IP} ${GLOBAL_INJECTED_POLICY_DISTRIBUTION_IP_ADDR}
+${POLICY_PDPX_IP} ${GLOBAL_INJECTED_POLICY_PDPX_IP_ADDR}
+${POLICY_APEX_PDP_IP} ${GLOBAL_INJECTED_POLICY_APEX_PDP_IP_ADDR}
+${POLICY_HEALTHCHECK_USERNAME} ${GLOBAL_POLICY_HEALTHCHECK_USERNAME}
+${POLICY_HEALTHCHECK_PASSWORD} ${GLOBAL_POLICY_HEALTHCHECK_PASSWORD}
*** Keywords ***
@@ -190,3 +197,58 @@ Push vFirewall Policies To PDP Group
${resp}= Run Policy Post Request /policy/pap/v1/pdps/policies ${data}
Should Be Equal As Strings ${resp.status_code} 200
+Run Policy API Healthcheck
+ [Documentation] Runs Policy Api Health check
+ ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
+ Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
+ ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_API_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Get Request policy /policy/api/v1/healthcheck headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.json()['code']} 200
+
+Run Policy PAP Healthcheck
+ [Documentation] Runs Policy PAP Health check
+ ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
+ Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
+ ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Get Request policy /policy/pap/v1/healthcheck headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.json()['code']} 200
+
+Run Policy Distribution Healthcheck
+ [Documentation] Runs Policy Distribution Health check
+ ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
+ Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_DISTRIBUTION_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
+ ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_DISTRIBUTION_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Get Request policy /healthcheck headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.json()['code']} 200
+
+Run Policy XACML PDP Healthcheck
+ [Documentation] Runs Policy Xacml PDP Health check
+ ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
+ Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PDPX_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
+ ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PDPX_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Get Request policy /policy/pdpx/v1/healthcheck headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.json()['code']} 200
+
+Run Policy APEX PDP Healthcheck
+ [Documentation] Runs Policy Apex PDP Health check
+ ${auth}= Create List ${POLICY_HEALTHCHECK_USERNAME} ${POLICY_HEALTHCHECK_PASSWORD}
+ Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_APEX_PDP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
+ ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_APEX_PDP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Get Request policy /policy/apex-pdp/v1/healthcheck headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.json()['code']} 200
+
diff --git a/robot/testsuites/health-check.robot b/robot/testsuites/health-check.robot
index d0b395a9..7f80350e 100644
--- a/robot/testsuites/health-check.robot
+++ b/robot/testsuites/health-check.robot
@@ -140,6 +140,12 @@ Basic OOF-CMSO Health Check
Basic Policy Health Check
[Tags] health medium health-policy
Run Policy Health Check
+ Run Policy API Healthcheck
+ Run Policy PAP Healthcheck
+ Run Policy Distribution Healthcheck
+ Run Policy XACML PDP Healthcheck
+ Run Policy APEX PDP Healthcheck
+
Basic Pomba AAI-context-builder Health Check
[Tags] health oom health-pomba