aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorwaqas.ikram <waqas.ikram@est.tech>2023-03-09 12:44:45 +0000
committerwaqas.ikram <waqas.ikram@est.tech>2023-03-09 12:44:47 +0000
commitc638f49099852aa68959846cba1d414d24e404ae (patch)
tree185f185330ced54cf4cb1a1be335fd5a0cf305ae /tests
parent7aff12430db9c19b931880ab8e14660b3ea8694c (diff)
Adding onboarding test case
Change-Id: Ia24dad4a4405af695b92fcd963b979f8b0d3827c Issue-ID: SO-4087 Signed-off-by: waqas.ikram <waqas.ikram@est.tech>
Diffstat (limited to 'tests')
-rw-r--r--tests/so/integration-cnfm-testing/cnf_package_onboarding_tests.robot17
-rw-r--r--tests/so/integration-cnfm-testing/data/distributeCnfServiceTemplate.json31
2 files changed, 48 insertions, 0 deletions
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
index 00000000..004d2c2e
--- /dev/null
+++ b/tests/so/integration-cnfm-testing/cnf_package_onboarding_tests.robot
@@ -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
index 00000000..14b05661
--- /dev/null
+++ b/tests/so/integration-cnfm-testing/data/distributeCnfServiceTemplate.json
@@ -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"
+}