diff options
author | Morgan Richomme <morgan.richomme@orange.com> | 2021-02-04 14:33:31 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2021-02-04 14:33:31 +0000 |
commit | dfd96a24c58cd536862f2cffd220e3bc9bd25d28 (patch) | |
tree | dc62996eb103133952d3503d7bb9111a43f1849d | |
parent | 915128ff86d1c5046650ea75434b627d1f86ac25 (diff) | |
parent | 08ade1a49f2689b58ad5a1aa5004c60c69646b3f (diff) |
Merge "Add Test for VNF Package Management - Artifacts"
-rw-r--r-- | tests/so/etsi/data/responses/expectedArtifacts/image | 1 | ||||
-rw-r--r-- | tests/so/etsi/etsi_vnf_package_management_tests.robot | 18 |
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/so/etsi/data/responses/expectedArtifacts/image b/tests/so/etsi/data/responses/expectedArtifacts/image new file mode 100644 index 00000000..f31d15df --- /dev/null +++ b/tests/so/etsi/data/responses/expectedArtifacts/image @@ -0,0 +1 @@ +ubuntu_16.04 diff --git a/tests/so/etsi/etsi_vnf_package_management_tests.robot b/tests/so/etsi/etsi_vnf_package_management_tests.robot index 11041c1d..b7cd337f 100644 --- a/tests/so/etsi/etsi_vnf_package_management_tests.robot +++ b/tests/so/etsi/etsi_vnf_package_management_tests.robot @@ -99,6 +99,24 @@ Get VNF Package VNFD Remove Directory ${TEMPDIR}${/}${TEST_DIR} recursive=True Log To Console \nexecuted with expected result +Get A VNF Package Artifact + ${artifactPath}= Convert To String image + Create Session so_vnfm_adapter_session http://${REPO_IP}:9092 + &{headers}= Create Dictionary Authorization=${BASIC_AUTH} Content-Type=application/json Accept=application/octet-stream + Log to Console \nGetting ${artifactPath} artifact from Vnf Package with id ${vnf_package_id} from so-vnfm-adapter + ${response}= Get On Session so_vnfm_adapter_session ${PACKAGE_MANAGEMENT_BASE_URL}/vnf_packages/${vnf_package_id}/artifacts/${artifactPath} headers=${headers} + Log To Console Response:${response} + Run Keyword If '${response.status_code}' == '200' Log To Console \nexecuted with expected result + Should Be Equal As Strings '${response.status_code}' '200' + Create Directory ${TEMPDIR}${/}${TEST_DIR} + Empty Directory ${TEMPDIR}${/}${TEST_DIR} + Create Binary File ${TEMPDIR}${/}${TEST_DIR}${/}${artifactPath} ${response.content} + ${expectedArtifact}= Get Binary File ${CURDIR}${/}data${/}responses${/}expectedArtifacts${/}${artifactPath} + ${actualArtifact}= Get Binary File ${TEMPDIR}${/}${TEST_DIR}${/}${artifactPath} + Should Be Equal As Strings ${expectedArtifact} ${actualArtifact} + Remove Directory ${TEMPDIR}${/}${TEST_DIR} recursive=True + Log To Console \nexecuted with expected result + *** Keywords *** Should Be Equal File Size [Arguments] ${file1} ${file2} |