aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2018-10-01 16:35:58 +0000
committerGerrit Code Review <gerrit@onap.org>2018-10-01 16:35:58 +0000
commit7b6c8de1c0e2172db475611bfcce7d2df272eaea (patch)
tree6222917731cff4f3e501dc56bb78d238cac56a1a
parent1130f9cfc5842722a523d64ed0b391eb7ad1624d (diff)
parenta2c1ca2f3d6eeddd32753b0742ab32e26ee02fbc (diff)
Merge "Added New Test for File Consumer"
-rw-r--r--plans/usecases/5G-bulkpm/setup.sh6
-rw-r--r--plans/usecases/5G-bulkpm/teardown.sh1
-rw-r--r--tests/usecases/5G-bulkpm/BulkpmE2E.robot43
3 files changed, 32 insertions, 18 deletions
diff --git a/plans/usecases/5G-bulkpm/setup.sh b/plans/usecases/5G-bulkpm/setup.sh
index c35df72f..03943451 100644
--- a/plans/usecases/5G-bulkpm/setup.sh
+++ b/plans/usecases/5G-bulkpm/setup.sh
@@ -6,7 +6,6 @@ source ${SCRIPTS}/common_functions.sh
mkdir -p $WORKSPACE/archives/dmaapmr
cd $WORKSPACE/archives/dmaapmr
git clone --depth 1 http://gerrit.onap.org/r/dmaap/messagerouter/messageservice -b master
-git pull
cd $WORKSPACE/archives/dmaapmr/messageservice/src/main/resources/docker-compose
cp $WORKSPACE/archives/dmaapmr/messageservice/bundleconfig-local/etc/appprops/MsgRtrApi.properties /var/tmp/
@@ -126,6 +125,7 @@ sed -i 's/dmaapmrhost/'${DMAAP_MR_IP}'/g' /tmp/datafile_endpoints.json
sed -i 's/dmaapdrhost/'${DR_PROV_IP}'/g' /tmp/datafile_endpoints.json
docker cp /tmp/datafile_endpoints.json dfc:/config/
docker restart dfc
+docker exec dfc /bin/sh -c "echo '${DR_NODE_IP}' dmaap-dr-node >> /etc/hosts"
# SFTP Configuration:
# Update the File Ready Notification with actual sftp ip address and copy pm files to sftp server.
@@ -138,4 +138,6 @@ docker cp $WORKSPACE/plans/usecases/5G-bulkpm/assets/xNF.pm.xml.gz sftp:/home/ad
curl -v -X POST -H "Content-Type:application/vnd.att-dr.feed" -H "X-ATT-DR-ON-BEHALF-OF:dradmin" --data-ascii @$WORKSPACE/plans/usecases/5G-bulkpm/assets/createFeed.json --post301 --location-trusted -k https://${DR_PROV_IP}:8443
cp $WORKSPACE/plans/usecases/5G-bulkpm/assets/addSubscriber.json /tmp/addSubscriber.json
sed -i 's/fileconsumer/'${DR_SUBSCIBER_IP}'/g' /tmp/addSubscriber.json
-curl -v -X POST -H "Content-Type:application/vnd.att-dr.subscription" -H "X-ATT-DR-ON-BEHALF-OF:dradmin" --data-ascii @/tmp/addSubscriber.json --post301 --location-trusted -k https://${DR_PROV_IP}:8443/subscribe/1ii @/tmp/addSubscriber.json --post301 --location-trusted -k https://${DR_PROV_IP}:8443/subscribe/1 \ No newline at end of file
+curl -v -X POST -H "Content-Type:application/vnd.att-dr.subscription" -H "X-ATT-DR-ON-BEHALF-OF:dradmin" --data-ascii @/tmp/addSubscriber.json --post301 --location-trusted -k https://${DR_PROV_IP}:8443/subscribe/1
+sleep 60
+curl -k https://$DR_PROV_IP:8443/internal/prov \ No newline at end of file
diff --git a/plans/usecases/5G-bulkpm/teardown.sh b/plans/usecases/5G-bulkpm/teardown.sh
index c55f4398..954c5dc0 100644
--- a/plans/usecases/5G-bulkpm/teardown.sh
+++ b/plans/usecases/5G-bulkpm/teardown.sh
@@ -1,5 +1,6 @@
#!/bin/bash
echo "Starting teardown script"
+docker exec dfc /bin/sh -c "cat /opt/log/application.log"
kill-instance.sh $DMAAP
kill-instance.sh $KAFKA
kill-instance.sh $ZOOKEEPER
diff --git a/tests/usecases/5G-bulkpm/BulkpmE2E.robot b/tests/usecases/5G-bulkpm/BulkpmE2E.robot
index 154b5139..ac0cd852 100644
--- a/tests/usecases/5G-bulkpm/BulkpmE2E.robot
+++ b/tests/usecases/5G-bulkpm/BulkpmE2E.robot
@@ -18,6 +18,7 @@ ${TARGETURL_TOPICS} http://${DMAAP_MR_IP}:3904/topics
${TARGETURL_SUBSCR} http://${DMAAP_MR_IP}:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12?timeout=1000
${CLI_EXEC_CLI} curl -k https://${DR_PROV_IP}:8443/internal/prov
${CLI_EXEC_CLI_DFC} docker exec dfc /bin/sh -c "ls /target | grep .gz"
+${CLI_EXEC_CLI_FILECONSUMER} docker exec fileconsumer-node /bin/sh -c "ls /opt/app/subscriber/delivery | grep .gz"
*** Test Cases ***
@@ -27,12 +28,13 @@ Send VES File Ready Event to VES Collector
${evtdata}= Get Event Data From File ${EVENT_DATA_FILE}
${headers}= Create Header From String ${HEADER_STRING}
${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata}
- Sleep 2s
+ Sleep 5s
${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata}
- Sleep 2s
+ Sleep 5s
${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata}
- Sleep 2s
+ Sleep 5s
${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata}
+ Sleep 5s
Log Receive HTTP Status code ${resp.status_code}
Should Be Equal As Strings ${resp.status_code} 202
@@ -51,19 +53,28 @@ Check VES Notification Topic is existing in Message Router
List Should Contain Value ${topics} unauthenticated.VES_NOTIFICATION_OUTPUT
Verify Downloaded PM file from xNF exist on Data File Collector
- [Tags] Bulk_PM_E2E_03
- [Documentation] Check the PM XML file exists on the File Consumer Simulator
- ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_DFC} shell=yes
- Log ${cli_cmd_output.stdout}
- Should Be Equal As Strings ${cli_cmd_output.rc} 0
- Should Contain ${cli_cmd_output.stdout} xNF.pm.xml.gz
+ [Tags] Bulk_PM_E2E_03
+ [Documentation] Check the PM XML file exists on the data file collector
+ ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_DFC} shell=yes
+ Log ${cli_cmd_output.stdout}
+ Should Be Equal As Strings ${cli_cmd_output.rc} 0
+ Should Contain ${cli_cmd_output.stdout} xNF.pm.xml.gz
Verify Default Feed And File Consumer Subscription On Datarouter
- [Tags] Bulk_PM_E2E_04
- [Documentation] Verify Default Feed And File Consumer Subscription On Datarouter
- ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI} shell=yes
- Log ${cli_cmd_output.stdout}
- Should Be Equal As Strings ${cli_cmd_output.rc} 0
- Should Contain ${cli_cmd_output.stdout} https://dmaap-dr-prov/publish/1
- Should Contain ${cli_cmd_output.stdout} http://${DR_SUBSCIBER_IP}:7070 \ No newline at end of file
+ [Tags] Bulk_PM_E2E_04
+ [Documentation] Verify Default Feed And File Consumer Subscription On Datarouter
+ ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI} shell=yes
+ Log ${cli_cmd_output.stdout}
+ Should Be Equal As Strings ${cli_cmd_output.rc} 0
+ Should Contain ${cli_cmd_output.stdout} https://dmaap-dr-prov/publish/1
+ Should Contain ${cli_cmd_output.stdout} http://${DR_SUBSCIBER_IP}:7070
+
+
+Verify Fileconsumer Receive PM file from Data Router
+ [Tags] Bulk_PM_E2E_05
+ [Documentation] Check PM XML file exists on the File Consumer Simulator
+ ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_FILECONSUMER} shell=yes
+ Log ${cli_cmd_output.stdout}
+ Should Be Equal As Strings ${cli_cmd_output.rc} 0
+ Should Contain ${cli_cmd_output.stdout} xNF.pm.xml.gz