summaryrefslogtreecommitdiffstats
path: root/robot
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2022-02-17 14:11:04 +0000
committerMorgan Richomme <morgan.richomme@orange.com>2022-02-17 14:11:04 +0000
commit96066290e5aff3f3c98cb9451e940f09d19f690e (patch)
treef1fba5320130e4446c24a36cf5714c9bffce7427 /robot
parentb6b943d4ef604e7e8430335928b499812a288788 (diff)
Revert "Add cleanup of policy if existing in the beginning of the health check"
This reverts commit b6b943d4ef604e7e8430335928b499812a288788. Reason for revert: <Regression Introduced in Policy enhanced healthcheck> Issue-ID: POLICY-3887 Change-Id: Iba503f1c7a534e3a513903a19881a0b9b5e0fe82 Signed-off-by: <morgan.richomme@orange.com>
Diffstat (limited to 'robot')
-rw-r--r--robot/resources/policy_interface.robot31
-rw-r--r--robot/testsuites/health-check.robot1
2 files changed, 1 insertions, 31 deletions
diff --git a/robot/resources/policy_interface.robot b/robot/resources/policy_interface.robot
index 5a613abb..bfbd74e8 100644
--- a/robot/resources/policy_interface.robot
+++ b/robot/resources/policy_interface.robot
@@ -19,15 +19,9 @@ ${POLICY_PDPX_IP} ${GLOBAL_INJECTED_POLICY_PDPX_IP_ADDR}
${POLICY_ADMIN_USERNAME} ${GLOBAL_POLICY_ADMIN_USERNAME}
${POLICY_ADMIN_PASSWORD} ${GLOBAL_POLICY_ADMIN_PASSWORD}
${json_path_policy} /var/opt/ONAP/robot/assets/policy/
-${POLICY_STATE_FIELD} SUCCESS
-${PDP_GROUP_NAME} defaultGroup
-${POLICY_NAME} operational.modifyconfig
-${POLICY_VERSION} 1.0.0
-${POLICY_TYPE} onap.policies.controlloop.operational.common.Drools
-${POLICY_TYPE_VERSION} 1.0.0
${POLICY_GET_POLICY_URI} /policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0/policies/operational.modifyconfig/versions/1.0.0
${POLICY_CREATE_POLICY_URI} /policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0/policies
-${POLICY_PAP_STATUS_QUERY} /policy/pap/v1/policies/status/${PDP_GROUP_NAME}/${POLICY_NAME}/${POLICY_VERSION}
+
*** Keywords ***
@@ -250,26 +244,3 @@ Run Delete Policy Request
Log Received response from policy ${resp.text}
[Return] ${resp}
Should Be Equal As Strings ${resp.status_code} 200
-
-Run Policy Deployment Verification
- [Documentation] Runs Get Request to validate if the policy is deployed. Also, it verify the policy name, version, pdp group name and policy state field.
- ${auth}= Create List ${POLICY_ADMIN_USERNAME} ${POLICY_ADMIN_PASSWORD}
- ${session}= Create Session policy ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT} auth=${auth}
- Log Creating session ${GLOBAL_POLICY_SERVER_PROTOCOL}://${POLICY_PAP_IP}:${GLOBAL_POLICY_HEALTHCHECK_PORT}
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
- ${resp_deployed_policy}= Get Request policy ${POLICY_PAP_STATUS_QUERY} headers=${headers}
- Log Received response from policy status ${resp_deployed_policy.text}
- Return From Keyword If ${resp_deployed_policy.status_code}==404
- Should Be Equal As Strings ${resp_deployed_policy.status_code} 200
- ${resp_deployed_policy_string}= Convert to string ${resp_deployed_policy.content}
- ${resp_deployed_policy_flag}= Run Keyword And Return Status Should Contain ${resp_deployed_policy_string} ${POLICY_NAME} ${POLICY_VERSION} ${PDP_GROUP_NAME} ${POLICY_STATE_FIELD}
- [Return] ${resp_deployed_policy_flag}
-
-Check for Existing Policy and Clean up
- [Documentation] Policy not created then exit this method. If policy is created only then run Delete request with policy name. If policy created and deployed then run undeploy and then delete policy.
- ${resp_policy_created}= Run Get Policy Get Request
- Return From Keyword If ${resp_policy_created.status_code}==404
- Should Be Equal As Strings ${resp_policy_created.status_code} 200
- ${resp_policy_deployed}= Run Policy Deployment Verification
- Run Keyword If ${resp_policy_deployed}==True Run Undeploy Policy
- Run Delete Policy Request \ No newline at end of file
diff --git a/robot/testsuites/health-check.robot b/robot/testsuites/health-check.robot
index 8b617c62..a6666ffa 100644
--- a/robot/testsuites/health-check.robot
+++ b/robot/testsuites/health-check.robot
@@ -146,7 +146,6 @@ Basic Policy Health Check
Enhanced Policy New Healthcheck
[Tags] health medium health-policy
[Timeout] 60
- Check for Existing Policy and Clean up
Run Create Policy Post Request
Run Get Policy Get Request
Run Deploy Policy Pap Post Request