aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--csit/api/tests/api-test.robot2
-rw-r--r--csit/common-library.robot4
-rw-r--r--csit/config/pap/papParameters.yaml2
-rw-r--r--csit/pap/tests/pap-test.robot14
4 files changed, 12 insertions, 10 deletions
diff --git a/csit/api/tests/api-test.robot b/csit/api/tests/api-test.robot
index d9ca2a97..37a06e85 100644
--- a/csit/api/tests/api-test.robot
+++ b/csit/api/tests/api-test.robot
@@ -114,7 +114,7 @@ DeleteSpecificPolicyTypeV3
Metrics
[Documentation] Verify policy-api is exporting prometheus metrics
${auth}= PolicyAdminAuth
- ${resp}= GetMetrics ${POLICY_API_IP} ${auth}
+ ${resp}= GetMetrics ${POLICY_API_IP} ${auth} /
Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policy/api/v1/healthcheck",} 1.0
Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policy/api/v1/statistics",} 1.0
Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policy/api/v1/policytypes",} 1.0
diff --git a/csit/common-library.robot b/csit/common-library.robot
index 42d3ed12..95831b0d 100644
--- a/csit/common-library.robot
+++ b/csit/common-library.robot
@@ -113,9 +113,9 @@ QueryPolicyStatus
Should Be Equal As Strings ${responseEntry['state']} SUCCESS
GetMetrics
- [Arguments] ${hostname} ${auth}
+ [Arguments] ${hostname} ${auth} ${context_path}
Log Creating session http://${hostname}:6969
${session}= Create Session policy http://${hostname}:6969 auth=${auth}
- ${resp}= GET On Session policy /metrics expected_status=200
+ ${resp}= GET On Session policy ${context_path}metrics expected_status=200
Log Received response from policy ${resp.text}
[return] ${resp}
diff --git a/csit/config/pap/papParameters.yaml b/csit/config/pap/papParameters.yaml
index 330feee8..cc59dda5 100644
--- a/csit/config/pap/papParameters.yaml
+++ b/csit/config/pap/papParameters.yaml
@@ -23,6 +23,8 @@ spring:
server:
port: 6969
+ servlet:
+ context-path: /policy/pap/v1
ssl:
enabled: false
diff --git a/csit/pap/tests/pap-test.robot b/csit/pap/tests/pap-test.robot
index 8bf32300..624a4150 100644
--- a/csit/pap/tests/pap-test.robot
+++ b/csit/pap/tests/pap-test.robot
@@ -41,12 +41,12 @@ Consolidated Healthcheck
Metrics
[Documentation] Verify policy pap is exporting prometheus metrics
${auth}= PolicyAdminAuth
- ${resp}= GetMetrics ${POLICY_PAP_IP} ${auth}
- Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policy/pap/v1/healthcheck",} 1.0
- Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policy/pap/v1/components/healthcheck",} 1.0
- Should Contain ${resp.text} spring_data_repository_invocations_seconds_count{exception="None",method="save",repository="PdpGroupRepository",state="SUCCESS",} 1.0
- 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",} 1.0
+ ${resp}= GetMetrics ${POLICY_PAP_IP} ${auth} /policy/pap/v1/
+ Should Contain ${resp.text} tomcat_sessions_active_current_sessions
+ Should Contain ${resp.text} jdbc_connections_idle{name="dataSource",}
+ Should Contain ${resp.text} spring_data_repository_invocations_seconds_count{exception="None",method="save",repository="PdpGroupRepository",state="SUCCESS",}
+ Should Contain ${resp.text} spring_data_repository_invocations_seconds_count{exception="None",method="findByKeyName",repository="PdpGroupRepository",state="SUCCESS",}
+ Should Contain ${resp.text} spring_data_repository_invocations_seconds_count{exception="None",method="findAll",repository="PolicyStatusRepository",state="SUCCESS",}
Statistics
[Documentation] Verify policy pap statistics
@@ -106,7 +106,7 @@ QueryPdpGroupsAfterUndeploy
QueryPolicyAuditAfterUnDeploy
[Documentation] Verify policy audit record after undeploy
- Sleep 130 seconds
+ Sleep 20 seconds
QueryPolicyAudit /policy/pap/v1/policies/audit 200 testGroup pdpTypeA onap.restart.tca UNDEPLOYMENT
QueryPolicyAuditWithMetadataSetAfterUnDeploy