From: Piotr Borelowski 
Date: Thu, 25 Jun 2020 15:05:53 +0000 (+0200)
Subject: Extend the robot tests by a simple SOL002-Adapter test
X-Git-Tag: 7.0.1~82
X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F76%2F109576%2F5;p=integration%2Fcsit.git
Extend the robot tests by a simple SOL002-Adapter test
Issue-ID: INT-1614
Signed-off-by: Piotr Borelowski 
Change-Id: I04a75d92aba9c4c06dc0b384aff141592b79845e
---
diff --git a/tests/so/etsi/data/notification.json b/tests/so/etsi/data/notification.json
new file mode 100644
index 00000000..54bbc09f
--- /dev/null
+++ b/tests/so/etsi/data/notification.json
@@ -0,0 +1,26 @@
+{
+    "id": "3aa49739-aabd-4d40-8c32-b5b97940201b",
+    "notificationType": "VnfLcmOperationOccurrenceNotification",
+    "subscriptionId": null,
+    "timeStamp": null,
+    "notificationStatus": "START",
+    "operationState": "PROCESSING",
+    "vnfInstanceId": "a23c5388-e035-4ca6-a126-662ad8dd8687",
+    "operation": "INSTANTIATE",
+    "isAutomaticInvocation": null,
+    "vnfLcmOpOccId": null,
+    "affectedVnfcs": null,
+    "affectedVirtualLinks": null,
+    "affectedVirtualStorages": null,
+    "changedInfo": null,
+    "changedExtConnectivity": null,
+    "error": null,
+    "_links": {
+        "vnfInstance": {
+            "href": "https://so-vnfm-simulator:9093/vnflcm/v1/vnf_instances/a23c5388-e035-4ca6-a126-662ad8dd8687"
+        },
+        "subscription": null,
+        "vnfLcmOpOcc": null
+    }
+}
+
diff --git a/tests/so/etsi/etsi_tests.robot b/tests/so/etsi/etsi_tests.robot
index 684034b7..49670d96 100644
--- a/tests/so/etsi/etsi_tests.robot
+++ b/tests/so/etsi/etsi_tests.robot
@@ -78,6 +78,15 @@ Invoke VNF Instantiation
     Run Keyword If  '${actual_request_state}' == 'COMPLETE'  log to console   \nexecuted with expected result
     Should Be Equal As Strings    '${actual_request_state}'    'COMPLETE'
 
+Invoke VNF Notification for SOL002
+    Create Session    ve-vnfm-adapter-session    http://${REPO_IP}:9098
+    ${data}=    Get Binary File    ${CURDIR}${/}data${/}notification.json
+    &{headers}=    Create Dictionary    Content-Type=application/json    Accept=application/json    Authorization=Basic YWRtaW46YTRiM2MyZDE=
+    ${notification_request}=    Post Request    ve-vnfm-adapter-session    /lcm/v1/vnf/instances/notifications    data=${data}    headers=${headers}
+    Log To Console    ${notification_request}
+    Run Keyword If    '${notification_request.status_code}' == '200'    Log To Console    \nexecuted with expected result
+    Should Be Equal As Strings    '${notification_request.status_code}'    '200'
+
 Delete VNF Instance
     Run Keyword If      "${vnf_instance_Id}" != "${EMPTY}"      Log to Console    VNF Instance ID :${vnf_instance_Id} received
     ...                ELSE      Fail           Log to Console  Invalid VNF Instance ID :${vnf_instance_Id} recieved