Fix test failures in K8s CSIT

Apex-pdp - Add json response files, update sim hostnames
Api,Pap  - Update context paths for prometheus metrics
Print console logs of test execution

Issue-ID: POLICY-4546
Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech>
Change-Id: I1bed6e4077c7e52b986bcb927204819ec0d95d99
diff --git a/helm/tests/api-test.robot b/helm/tests/api-test.robot
index 5970e00..aac05ec 100644
--- a/helm/tests/api-test.robot
+++ b/helm/tests/api-test.robot
@@ -115,17 +115,17 @@
     [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{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
-    Should Contain  ${resp.text}  http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policy/api/v1/policies",} 1.0
-    Should Contain  ${resp.text}  http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policy/api/v1/policies/{policyId}/versions/{policyVersion}",} 1.0
-    Should Contain  ${resp.text}  http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policy/api/v1/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies",} 1.0
-    Should Contain  ${resp.text}  http_server_requests_seconds_count{exception="None",method="POST",outcome="SUCCESS",status="200",uri="/policy/api/v1/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies",} 1.0
-    Should Contain  ${resp.text}  http_server_requests_seconds_count{exception="None",method="POST",outcome="SUCCESS",status="200",uri="/policy/api/v1/policytypes",} 1.0
-    Should Contain  ${resp.text}  http_server_requests_seconds_count{exception="None",method="DELETE",outcome="SUCCESS",status="200",uri="/policy/api/v1/policies/{policyId}/versions/{policyVersion}",} 1.0
-    Should Contain  ${resp.text}  http_server_requests_seconds_count{exception="None",method="DELETE",outcome="SUCCESS",status="200",uri="/policy/api/v1/policytypes/{policyTypeId}/versions/{versionId}",} 3.0
-    Should Contain  ${resp.text}  http_server_requests_seconds_count{exception="None",method="DELETE",outcome="SUCCESS",status="200",uri="/policy/api/v1/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}/versions/{policyVersion}",} 1.0
+    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
+    Should Contain  ${resp.text}  http_server_requests_seconds_count{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{exception="None",method="POST",outcome="SUCCESS",status="200",uri="/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies",} 1.0
+    Should Contain  ${resp.text}  http_server_requests_seconds_count{exception="None",method="POST",outcome="SUCCESS",status="200",uri="/policytypes",} 1.0
+    Should Contain  ${resp.text}  http_server_requests_seconds_count{exception="None",method="DELETE",outcome="SUCCESS",status="200",uri="/policies/{policyId}/versions/{policyVersion}",} 1.0
+    Should Contain  ${resp.text}  http_server_requests_seconds_count{exception="None",method="DELETE",outcome="SUCCESS",status="200",uri="/policytypes/{policyTypeId}/versions/{versionId}",} 3.0
+    Should Contain  ${resp.text}  http_server_requests_seconds_count{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_sum
     Should Contain  ${resp.text}  http_server_requests_seconds_max
     Should Contain  ${resp.text}  spring_data_repository_invocations_seconds_count
diff --git a/helm/tests/data/onap.policies.apex.pnf.Test.json b/helm/tests/data/onap.policies.apex.pnf.Test.json
index 0552293..f73caa6 100644
--- a/helm/tests/data/onap.policies.apex.pnf.Test.json
+++ b/helm/tests/data/onap.policies.apex.pnf.Test.json
@@ -2791,7 +2791,7 @@
                   "carrierTechnology": "RESTREQUESTOR",
                   "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
                   "parameters": {
-                    "url": "http://aai-sim:6666/aai/v16/network/pnfs/pnf/{pnfName}",
+                    "url": "http://message-router:6666/aai/v16/network/pnfs/pnf/{pnfName}",
                     "httpMethod": "GET",
                     "httpCodeFilter": "[2-5][0-1][0-9]",
                     "httpHeaders": [
@@ -2859,7 +2859,7 @@
                   "carrierTechnology": "GRPC",
                   "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.grpc.GrpcCarrierTechnologyParameters",
                   "parameters": {
-                    "host": "grpc-sim",
+                    "host": "message-router",
                     "port": 6680,
                     "username": "ccsdkapps",
                     "password": "ccsdkapps",
diff --git a/helm/tests/data/onap.policies.apex.pnf.metadataSet.Test.json b/helm/tests/data/onap.policies.apex.pnf.metadataSet.Test.json
index 20338ff..9dc425e 100644
--- a/helm/tests/data/onap.policies.apex.pnf.metadataSet.Test.json
+++ b/helm/tests/data/onap.policies.apex.pnf.metadataSet.Test.json
@@ -60,7 +60,7 @@
                   "carrierTechnology": "RESTREQUESTOR",
                   "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
                   "parameters": {
-                    "url": "http://aai-sim:6666/aai/v16/network/pnfs/pnf/{pnfName}",
+                    "url": "http://message-router:6666/aai/v16/network/pnfs/pnf/{pnfName}",
                     "httpMethod": "GET",
                     "httpCodeFilter": "[2-5][0-1][0-9]",
                     "httpHeaders": [
@@ -128,7 +128,7 @@
                   "carrierTechnology": "GRPC",
                   "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.grpc.GrpcCarrierTechnologyParameters",
                   "parameters": {
-                    "host": "grpc-sim",
+                    "host": "message-router",
                     "port": 6680,
                     "username": "ccsdkapps",
                     "password": "ccsdkapps",
diff --git a/helm/tests/data/onap.policies.apex.vnf.Test.json b/helm/tests/data/onap.policies.apex.vnf.Test.json
index 7886f84..4a87011 100644
--- a/helm/tests/data/onap.policies.apex.vnf.Test.json
+++ b/helm/tests/data/onap.policies.apex.vnf.Test.json
@@ -3073,7 +3073,7 @@
                   "carrierTechnology": "RESTREQUESTOR",
                   "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
                   "parameters": {
-                    "url": "http://aai-sim:6666/aai/v16/network/generic-vnfs/generic-vnf?vnf-name={vnf-name}",
+                    "url": "http://message-router:6666/aai/v16/network/generic-vnfs/generic-vnf?vnf-name={vnf-name}",
                     "httpMethod": "GET",
                     "httpCodeFilter": "[245][0-9][0-9]",
                     "httpHeaders": [
@@ -3154,7 +3154,7 @@
                   "carrierTechnology": "GRPC",
                   "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.grpc.GrpcCarrierTechnologyParameters",
                   "parameters": {
-                    "host": "grpc-sim",
+                    "host": "message-router",
                     "port": 6680,
                     "username": "ccsdkapps",
                     "password": "ccsdkapps",
@@ -3174,7 +3174,7 @@
                   "carrierTechnology": "GRPC",
                   "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.grpc.GrpcCarrierTechnologyParameters",
                   "parameters": {
-                    "host": "grpc-sim",
+                    "host": "message-router",
                     "port": 6680,
                     "username": "ccsdkapps",
                     "password": "ccsdkapps",
diff --git a/helm/tests/data/onap.policies.native.apex.Sampledomain.json b/helm/tests/data/onap.policies.native.apex.Sampledomain.json
index d90ae08..3edc9e8 100644
--- a/helm/tests/data/onap.policies.native.apex.Sampledomain.json
+++ b/helm/tests/data/onap.policies.native.apex.Sampledomain.json
@@ -7402,8 +7402,8 @@
                   "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restserver.RestServerCarrierTechnologyParameters",
                   "parameters": {
                     "standalone": true,
-                    "host": "0.0.0.0",
-                    "port": 23324
+                    "host": "policy-apex-pdp",
+                    "port": 6969
                   }
                 },
                 "eventProtocolParameters": {
diff --git a/helm/tests/pap-test.robot b/helm/tests/pap-test.robot
index c8c0301..6bc0c71 100644
--- a/helm/tests/pap-test.robot
+++ b/helm/tests/pap-test.robot
@@ -42,11 +42,11 @@
     [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{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}  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="/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
+    Should Contain  ${resp.text}  spring_data_repository_invocations_seconds_count{exception="None",method="findAll",repository="PolicyStatusRepository",state="SUCCESS",}
 
 Statistics
     [Documentation]  Verify policy pap statistics