summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRamesh Murugan Iyer <ramesh.murugan.iyer@est.tech>2024-05-31 09:08:27 +0000
committerGerrit Code Review <gerrit@onap.org>2024-05-31 09:08:27 +0000
commitc27bece1c12e93c2f780f80e1bdc12d5f53fd10f (patch)
tree512d11278568978abf2684d9f370106e150ab6e4
parentd936cd014cea05207f27b5faede4cf9d1e4c1283 (diff)
parent2ac4b6c7e56b0ed3a9fabca1c2123e3b89f27d65 (diff)
Merge "Fix timeout in pap CSIT for auditing undeploys"
-rw-r--r--csit/resources/tests/common-library.robot4
-rw-r--r--csit/resources/tests/pap-test.robot16
2 files changed, 5 insertions, 15 deletions
diff --git a/csit/resources/tests/common-library.robot b/csit/resources/tests/common-library.robot
index 18bfab99..bee80a90 100644
--- a/csit/resources/tests/common-library.robot
+++ b/csit/resources/tests/common-library.robot
@@ -77,10 +77,10 @@ QueryPdpGroups
QueryPolicyAudit
[Arguments] ${url} ${expectedstatus} ${pdpGroup} ${pdpType} ${policyName} ${expectedAction}
${policyadmin}= PolicyAdminAuth
- ${resp}= PerformGetRequest ${POLICY_PAP_IP} ${url} ${expectedstatus} recordCount=2 ${policyadmin}
+ ${resp}= PerformGetRequest ${POLICY_PAP_IP} ${url} ${expectedstatus} recordCount=4 ${policyadmin}
Log Received response from queryPolicyAudit ${resp.text}
FOR ${responseEntry} IN @{resp.json()}
- Exit For Loop IF '${responseEntry['policy']['name']}'=='${policyName}'
+ Exit For Loop IF '${responseEntry['policy']['name']}'=='${policyName}' and '${responseEntry['action']}'=='${expectedAction}'
END
Should Be Equal As Strings ${responseEntry['pdpGroup']} ${pdpGroup}
Should Be Equal As Strings ${responseEntry['pdpType']} ${pdpType}
diff --git a/csit/resources/tests/pap-test.robot b/csit/resources/tests/pap-test.robot
index cd02e3ab..13bf16ed 100644
--- a/csit/resources/tests/pap-test.robot
+++ b/csit/resources/tests/pap-test.robot
@@ -12,17 +12,8 @@ GetReq
${resp}= PerformGetRequest ${POLICY_PAP_IP} ${url} 200 null ${auth}
RETURN ${resp}
-ValidateResponseTimeForPap
- [Arguments] ${uri} ${method}
- [Documentation] Check if uri response is under the required time for pap metrics
- ValidateResponseTime pap-metrics ${uri} ${method} 500
-
-ValidateDeploymentTime
- [Documentation] Check if deployment of policy is under 2000ms
- ${resp}= QueryPrometheus pap_policy_deployments_seconds_sum{operation="deploy",status="SUCCESS"}/pap_policy_deployments_seconds_count{operation="deploy",status="SUCCESS"}
- ${rawNumber}= Evaluate ${resp['data']['result'][0]['value'][1]}
- ${actualTime}= Set Variable ${rawNumber * ${1000}}
- Should Be True ${actualTime} <= ${2000}
+CheckUndeploymentStatus
+ QueryPolicyAudit /policy/pap/v1/policies/audit 200 testGroup pdpTypeA onap.restart.tca UNDEPLOYMENT
*** Test Cases ***
LoadPolicy
@@ -114,8 +105,7 @@ QueryPdpGroupsAfterUndeploy
QueryPolicyAuditAfterUnDeploy
[Documentation] Verify policy audit record after undeploy
- Sleep 20 seconds
- QueryPolicyAudit /policy/pap/v1/policies/audit 200 testGroup pdpTypeA onap.restart.tca UNDEPLOYMENT
+ Wait Until Keyword Succeeds 2 min 10 sec CheckUndeploymentStatus
QueryPolicyAuditWithMetadataSetAfterUnDeploy
[Documentation] Verify policy audit record after undeploy