aboutsummaryrefslogtreecommitdiffstats
path: root/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot
diff options
context:
space:
mode:
authorGerard Hickey <gerard.hickey@ericsson.com>2019-03-14 12:41:05 +0000
committerGerard Hickey <gerard.hickey@ericsson.com>2019-03-14 12:48:23 +0000
commit80f8f4636074a60294ec943229edcc5748526921 (patch)
tree4b969eb72f0aa50e9c4d2023409d59cd0539bde5 /tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot
parentf1c9170c2313c2cab51c0c157e663faec86d2070 (diff)
Added test to verify Metdata filtering
Change-Id: I3145c37896270209a7ef499a4b70f7fd1342ba7f Signed-off-by: Gerard Hickey <gerard.hickey@ericsson.com> Issue-ID: INT-863
Diffstat (limited to 'tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot')
-rw-r--r--tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot b/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot
index bc32673d..a9474672 100644
--- a/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot
+++ b/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot
@@ -19,6 +19,7 @@ ${NO_MANAGED_ELEMENT_PATH} %{WORKSPACE}/tests/dcaegen2-pmmapper/pm
${NO_MEASDATA_PATH} %{WORKSPACE}/tests/dcaegen2-pmmapper/pmmapper/assets/no_measdata.xml
${MEASD_RESULT_PATH} %{WORKSPACE}/tests/dcaegen2-pmmapper/pmmapper/assets/meas_result.xml
${VALID_METADATA_PATH} %{WORKSPACE}/tests/dcaegen2-pmmapper/pmmapper/assets/valid_metadata.json
+${DIFF_VENDOR_METADATA} %{WORKSPACE}/tests/dcaegen2-pmmapper/pmmapper/assets/diff_vendor_metadata.json
${CLI_EXEC_CLI_PM_LOG} docker exec pmmapper /bin/sh -c "tail -5 /var/log/ONAP/dcaegen2/services/pm-mapper/pm-mapper_output.log"
${PUBLISH_NODE_URL} https://${DR_NODE_IP}:8443/publish/1/pm.xml
${PM_DATA_FILE_PATH} %{WORKSPACE}/tests/dcaegen2-pmmapper/pmmapper/assets/A20181002.0000-1000-0015-1000_5G.xml
@@ -114,6 +115,18 @@ Verify that PM Mapper throws Event failed validation against schema error when n
CheckLog ${CLI_EXEC_CLI_PM_LOG} XML validation failed
CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=6
+Verify that PM Mapper correctly identifies a file that should not be mapped based on metadata filtering.
+ [Tags] PM_MAPPER_10
+ [Documentation] Verify that PM Mapper correctly identifies a file that should not be mapped based on metadata filtering.
+ [Timeout] 1 minute
+ ${valid_meas_result_content}= Get File ${MEASD_RESULT_PATH}
+ ${diff_vendor_metadata}= Get File ${DIFF_VENDOR_METADATA}
+ ${headers}= Create Dictionary X-ONAP-RequestID=7 Content-Type=application/xml X-DMAAP-DR-PUBLISH-ID=2 X-DMAAP-DR-META=${diff_vendor_metadata.replace("\n","")}
+ ${resp}= Put Request mapper_session ${DELIVERY_ENDPOINT}/filename data=${valid_meas_result_content} headers=${headers}
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} Metadata does not match any filters,
+ CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=7
+
+
*** Keywords ***