summaryrefslogtreecommitdiffstats
path: root/csit/resources
diff options
context:
space:
mode:
authorRam Krishna Verma <ram_krishna.verma@bell.ca>2023-07-12 12:03:55 -0400
committerRam Krishna Verma <ram_krishna.verma@bell.ca>2023-07-12 12:04:04 -0400
commit0fbd752b37e66a06fe419ba7d607d786f5bf8582 (patch)
tree7d3e9697bdcaf059b8cd1d156a2e3763db1e2850 /csit/resources
parentbdced49a2f16f1787088aa4f1013d8a07be51ec4 (diff)
Remove statistics from csit tests
Removing the db based statistics tests from csit first, so that later when we remove the actual code from repos the builds are not affected. Issue-ID: POLICY-4109 Change-Id: If21ffe93f000e605e4f7690cfc4e7986346fe67f Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Diffstat (limited to 'csit/resources')
-rw-r--r--csit/resources/tests/apex-pdp-common.robot18
-rw-r--r--csit/resources/tests/apex-pdp-test.robot3
-rw-r--r--csit/resources/tests/api-slas.robot4
-rw-r--r--csit/resources/tests/api-test.robot7
-rw-r--r--csit/resources/tests/distribution-test.robot17
-rw-r--r--csit/resources/tests/pap-slas.robot4
-rw-r--r--csit/resources/tests/pap-test.robot6
-rw-r--r--csit/resources/tests/xacml-pdp-test.robot29
8 files changed, 2 insertions, 86 deletions
diff --git a/csit/resources/tests/apex-pdp-common.robot b/csit/resources/tests/apex-pdp-common.robot
index cf3f1f49..8ae63af6 100644
--- a/csit/resources/tests/apex-pdp-common.robot
+++ b/csit/resources/tests/apex-pdp-common.robot
@@ -25,22 +25,6 @@ RunEventOnApexEngine
${resp}= PUT On Session apexSession /apex/FirstConsumer/EventIn data=${data} headers=${headers}
Should Be Equal As Strings ${resp.status_code} 200
-VerifyPdpStatistics
- [Documentation] Verify pdp statistics after policy execution
- [Arguments] ${deployCount} ${deploySuccessCount} ${executedCount} ${executedSuccessCount}
- ${policyadmin}= PolicyAdminAuth
- ${resp}= PerformGetRequest ${POLICY_PAP_IP} /policy/pap/v1/pdps/statistics/defaultGroup/apex/${pdpName} 200 null ${policyadmin}
- Should Be Equal As Strings ${resp.status_code} 200
- Should Be Equal As Strings ${resp.json()['defaultGroup']['apex'][0]['pdpInstanceId']} ${pdpName}
- Should Be Equal As Strings ${resp.json()['defaultGroup']['apex'][0]['pdpGroupName']} defaultGroup
- Should Be Equal As Strings ${resp.json()['defaultGroup']['apex'][0]['pdpSubGroupName']} apex
- Should Be Equal As Strings ${resp.json()['defaultGroup']['apex'][0]['policyDeployCount']} ${deployCount}
- Should Be Equal As Strings ${resp.json()['defaultGroup']['apex'][0]['policyDeploySuccessCount']} ${deploySuccessCount}
- Should Be Equal As Strings ${resp.json()['defaultGroup']['apex'][0]['policyDeployFailCount']} 0
- Should Be Equal As Strings ${resp.json()['defaultGroup']['apex'][0]['policyExecutedCount']} ${executedCount}
- Should Be Equal As Strings ${resp.json()['defaultGroup']['apex'][0]['policyExecutedSuccessCount']} ${executedSuccessCount}
- Should Be Equal As Strings ${resp.json()['defaultGroup']['apex'][0]['policyExecutedFailCount']} 0
-
CheckLogMessage
[Documentation] Read log messages received and check for expected content.
[Arguments] ${status} ${expectedMsg}
@@ -61,4 +45,4 @@ ValidateEventExecution
${eventTimeTaken}= Subtract Date From Date ${eventEndTime} ${eventStartTime}
${eventResult}= Set Variable ${eventTimeTaken * ${1000}}
${eventsPerSecond}= Set Variable ${${1000} / ${eventResult}}
- Should Be True ${eventsPerSecond} >= ${eventsNo} \ No newline at end of file
+ Should Be True ${eventsPerSecond} >= ${eventsNo}
diff --git a/csit/resources/tests/apex-pdp-test.robot b/csit/resources/tests/apex-pdp-test.robot
index f30af62d..b0232263 100644
--- a/csit/resources/tests/apex-pdp-test.robot
+++ b/csit/resources/tests/apex-pdp-test.robot
@@ -21,12 +21,9 @@ ExecuteApexSampleDomainPolicy
Set Test Variable ${policyName} onap.policies.native.apex.Sampledomain
${postjson}= Get File ${CURDIR}/data/${policyName}.json
CreatePolicy /policy/api/v1/policytypes/onap.policies.native.Apex/versions/1.0.0/policies 200 ${postjson} ${policyName} 1.0.0
- Wait Until Keyword Succeeds 3 min 5 sec VerifyPdpStatistics 0 0 0 0
DeployPolicy
Wait Until Keyword Succeeds 2 min 5 sec QueryPolicyStatus ${policyName} defaultGroup apex ${pdpName} onap.policies.native.Apex
- Wait Until Keyword Succeeds 3 min 5 sec VerifyPdpStatistics 1 1 0 0
Wait Until Keyword Succeeds 4 min 5 sec RunEventOnApexEngine
- Wait Until Keyword Succeeds 3 min 5 sec VerifyPdpStatistics 1 1 1 1
ExecuteApexTestPnfPolicy
Set Test Variable ${policyName} onap.policies.apex.pnf.Test
diff --git a/csit/resources/tests/api-slas.robot b/csit/resources/tests/api-slas.robot
index 7fd8ff98..1c549aa9 100644
--- a/csit/resources/tests/api-slas.robot
+++ b/csit/resources/tests/api-slas.robot
@@ -20,10 +20,6 @@ ValidateResponseTimeForHealthcheck
[Documentation] Validate component healthcheck response time
ValidateResponseTimeForApi /healthcheck GET
-ValidateResponseTimeForStatistics
- [Documentation] Validate statistics response time
- ValidateResponseTimeForApi /statistics GET
-
ValidateResponseTimeQueryPolicies
[Documentation] Validate query policies response time
ValidateResponseTimeForApi /policies GET
diff --git a/csit/resources/tests/api-test.robot b/csit/resources/tests/api-test.robot
index e8679a7f..74ea7c4a 100644
--- a/csit/resources/tests/api-test.robot
+++ b/csit/resources/tests/api-test.robot
@@ -14,11 +14,6 @@ Healthcheck
Should Be Equal As Strings ${resp.json()['healthy']} True
Should Be Equal As Strings ${resp.json()['message']} alive
-Statistics
- [Documentation] Verify policy api statistics
- ${resp}= GetReq /policy/api/v1/statistics
- Should Be Equal As Strings ${resp.json()['code']} 200
-
RetrievePolicyTypes
[Documentation] Retrieve all policy types
FetchPolicyTypes /policy/api/v1/policytypes 37
@@ -84,7 +79,6 @@ DeleteSpecificNodeTemplate
DeleteReq /policy/api/v1/nodetemplates/apexMetadata_adaptive/versions/2.3.1 200
DeleteReq /policy/api/v1/nodetemplates/apexMetadata_adaptive/versions/2.3.1 404
-
DeleteSpecificPolicy
[Documentation] Delete a policy named 'onap.restart.tca' and version '1.0.0' using generic api
DeleteReq /policy/api/v1/policies/onap.restart.tca/versions/1.0.0 200
@@ -115,7 +109,6 @@ Metrics
${auth}= PolicyAdminAuth
${resp}= GetMetrics ${POLICY_API_IP} ${auth} /policy/api/v1/
Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/healthcheck",}
- Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/statistics",} 1.0
Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policytypes",} 1.0
Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policies",} 1.0
Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policies/{policyId}/versions/{policyVersion}",} 1.0
diff --git a/csit/resources/tests/distribution-test.robot b/csit/resources/tests/distribution-test.robot
index 63d7e8be..b8b49248 100644
--- a/csit/resources/tests/distribution-test.robot
+++ b/csit/resources/tests/distribution-test.robot
@@ -13,23 +13,6 @@ Healthcheck
${resp}= PerformGetRequest ${DISTRIBUTION_IP} /healthcheck 200 null ${hcauth}
Should Be Equal As Strings ${resp.json()['code']} 200
-Statistics
- [Documentation] Verify policy distribution statistics
- ${hcauth}= PolicyAdminAuth
- ${resp}= PerformGetRequest ${DISTRIBUTION_IP} /statistics 200 null ${hcauth}
- Should Be Equal As Strings ${resp.json()['code']} 200
-
-Metrics
- [Documentation] Verify policy-distribution is exporting prometheus metrics
- ${hcauth}= PolicyAdminAuth
- ${resp}= PerformGetRequest ${DISTRIBUTION_IP} /metrics 200 null ${hcauth}
- Should Contain ${resp.text} total_distribution_received_count_total 0.0
- Should Contain ${resp.text} distribution_success_count_total 0.0
- Should Contain ${resp.text} distribution_failure_count_total 0.0
- Should Contain ${resp.text} total_download_received_count_total 0.0
- Should Contain ${resp.text} download_success_count_total 0.0
- Should Contain ${resp.text} download_failure_count_total 0.0
-
InvokeDistributionAndRunEventOnEngine
Wait Until Keyword Succeeds 5 min 30 sec InvokeDistributionUsingFile And RunEventOnApexEngine
diff --git a/csit/resources/tests/pap-slas.robot b/csit/resources/tests/pap-slas.robot
index 4b240047..4a044675 100644
--- a/csit/resources/tests/pap-slas.robot
+++ b/csit/resources/tests/pap-slas.robot
@@ -24,10 +24,6 @@ ValidateResponseTimeForSystemHealthcheck
[Documentation] Validate if system healthcheck response time is under 1000ms
ValidateResponseTime pap-metrics /components/healthcheck GET 10000
-ValidateResponseTimeForStatistics
- [Documentation] Validate statistics response time
- ValidateResponseTimeForPap /statistics GET
-
# TODO: includes notification, so always over 500ms
# ValidateResponseTimeCreateGroup
# [Documentation] Validate create group response time
diff --git a/csit/resources/tests/pap-test.robot b/csit/resources/tests/pap-test.robot
index 8a5fbb5f..09c26401 100644
--- a/csit/resources/tests/pap-test.robot
+++ b/csit/resources/tests/pap-test.robot
@@ -60,11 +60,6 @@ Metrics
Should Contain ${resp.text} spring_data_repository_invocations_seconds_count{exception="None",method="findByKeyName",repository="PdpGroupRepository",state="SUCCESS",} 1.0
Should Contain ${resp.text} spring_data_repository_invocations_seconds_count{exception="None",method="findAll",repository="PolicyStatusRepository",state="SUCCESS",}
-Statistics
- [Documentation] Verify policy pap statistics
- ${resp}= GetReq /policy/pap/v1/statistics
- Should Be Equal As Strings ${resp.json()['code']} 200
-
AddPdpGroup
[Documentation] Add a new PdpGroup named 'testGroup' in the policy database
${postjson}= Get file ${CURDIR}/data/create.group.request.json
@@ -145,7 +140,6 @@ QueryPdpGroupsAfterDelete
# ValidateDeploymentTime
# ValidateResponseTime pap-metrics /components/healthcheck GET 10000
# ValidateResponseTimeForPap /healthcheck GET
-# ValidateResponseTimeForPap /statistics GET
# ValidateResponseTimeForPap /policies/audit GET
# ValidateResponseTimeForPap /pdps/groups/{name} PUT
# ValidateResponseTimeForPap /pdps/policies/{name} DELETE
diff --git a/csit/resources/tests/xacml-pdp-test.robot b/csit/resources/tests/xacml-pdp-test.robot
index f90d0c21..331a7fa5 100644
--- a/csit/resources/tests/xacml-pdp-test.robot
+++ b/csit/resources/tests/xacml-pdp-test.robot
@@ -12,11 +12,6 @@ Healthcheck
${resp}= PdpxGetReq /policy/pdpx/v1/healthcheck
Should Be Equal As Strings ${resp.json()['code']} 200
-Statistics
- [Documentation] Verify policy xacml-pdp statistics
- ${resp}= PdpxGetReq /policy/pdpx/v1/statistics
- Should Be Equal As Strings ${resp.json()['code']} 200
-
Metrics
[Documentation] Verify policy-xacml-pdp is exporting prometheus metrics
${resp}= PdpxGetReq /metrics
@@ -31,14 +26,11 @@ ExecuteXacmlPolicy
CreateOptimizationPolicy
Wait Until Keyword Succeeds 1 min 15 sec GetDefaultDecision
DeployPolicies
- Wait Until Keyword Succeeds 1 min 15 sec GetStatisticsAfterDeployed
Wait Until Keyword Succeeds 1 min 15 sec GetAbbreviatedDecisionResult
Wait Until Keyword Succeeds 1 min 15 sec GetMonitoringDecision
Wait Until Keyword Succeeds 1 min 15 sec GetNamingDecision
Wait Until Keyword Succeeds 1 min 15 sec GetOptimizationDecision
- Wait Until Keyword Succeeds 1 min 15 sec GetStatisticsAfterDecision
UndeployMonitorPolicy
- Wait Until Keyword Succeeds 1 min 15 sec GetStatisticsAfterUndeploy
*** Keywords ***
@@ -68,15 +60,9 @@ DeployPolicies
Sleep 5s
${result}= CheckTopic POLICY-PDP-PAP ACTIVE
Should Contain ${result} responseTo
- Should Contain ${result} xacml
+ Should Contain ${result} xacml
Should Contain ${result} onap.restart.tca
-GetStatisticsAfterDeployed
- [Documentation] Verify policy xacml-pdp statistics after policy is deployed
- ${resp}= PdpxGetReq /policy/pdpx/v1/statistics
- Should Be Equal As Strings ${resp.json()['code']} 200
- Should Be Equal As Strings ${resp.json()['totalPoliciesCount']} 3
-
GetAbbreviatedDecisionResult
[Documentation] Get Decision with abbreviated results from Policy Xacml PDP
${postjson}= Get file ${CURDIR}/data/onap.policy.monitoring.decision.request.json
@@ -121,24 +107,11 @@ GetOptimizationDecision
Dictionary Should Contain Key ${policy} properties
Dictionary Should Contain Key ${policy} name
-GetStatisticsAfterDecision
- [Documentation] Runs Policy Xacml PDP Statistics after Decision request
- ${resp}= PdpxGetReq /policy/pdpx/v1/statistics
- Should Be Equal As Strings ${resp.json()['code']} 200
- Should Be Equal As Strings ${resp.json()['permitDecisionsCount']} 4
- Should Be Equal As Strings ${resp.json()['notApplicableDecisionsCount']} 1
-
UndeployMonitorPolicy
[Documentation] Runs Policy PAP to undeploy a policy
${policyadmin}= PolicyAdminAuth
PerformDeleteRequest ${POLICY_PAP_IP} /policy/pap/v1/pdps/policies/onap.restart.tca 202 ${policyadmin}
-GetStatisticsAfterUndeploy
- [Documentation] Runs Policy Xacml PDP Statistics after policy is undeployed
- ${resp}= PdpxGetReq /policy/pdpx/v1/statistics
- Should Be Equal As Strings ${resp.json()['code']} 200
- Should Be Equal As Strings ${resp.json()['totalPoliciesCount']} 2
-
PdpxGetReq
[Arguments] ${url}
${hcauth}= PolicyAdminAuth