aboutsummaryrefslogtreecommitdiffstats
path: root/tests/dcaegen2-pmmapper
diff options
context:
space:
mode:
authorJoeOLeary <joseph.o.leary@est.tech>2019-02-25 10:14:53 +0000
committerJoeOLeary <joseph.o.leary@est.tech>2019-02-25 10:14:53 +0000
commit4ec2b9dbf832b2c9ed8bc04b9724e37ac3b3d5fa (patch)
treedde13a9dda95885b584c937fc22aa7ec5fc93938 /tests/dcaegen2-pmmapper
parentbfd6f0b721c5b0024bc3446984049d026a801016 (diff)
Add Metadata tests for PM Mapper
Change-Id: I6f0904e1b3e10fd1c9fe41020898380e1fb50141 Issue-ID: INT-863 Signed-off-by: JoeOLeary <joseph.o.leary@est.tech>
Diffstat (limited to 'tests/dcaegen2-pmmapper')
-rw-r--r--tests/dcaegen2-pmmapper/pmmapper/__init__.robot2
-rw-r--r--tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot23
2 files changed, 24 insertions, 1 deletions
diff --git a/tests/dcaegen2-pmmapper/pmmapper/__init__.robot b/tests/dcaegen2-pmmapper/pmmapper/__init__.robot
index 7114fd44..3e4501c2 100644
--- a/tests/dcaegen2-pmmapper/pmmapper/__init__.robot
+++ b/tests/dcaegen2-pmmapper/pmmapper/__init__.robot
@@ -1,2 +1,2 @@
*** Settings ***
-Documentation 5G Bulk PM E2E Testcases
+Documentation PM Mapper Testcases
diff --git a/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot b/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot
index 1e3d9e91..a05defb5 100644
--- a/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot
+++ b/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot
@@ -5,10 +5,15 @@ Library OperatingSystem
Library RequestsLibrary
Library Process
+Test Setup Create Session mapper_session ${PMMAPPER_BASE_URL}
+Test Teardown Delete All Sessions
+
*** Variables ***
${CLI_EXEC_CLI_CONFIG} { head -n 5 | tail -1;} < /tmp/pmmapper.log
${CLI_EXEC_CLI_SUBS} curl -k https://${DR_PROV_IP}:8443/internal/prov
+${PMMAPPER_BASE_URL} http://${PMMAPPER_IP}:8081
+${DELIVERY_ENDPOINT} /delivery
*** Test Cases ***
@@ -28,6 +33,24 @@ Verify 3GPP PM Mapper Subscribes to Data Router
Should Be Equal As Strings ${cli_cmd_output.rc} 0
Should Contain ${cli_cmd_output.stdout} 3gpppmmapper
+Verify 3GPP PM Mapper responds appropriately when no metadata is provided
+ [Tags] PM_MAPPER_10
+ [Documentation] Verify 3GPP PM Mapper responds 400 with the message "Missing Metadata." 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} data='${EMPTY}' headers=${headers}
+ Should Be Equal As Strings ${resp.status_code} 400
+ Should Be Equal As Strings ${resp.content} Missing Metadata.
+
+Verify 3GPP PM Mapper responds appropriately when invalid metadata is provided
+ [Tags] PM_MAPPER_11
+ [Documentation] Verify 3GPP PM Mapper responds 400 with the message "Malformed Metadata." when invalid metadata is provided
+ [Timeout] 1 minute
+ ${headers}= Create Dictionary X-ONAP-RequestID=1 X-ATT-DR-META='not metadata' Content-Type=application/xml
+ ${resp}= Put Request mapper_session ${DELIVERY_ENDPOINT} data='${EMPTY}' headers=${headers}
+ Should Be Equal As Strings ${resp.status_code} 400
+ Should Be Equal As Strings ${resp.content} Malformed Metadata.
+
*** Keywords ***
PostCall