aboutsummaryrefslogtreecommitdiffstats
path: root/csit
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2024-09-03 10:51:39 +0100
committeradheli.tavares <adheli.tavares@est.tech>2024-09-03 10:53:28 +0100
commit4c2e1f59e6992e3f844e46f9d65a0b147fe2820e (patch)
tree16b575c16eb341233109e0c71d4130aba39e51d4 /csit
parentd802fd9a6c6aaffa330a30b68f7896ffebaa4fcd (diff)
Fix tests after changing Spring Framework version.
Issue-ID: POLICY-5073 Change-Id: Ie71e3f4b7e2de9e8251e16cfac3c5d87d708a75a Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'csit')
-rw-r--r--csit/resources/tests/api-test.robot20
-rw-r--r--csit/resources/tests/common-library.robot22
-rw-r--r--csit/resources/tests/pap-test.robot10
-rw-r--r--csit/resources/tests/policy-clamp-test.robot22
4 files changed, 37 insertions, 37 deletions
diff --git a/csit/resources/tests/api-test.robot b/csit/resources/tests/api-test.robot
index 9c8a5f0b..3554bb15 100644
--- a/csit/resources/tests/api-test.robot
+++ b/csit/resources/tests/api-test.robot
@@ -108,16 +108,16 @@ Metrics
[Documentation] Verify policy-api is exporting prometheus metrics
${auth}= PolicyAdminAuth
${resp}= GetMetrics ${POLICY_API_IP} ${auth} /policy/api/v1/
- Should Contain ${resp.text} http_server_requests_seconds_count{error="none",exception="none",method="GET",outcome="SUCCESS",status="200",uri="/healthcheck",} 1.0
- Should Contain ${resp.text} http_server_requests_seconds_count{error="none",exception="none",method="GET",outcome="SUCCESS",status="200",uri="/policytypes",} 1.0
- Should Contain ${resp.text} http_server_requests_seconds_count{error="none",exception="none",method="GET",outcome="SUCCESS",status="200",uri="/policies",} 1.0
- Should Contain ${resp.text} http_server_requests_seconds_count{error="none",exception="none",method="GET",outcome="SUCCESS",status="200",uri="/policies/{policyId}/versions/{policyVersion}",} 1.0
- Should Contain ${resp.text} http_server_requests_seconds_count{error="none",exception="none",method="GET",outcome="SUCCESS",status="200",uri="/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies",} 1.0
- Should Contain ${resp.text} http_server_requests_seconds_count{error="none",exception="none",method="POST",outcome="SUCCESS",status="201",uri="/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies",} 1.0
- Should Contain ${resp.text} http_server_requests_seconds_count{error="none",exception="none",method="POST",outcome="SUCCESS",status="201",uri="/policytypes",} 1.0
- Should Contain ${resp.text} http_server_requests_seconds_count{error="none",exception="none",method="DELETE",outcome="SUCCESS",status="200",uri="/policies/{policyId}/versions/{policyVersion}",} 1.0
- Should Contain ${resp.text} http_server_requests_seconds_count{error="none",exception="none",method="DELETE",outcome="SUCCESS",status="200",uri="/policytypes/{policyTypeId}/versions/{versionId}",} 3.0
- Should Contain ${resp.text} http_server_requests_seconds_count{error="none",exception="none",method="DELETE",outcome="SUCCESS",status="200",uri="/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}/versions/{policyVersion}",} 1.0
+ Should Contain ${resp.text} http_server_requests_seconds_count{error="none",exception="none",method="GET",outcome="SUCCESS",status="200",uri="/healthcheck"} 1
+ Should Contain ${resp.text} http_server_requests_seconds_count{error="none",exception="none",method="GET",outcome="SUCCESS",status="200",uri="/policytypes"} 1
+ Should Contain ${resp.text} http_server_requests_seconds_count{error="none",exception="none",method="GET",outcome="SUCCESS",status="200",uri="/policies"} 1
+ Should Contain ${resp.text} http_server_requests_seconds_count{error="none",exception="none",method="GET",outcome="SUCCESS",status="200",uri="/policies/{policyId}/versions/{policyVersion}"} 1
+ Should Contain ${resp.text} http_server_requests_seconds_count{error="none",exception="none",method="GET",outcome="SUCCESS",status="200",uri="/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies"} 1
+ Should Contain ${resp.text} http_server_requests_seconds_count{error="none",exception="none",method="POST",outcome="SUCCESS",status="201",uri="/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies"} 1
+ Should Contain ${resp.text} http_server_requests_seconds_count{error="none",exception="none",method="POST",outcome="SUCCESS",status="201",uri="/policytypes"} 1
+ Should Contain ${resp.text} http_server_requests_seconds_count{error="none",exception="none",method="DELETE",outcome="SUCCESS",status="200",uri="/policies/{policyId}/versions/{policyVersion}"} 1
+ Should Contain ${resp.text} http_server_requests_seconds_count{error="none",exception="none",method="DELETE",outcome="SUCCESS",status="200",uri="/policytypes/{policyTypeId}/versions/{versionId}"} 3
+ Should Contain ${resp.text} http_server_requests_seconds_count{error="none",exception="none",method="DELETE",outcome="SUCCESS",status="200",uri="/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}/versions/{policyVersion}"} 1
Should Contain ${resp.text} http_server_requests_seconds_sum
Should Contain ${resp.text} http_server_requests_seconds_max
Should Contain ${resp.text} spring_data_repository_invocations_seconds_count
diff --git a/csit/resources/tests/common-library.robot b/csit/resources/tests/common-library.robot
index 30fd32a2..a98b99a7 100644
--- a/csit/resources/tests/common-library.robot
+++ b/csit/resources/tests/common-library.robot
@@ -129,28 +129,6 @@ VerifyTracingWorks
Log Received response from jaeger ${resp.text}
RETURN ${resp}
-VerifyKafkaInTraces
- [Arguments] ${domain} ${service}
- Log Creating session http://${domain}
- ${session}= Create Session jaeger http://${domain}
- ${tags}= Create Dictionary otel.library.name=io.opentelemetry.kafka-clients-2.6 messaging.system=kafka
- ${tags_json}= evaluate json.dumps(${tags}) json
- ${params}= Create Dictionary service=${service} tags=${tags_json} operation=policy-acruntime-participant send lookback=1h limit=10
- ${resp}= GET On Session jaeger /api/traces params=${params} expected_status=200
- Log Received response from jaeger ${resp.text}
- RETURN ${resp}
-
-VerifyHttpInTraces
- [Arguments] ${domain} ${service}
- Log Creating session http://${domain}
- ${session}= Create Session jaeger http://${domain}
- ${tags}= Create Dictionary uri=/v2/compositions/{compositionId}
- ${tags_json}= evaluate json.dumps(${tags}) json
- ${params}= Create Dictionary service=${service} tags=${tags_json} operation=http put /v2/compositions/{compositionId} lookback=1h limit=10
- ${resp}= GET On Session jaeger /api/traces params=${params} expected_status=200
- Log Received response from jaeger ${resp.text}
- RETURN ${resp}
-
QueryPrometheus
[Arguments] ${query}
${params}= Create Dictionary query=${query}
diff --git a/csit/resources/tests/pap-test.robot b/csit/resources/tests/pap-test.robot
index 58a6a049..7ca4e5dd 100644
--- a/csit/resources/tests/pap-test.robot
+++ b/csit/resources/tests/pap-test.robot
@@ -46,11 +46,11 @@ Metrics
[Documentation] Verify policy pap is exporting prometheus metrics
${auth}= PolicyAdminAuth
${resp}= GetMetrics ${POLICY_PAP_IP} ${auth} /policy/pap/v1/
- Should Contain ${resp.text} http_server_requests_seconds_count{error="none",exception="none",method="GET",outcome="SUCCESS",status="200",uri="/healthcheck",}
- Should Contain ${resp.text} http_server_requests_seconds_count{error="none",exception="none",method="GET",outcome="SUCCESS",status="200",uri="/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",}
+ Should Contain ${resp.text} http_server_requests_seconds_count{error="none",exception="none",method="GET",outcome="SUCCESS",status="200",uri="/healthcheck"}
+ Should Contain ${resp.text} http_server_requests_seconds_count{error="none",exception="none",method="GET",outcome="SUCCESS",status="200",uri="/components/healthcheck"} 1
+ Should Contain ${resp.text} spring_data_repository_invocations_seconds_count{exception="None",method="save",repository="PdpGroupRepository",state="SUCCESS"} 1
+ Should Contain ${resp.text} spring_data_repository_invocations_seconds_count{exception="None",method="findByKeyName",repository="PdpGroupRepository",state="SUCCESS"} 1
+ Should Contain ${resp.text} spring_data_repository_invocations_seconds_count{exception="None",method="findAll",repository="PolicyStatusRepository",state="SUCCESS"}
AddPdpGroup
[Documentation] Add a new PdpGroup named 'testGroup' in the policy database
diff --git a/csit/resources/tests/policy-clamp-test.robot b/csit/resources/tests/policy-clamp-test.robot
index f826388d..ea119b01 100644
--- a/csit/resources/tests/policy-clamp-test.robot
+++ b/csit/resources/tests/policy-clamp-test.robot
@@ -554,3 +554,25 @@ MakeGetRequest
${resp}= GET On Session ${name} ${url} headers=${headers}
Log Received response from ${name} {resp.text}
RETURN ${resp}
+
+VerifyKafkaInTraces
+ [Arguments] ${domain} ${service}
+ Log Creating session http://${domain}
+ ${session}= Create Session jaeger http://${domain}
+ ${tags}= Create Dictionary otel.library.name=io.opentelemetry.kafka-clients-2.6 messaging.system=kafka
+ ${tags_json}= evaluate json.dumps(${tags}) json
+ ${params}= Create Dictionary service=${service} tags=${tags_json} operation=policy-acruntime-participant publish lookback=1h limit=10
+ ${resp}= GET On Session jaeger /api/traces params=${params} expected_status=200
+ Log Received response from jaeger ${resp.text}
+ RETURN ${resp}
+
+VerifyHttpInTraces
+ [Arguments] ${domain} ${service}
+ Log Creating session http://${domain}
+ ${session}= Create Session jaeger http://${domain}
+ ${tags}= Create Dictionary uri=/v2/compositions/{compositionId}
+ ${tags_json}= evaluate json.dumps(${tags}) json
+ ${params}= Create Dictionary service=${service} tags=${tags_json} operation=http put /v2/compositions/{compositionId} lookback=1h limit=10
+ ${resp}= GET On Session jaeger /api/traces params=${params} expected_status=200
+ Log Received response from jaeger ${resp.text}
+ RETURN ${resp}