diff options
Diffstat (limited to 'tests')
3 files changed, 26 insertions, 1 deletions
diff --git a/tests/dcaegen2-pmmapper/pmmapper/assets/diff_vendor_metadata.json b/tests/dcaegen2-pmmapper/pmmapper/assets/diff_vendor_metadata.json new file mode 100644 index 00000000..0abf8e3e --- /dev/null +++ b/tests/dcaegen2-pmmapper/pmmapper/assets/diff_vendor_metadata.json @@ -0,0 +1,12 @@ +{ + "productName": "gnb", + "vendorName": "Anon", + "lastEpochMicrosec": "1538478000000", + "sourceName": "oteNB5309", + "startEpochMicrosec": "1538478900000", + "timeZoneOffset": "UTC+05.00", + "location": "ftpes://192.168.0.101:22/ftp/rop/A20161224.1045-1100.bin.gz", + "compression": "gzip", + "fileFormatType": "org.3GPP.32.435#measCollec", + "fileFormatVersion": "V9" + }
\ No newline at end of file diff --git a/tests/dcaegen2-pmmapper/pmmapper/assets/valid_metadata.json b/tests/dcaegen2-pmmapper/pmmapper/assets/valid_metadata.json index 3a2340f2..da809d7b 100644 --- a/tests/dcaegen2-pmmapper/pmmapper/assets/valid_metadata.json +++ b/tests/dcaegen2-pmmapper/pmmapper/assets/valid_metadata.json @@ -1,5 +1,5 @@ { - "productName": "NrRadio", + "productName": "gnb", "vendorName": "Ericsson", "lastEpochMicrosec": "1538478000000", "sourceName": "oteNB5309", 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 *** |