aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-e2e.yml2
-rw-r--r--tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot69
-rw-r--r--tests/dcaegen2/prh-testcases/resources/.env3
-rw-r--r--tests/dcaegen2/prh-testcases/resources/consul.d/cbs.json10
-rw-r--r--tests/dcaegen2/prh-testcases/resources/docker-compose.yml54
-rw-r--r--tests/policy/xacml-pdp/xacml-pdp-test.robot8
6 files changed, 106 insertions, 40 deletions
diff --git a/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-e2e.yml b/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-e2e.yml
index 9c8805b7..bf02465b 100644
--- a/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-e2e.yml
+++ b/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-e2e.yml
@@ -62,7 +62,7 @@ services:
buscontroller:
container_name: buscontroller
- image: nexus3.onap.org:10001/onap/dmaap/buscontroller
+ image: nexus3.onap.org:10001/onap/dmaap/dmaap-bc:1.1.1
ports:
- "18080:8080"
- "18443:8443"
diff --git a/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot b/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot
index d33fcb02..bc32673d 100644
--- a/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot
+++ b/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot
@@ -30,25 +30,21 @@ ${PUBLISH_CONTENT_TYPE} application/octet-stream
Verify PM Mapper Receive Configuraton From Config Binding Service
[Tags] PM_MAPPER_01
[Documentation] Verify 3gpp pm mapper successfully receive config data from CBS
- ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_CONFIG} shell=yes
- Log ${cli_cmd_output.stdout}
- Should Be Equal As Strings ${cli_cmd_output.rc} 0
- Should Contain ${cli_cmd_output.stdout} Received pm-mapper configuration
+ CheckLog ${CLI_EXEC_CLI_CONFIG} Received pm-mapper configuration
Verify 3GPP PM Mapper Subscribes to Data Router
[Tags] PM_MAPPER_02
[Documentation] Verify 3gpp pm mapper subscribes to data router
- ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_SUBS} shell=yes
- Log ${cli_cmd_output.stdout}
- Should Be Equal As Strings ${cli_cmd_output.rc} 0
- Should Contain ${cli_cmd_output.stdout} 3gpppmmapper
+ CheckLog ${CLI_EXEC_CLI_SUBS} 3gpppmmapper
+ CheckLog ${CLI_EXEC_CLI_SUBS} "privilegedSubscriber":true
+
Verify Health Check returns 200 when a REST GET request to healthcheck url
[Tags] PM_MAPPER_03
[Documentation] Verify Health Check returns 200 when a REST GET request to healthcheck url
[Timeout] 1 minute
${resp}= Get Request mapper_session ${HEALTHCHECK_ENDPOINT}
- Should Be Equal As Strings ${resp.status_code} 200
+ VerifyResponse ${resp.status_code} 200
Verify 3GPP PM Mapper responds appropriately when no metadata is provided
[Tags] PM_MAPPER_04
@@ -56,8 +52,9 @@ Verify 3GPP PM Mapper responds appropriately when no metadata is provided
[Timeout] 1 minute
${headers}= Create Dictionary X-ONAP-RequestID=1 Content-Type=application/xml
${resp}= Put Request mapper_session ${DELIVERY_ENDPOINT}/filename data='${EMPTY}' headers=${headers}
- Should Be Equal As Strings ${resp.status_code} 400
- Should Be Equal As Strings ${resp.content} Missing Metadata.
+ VerifyResponse ${resp.status_code} 400
+ VerifyResponse ${resp.content} Missing Metadata.
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=1
Verify 3GPP PM Mapper responds appropriately when invalid metadata is provided
[Tags] PM_MAPPER_05
@@ -65,8 +62,9 @@ Verify 3GPP PM Mapper responds appropriately when invalid metadata is provided
[Timeout] 1 minute
${headers}= Create Dictionary X-ONAP-RequestID=2 X-DMAAP-DR-META='not metadata' Content-Type=application/xml
${resp}= Put Request mapper_session ${DELIVERY_ENDPOINT}/filename data='${EMPTY}' headers=${headers}
- Should Be Equal As Strings ${resp.status_code} 400
- Should Be Equal As Strings ${resp.content} Malformed Metadata.
+ VerifyResponse ${resp.status_code} 400
+ VerifyResponse ${resp.content} Malformed Metadata.
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=2
Verify 3GPP PM Mapper received pushed PM data from Data Router
[Tags] PM_MAPPER_06
@@ -75,13 +73,10 @@ Verify 3GPP PM Mapper received pushed PM data from Data Router
${PM_DATA}= Get File ${PM_DATA_FILE_PATH}
${valid_metatdata} Get File ${VALID_METADATA_PATH}
${resp}= PutCall ${PUBLISH_NODE_URL} 3 ${PM_DATA} ${PUBLISH_CONTENT_TYPE} ${valid_metatdata.replace("\n","")} pmmapper
- Log ${resp.text}
- Should Be Equal As Strings ${resp.status_code} 204
+ VerifyResponse ${resp.status_code} 204
Sleep 10s
- ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_PM_LOG} shell=yes
- Log ${cli_cmd_output.stdout}
- Should Be Equal As Strings ${cli_cmd_output.rc} 0
- Should Contain ${cli_cmd_output.stdout} XML validation successful
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} XML validation successful
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=3
Verify that PM Mapper logs successful when a file that contains measdata is provided
[Tags] PM_MAPPER_07
@@ -91,11 +86,9 @@ Verify that PM Mapper logs successful when a file that contains measdata is prov
${valid_metatdata} Get File ${VALID_METADATA_PATH}
${headers}= Create Dictionary X-ONAP-RequestID=4 Content-Type=application/xml X-DMAAP-DR-PUBLISH-ID=4 X-DMAAP-DR-META=${valid_metatdata.replace("\n","")}
${resp}= Put Request mapper_session ${DELIVERY_ENDPOINT}/filename data=${valid_meas_result_content} headers=${headers}
- Should Be Equal As Strings ${resp.status_code} 200
- ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_PM_LOG} shell=yes
- Log ${cli_cmd_output.stdout}
- Should Be Equal As Strings ${cli_cmd_output.rc} 0
- Should Contain ${cli_cmd_output.stdout} XML validation successful
+ VerifyResponse ${resp.status_code} 200
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} XML validation successful
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=4
Verify that PM Mapper logs successful when a file that contains no measdata is provided
[Tags] PM_MAPPER_08
@@ -105,11 +98,9 @@ Verify that PM Mapper logs successful when a file that contains no measdata is p
${valid_metatdata} Get File ${VALID_METADATA_PATH}
${headers}= Create Dictionary X-ONAP-RequestID=5 Content-Type=application/xml X-DMAAP-DR-PUBLISH-ID=3 X-DMAAP-DR-META=${valid_metatdata.replace("\n","")}
${resp}= Put Request mapper_session ${DELIVERY_ENDPOINT}/filename data=${valid_no_measdata_content} headers=${headers}
- Should Be Equal As Strings ${resp.status_code} 200
- ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_PM_LOG} shell=yes
- Log ${cli_cmd_output.stdout}
- Should Be Equal As Strings ${cli_cmd_output.rc} 0
- Should Contain ${cli_cmd_output.stdout} XML validation successful
+ VerifyResponse ${resp.status_code} 200
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} XML validation successful
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=5
Verify that PM Mapper throws Event failed validation against schema error when no managed element content is provided
[Tags] PM_MAPPER_09
@@ -119,11 +110,9 @@ Verify that PM Mapper throws Event failed validation against schema error when n
${valid_metatdata} Get File ${VALID_METADATA_PATH}
${headers}= Create Dictionary X-ONAP-RequestID=6 Content-Type=application/xml X-DMAAP-DR-PUBLISH-ID=2 X-DMAAP-DR-META=${valid_metatdata.replace("\n","")}
${resp}= Put Request mapper_session ${DELIVERY_ENDPOINT}/filename data=${no_managed_element_content} headers=${headers}
- Should Be Equal As Strings ${resp.status_code} 200
- ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_PM_LOG} shell=yes
- Log ${cli_cmd_output.stdout}
- Should Be Equal As Strings ${cli_cmd_output.rc} 0
- Should Contain ${cli_cmd_output.stdout} XML validation failed
+ VerifyResponse ${resp.status_code} 200
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} XML validation failed
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=6
*** Keywords ***
@@ -139,3 +128,15 @@ PutCall
${headers}= Create Dictionary X-ONAP-RequestID=${request_id} X-DMAAP-DR-META=${meta} Content-Type=${content_type} X-DMAAP-DR-ON-BEHALF-OF=${user} Authorization=Basic cG1tYXBwZXI6cG1tYXBwZXI=
${resp}= Evaluate requests.put('${url}', data="""${data}""", headers=${headers}, verify=False, allow_redirects=False) requests
[Return] ${resp}
+
+
+CheckLog
+ [Arguments] ${cli_exec_log_Path} ${string_to_check_in_log}
+ ${cli_cmd_output}= Run Process ${cli_exec_log_Path} shell=yes
+ Log ${cli_cmd_output.stdout}
+ Should Be Equal As Strings ${cli_cmd_output.rc} 0
+ Should Contain ${cli_cmd_output.stdout} ${string_to_check_in_log}
+
+VerifyResponse
+ [Arguments] ${actual_response_value} ${expected_response_value}
+ Should Be Equal As Strings ${actual_response_value} ${expected_response_value} \ No newline at end of file
diff --git a/tests/dcaegen2/prh-testcases/resources/.env b/tests/dcaegen2/prh-testcases/resources/.env
index 889f7d41..a558a2e8 100644
--- a/tests/dcaegen2/prh-testcases/resources/.env
+++ b/tests/dcaegen2/prh-testcases/resources/.env
@@ -1,2 +1,5 @@
LOG_LEVEL=INFO
PRH_LOG_LEVEL=TRACE
+HOSTNAME=dcae-prh
+CONSUL_HOST=consul
+CONFIG_BINDING_SERVICE=cbs
diff --git a/tests/dcaegen2/prh-testcases/resources/consul.d/cbs.json b/tests/dcaegen2/prh-testcases/resources/consul.d/cbs.json
new file mode 100644
index 00000000..9d1b34f9
--- /dev/null
+++ b/tests/dcaegen2/prh-testcases/resources/consul.d/cbs.json
@@ -0,0 +1,10 @@
+{
+ "service": {
+ "name": "cbs",
+ "tags": [
+ "cbs"
+ ],
+ "port": 10000,
+ "address": "cbs"
+ }
+}
diff --git a/tests/dcaegen2/prh-testcases/resources/docker-compose.yml b/tests/dcaegen2/prh-testcases/resources/docker-compose.yml
index 92d62526..8b6ea128 100644
--- a/tests/dcaegen2/prh-testcases/resources/docker-compose.yml
+++ b/tests/dcaegen2/prh-testcases/resources/docker-compose.yml
@@ -1,4 +1,4 @@
-version: '3'
+version: "3"
services:
prh:
image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.prh.prh-app-server:latest
@@ -13,8 +13,12 @@ services:
ports:
- "8100:8100"
- "8433:8433"
+ environment:
+ - LOG_LEVEL
+ - PRH_LOG_LEVEL
container_name: prh
depends_on:
+ - cbs
- dmaap-bc
- aai
@@ -41,8 +45,15 @@ services:
- "8533:8433"
volumes:
- ./simulator/certs:/tmp/certs
+ environment:
+ - LOG_LEVEL
+ - PRH_LOG_LEVEL
+ - HOSTNAME
+ - CONSUL_HOST
+ - CONFIG_BINDING_SERVICE
container_name: ssl_prh
depends_on:
+ - cbs
- dmaap-bc
- aai
@@ -65,3 +76,44 @@ services:
- "3334:3334"
- "3335:3335"
container_name: aai_simulator
+
+ consul:
+ image: docker.io/consul:1.0.6
+ ports:
+ - "8500:8500"
+ command: ["agent", "-bootstrap", "-client=0.0.0.0", "-server", "-config-dir=/consul/consul.d"]
+ volumes:
+ - ./consul.d/:/consul/consul.d
+
+ consul-cfg:
+ image: docker.io/consul:1.0.6
+ restart: on-failure
+ command: ["kv", "put", "-http-addr=http://consul-server:8500", "dcae-prh", '{
+ "dmaap.dmaapConsumerConfiguration.dmaapHostName":"dmaap-bc",
+ "dmaap.dmaapConsumerConfiguration.dmaapPortNumber":2223,
+ "dmaap.dmaapConsumerConfiguration.dmaapProtocol":"https",
+ "dmaap.dmaapProducerConfiguration.dmaapHostName":"dmaap-bc",
+ "dmaap.dmaapProducerConfiguration.dmaapPortNumber":2223,
+ "dmaap.dmaapProducerConfiguration.dmaapProtocol":"https",
+ "aai.aaiClientConfiguration.aaiHostPortNumber":3334,
+ "aai.aaiClientConfiguration.aaiHost":"aai",
+ "aai.aaiClientConfiguration.aaiProtocol":"https",
+ "security.enableAaiCertAuth":"true",
+ "security.enableDmaapCertAuth":"true",
+ "security.keyStorePath":"/tmp/certs/org.onap.dcae.jks",
+ "security.keyStorePasswordPath":"/tmp/certs/keystore.password",
+ "security.trustStorePath":"/tmp/certs/org.onap.dcae.trust.jks",
+ "security.trustStorePasswordPath":"/tmp/certs/truststore.password"
+ }'
+ ]
+ depends_on:
+ - consul
+
+ cbs:
+ image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding.app-app:2.2.4
+ ports:
+ - "10000:10000"
+ environment:
+ - CONSUL_HOST
+ depends_on:
+ - consul-cfg
diff --git a/tests/policy/xacml-pdp/xacml-pdp-test.robot b/tests/policy/xacml-pdp/xacml-pdp-test.robot
index 075e545d..1a626c03 100644
--- a/tests/policy/xacml-pdp/xacml-pdp-test.robot
+++ b/tests/policy/xacml-pdp/xacml-pdp-test.robot
@@ -8,8 +8,8 @@ Library json
Healthcheck
[Documentation] Runs Policy Xacml PDP Health check
${auth}= Create List healthcheck zb!XztG34
- Log Creating session http://${POLICY_PDPX_IP}:6969
- ${session}= Create Session policy http://${POLICY_PDPX_IP}:6969 auth=${auth}
+ Log Creating session https://${POLICY_PDPX_IP}:6969
+ ${session}= Create Session policy https://${POLICY_PDPX_IP}:6969 auth=${auth}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
${resp}= Get Request policy /policy/pdpx/v1/healthcheck headers=${headers}
Log Received response from policy ${resp.text}
@@ -19,8 +19,8 @@ Healthcheck
Statistics
[Documentation] Runs Policy Xacml PDP Statistics
${auth}= Create List healthcheck zb!XztG34
- Log Creating session http://${POLICY_PDPX_IP}:6969
- ${session}= Create Session policy http://${POLICY_PDPX_IP}:6969 auth=${auth}
+ Log Creating session https://${POLICY_PDPX_IP}:6969
+ ${session}= Create Session policy https://${POLICY_PDPX_IP}:6969 auth=${auth}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
${resp}= Get Request policy /policy/pdpx/v1/statistics headers=${headers}
Log Received response from policy ${resp.text}