Adding onboarding test case 00/133600/1
authorwaqas.ikram <waqas.ikram@est.tech>
Thu, 9 Mar 2023 12:44:45 +0000 (12:44 +0000)
committerwaqas.ikram <waqas.ikram@est.tech>
Thu, 9 Mar 2023 12:44:47 +0000 (12:44 +0000)
Change-Id: Ia24dad4a4405af695b92fcd963b979f8b0d3827c
Issue-ID: SO-4087
Signed-off-by: waqas.ikram <waqas.ikram@est.tech>
plans/so/integration-cnfm-testing/testplan.txt
tests/so/integration-cnfm-testing/cnf_package_onboarding_tests.robot [new file with mode: 0644]
tests/so/integration-cnfm-testing/data/distributeCnfServiceTemplate.json [new file with mode: 0644]

index 8b06666..ee5397a 100644 (file)
@@ -1,3 +1,4 @@
 # Test suites are relative paths under [integration/csit.git]/tests/.
 # Place the suites in run order.
-so/integration-cnfm-testing/cnf_kind_cluster_registration_tests.robot
\ No newline at end of file
+so/integration-cnfm-testing/cnf_kind_cluster_registration_tests.robot
+so/integration-cnfm-testing/cnf_package_onboarding_tests.robot
\ No newline at end of file
diff --git a/tests/so/integration-cnfm-testing/cnf_package_onboarding_tests.robot b/tests/so/integration-cnfm-testing/cnf_package_onboarding_tests.robot
new file mode 100644 (file)
index 0000000..004d2c2
--- /dev/null
@@ -0,0 +1,17 @@
+*** Settings ***
+Library     Collections
+Library     RequestsLibrary
+Library     OperatingSystem
+
+*** Variables ***
+${BASIC_AUTH}=                     Basic bXNvX2FkbWluOnBhc3N3b3JkMSQ=
+${DISTRIBUTE_SERVICE_TEMPLATE}=    ${CURDIR}${/}data${/}distributeCnfServiceTemplate.json
+${RESOURCE_LOCATION}=              /distribution-test-zip/unzipped/
+*** Test Cases ***
+
+Distribute Service Template Containing ASD
+    Create Session   sdc_controller_session  http://${REPO_IP}:8085
+    ${data}=    Get Binary File     ${DISTRIBUTE_SERVICE_TEMPLATE}
+    &{headers}=  Create Dictionary    Authorization=${BASIC_AUTH}    resource-location=${RESOURCE_LOCATION}    Content-Type=application/json    Accept=application/json
+    ${resp}=    Post On Session    sdc_controller_session    /test/treatNotification/v1    data=${data}    headers=${headers}
+    Should Be Equal As Strings    '${resp.status_code}'    '200'
diff --git a/tests/so/integration-cnfm-testing/data/distributeCnfServiceTemplate.json b/tests/so/integration-cnfm-testing/data/distributeCnfServiceTemplate.json
new file mode 100644 (file)
index 0000000..14b0566
--- /dev/null
@@ -0,0 +1,31 @@
+{
+  "distributionID": "1b64ac59-fd55-484b-993c-2661d26f9808",
+  "serviceName": "ericsson-demo-service-1",
+  "serviceVersion": "1.0",
+  "serviceUUID": "8839a41e-8644-46c0-a08f-206d8b0edff2",
+  "serviceDescription": "ericsson-demo-service-1",
+  "serviceInvariantUUID": "ef54671d-31e4-43e0-86e2-c3ab73c2a5a7",
+  "resources": [{
+    "resourceInstanceName": "ericsson-vsp-cnf-1 0",
+    "resourceName": "ericsson-vsp-cnf-1",
+    "resourceVersion": "1.0",
+    "resoucreType": "VF",
+    "resourceUUID": "f49326bd-b21d-4d21-8d42-ecc6f9753151",
+    "resourceInvariantUUID": "198ab85b-ad8d-42e5-889d-4bdf486dfc91",
+    "resourceCustomizationUUID": "083a388f-a00b-403a-b8a2-a0f3167e94e1",
+    "category": "Generic",
+    "subcategory": "Network Elements",
+    "artifacts": []
+  }],
+  "serviceArtifacts": [{
+    "artifactName": "service-EricssonDemoService1-csar.csar",
+    "artifactType": "TOSCA_CSAR",
+    "artifactURL": "/unzipped_cnf_csar/v1/catalog/services/EricssonDemoService1/1.0/artifacts/service-EricssonDemoService1-csar.csar",
+    "artifactChecksum": "NGZjNGY3YjRkYmNiNmQxMzc2ZWIzYmE2Y2NjZmM0M2Y\u003d",
+    "artifactDescription": "TOSCA definition package of the asset",
+    "artifactTimeout": 0,
+    "artifactUUID": "ae71c138-b9d0-4b37-acb5-99daf5e19efe",
+    "artifactVersion": "1"
+  }],
+  "workloadContext": "Production"
+}