Krzysztof Kuzmicki | 1592b08 | 2020-03-27 14:03:43 +0100 | [diff] [blame^] | 1 | *** Settings *** |
| 2 | Documentation This test suite creates csara and signed zip tosca VSP packages, validates them in VNFSDK and SDC |
| 3 | Test Timeout 1m |
| 4 | |
| 5 | Resource ../resources/test_templates/vnfsdk_validation_template.robot |
| 6 | Library String |
| 7 | Test Template Validate Onboarding Package |
| 8 | Default Tags vnfsdk |
| 9 | |
| 10 | |
| 11 | *** Variables *** |
| 12 | @{allMandatoryEntriesDefinedInTOSCAMeta} r146092 |
| 13 | @{no_pnfd_release_date_time_error} r57019 |
| 14 | @{non_mano_artifact_sets_is_mandatory} r146092 |
| 15 | @{noETSI-Entry-ManifestOrETSI-Entry-Change-Log} r293901 |
| 16 | @{PNFD_missing} SOL004 r10087 r87234 r35854 r15837 r17852 r293901 r146092 r57019 r787965 |
| 17 | @{allMandatoryEntriesDefinedInTOSCAMeta_sdc_message} Following entry not supported in TOSCA.meta Entry-Tests=Artifacts/Tests Manifest contains invalid line : #The manifest file shall include a list of all files contained in or referenced from the VNF package with their location |
| 18 | @{no_pnfd_release_date_time_error_sdc_message} Following entry not supported in TOSCA.meta Entry-Tests=Artifacts/Tests Manifest contains invalid line : #The manifest file shall include a list of all files contained in or referenced from the VNF package with their location |
| 19 | @{non_mano_artifact_sets_is_mandatory_sdc_message} Following entry not supported in TOSCA.meta Entry-Tests=Artifacts/Tests Manifest contains invalid line : #The manifest file shall include a list of all files contained in or referenced from the VNF package with their location |
| 20 | @{noETSI-Entry-ManifestOrETSI-Entry-Change-Log_sdc_message} Manifest contains invalid line : #The manifest file shall include a list of all files contained in or referenced from the VNF package with their location |
| 21 | @{PNFD_missing_sdc_message} TOSCA.meta file in TOSCA-metadata directory missing entry Created-By |
| 22 | @{invalid_certificate} Could not verify signature! |
| 23 | |
| 24 | |
| 25 | *** Test Cases *** |
| 26 | Validate Onboarding allMandatoryEntriesDefinedInTOSCAMeta |
| 27 | [Documentation] |
| 28 | ... This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/allMandatoryEntriesDefinedInTOSCAMeta |
| 29 | ... Imports it as csar VSP package to SDC and comapres with list of expected errors. |
| 30 | ... Runs VNFSDK validation and comapres with list of expected errors. |
| 31 | allMandatoryEntriesDefinedInTOSCAMeta failed_vnfreqNames=@{allMandatoryEntriesDefinedInTOSCAMeta} sdc_response=@{allMandatoryEntriesDefinedInTOSCAMeta_sdc_message} |
| 32 | |
| 33 | Validate Onboarding non_mano_artifact_sets_is_mandatory |
| 34 | [Documentation] |
| 35 | ... This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/non_mano_artifact_sets_is_mandatory |
| 36 | ... Imports it as csar VSP package to SDC and comapres with list of expected errors. |
| 37 | ... Runs VNFSDK validation and comapres with list of expected errors. |
| 38 | non_mano_artifact_sets_is_mandatory failed_vnfreqNames=@{non_mano_artifact_sets_is_mandatory} sdc_response=@{non_mano_artifact_sets_is_mandatory_sdc_message} |
| 39 | |
| 40 | Validate Onboarding no_pnfd_release_date_time_error |
| 41 | [Documentation] |
| 42 | ... This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/no_pnfd_release_date_time_error |
| 43 | ... Imports it as csar VSP package to SDC and comapres with list of expected errors. |
| 44 | ... Runs VNFSDK validation and comapres with list of expected errors. |
| 45 | no_pnfd_release_date_time_error failed_vnfreqNames=@{no_pnfd_release_date_time_error} sdc_response=@{no_pnfd_release_date_time_error_sdc_message} |
| 46 | |
| 47 | Validate Onboarding noETSI-Entry-ManifestOrETSI-Entry-Change-Log |
| 48 | [Documentation] |
| 49 | ... This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/noETSI-Entry-ManifestOrETSI-Entry-Change-Log |
| 50 | ... Imports it as csar VSP package to SDC and comapres with list of expected errors. |
| 51 | ... Runs VNFSDK validation and comapres with list of expected errors. |
| 52 | noETSI-Entry-ManifestOrETSI-Entry-Change-Log failed_vnfreqNames=@{noETSI-Entry-ManifestOrETSI-Entry-Change-Log} sdc_response=@{noETSI-Entry-ManifestOrETSI-Entry-Change-Log_sdc_message} |
| 53 | |
| 54 | Validate Onboarding PNFD_missing |
| 55 | [Documentation] |
| 56 | ... This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/PNFD_missing |
| 57 | ... Imports it as csar VSP package to SDC and comapres with list of expected errors. |
| 58 | ... Runs VNFSDK validation and comapres with list of expected errors. |
| 59 | PNFD_missing failed_vnfreqNames=@{PNFD_missing} sdc_response=@{PNFD_missing_sdc_message} |
| 60 | |
| 61 | Validate Onboarding test_SDC_and_VNFSDK_API |
| 62 | [Documentation] |
| 63 | ... This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/test_SDC_and_VNFSDK_API |
| 64 | ... Imports it as csar VSP package to SDC and expects success. |
| 65 | ... Runs VNFSDK validation and and expects success. |
| 66 | test_SDC_and_VNFSDK_API negative_test_case=FALSE |
| 67 | |
| 68 | Validate Onboarding test_SDC_and_VNFSDK_API, secured csar, CMS only, valid certificate |
| 69 | [Documentation] |
| 70 | ... This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/test_SDC_and_VNFSDK_API |
| 71 | ... Next sign with certificate that is imported to SDC onabarding POD using CMS only method (CMS file signs csar, zip contains only csar and cms files ) |
| 72 | ... Imports it as zip VSP package to SDC and expects success. |
| 73 | ... Runs VNFSDK validation and and expects success. |
| 74 | test_SDC_and_VNFSDK_API secured_package=TRUE negative_test_case=FALSE secure_type=CMS sdc_cert=sdc-valid |
| 75 | |
| 76 | Validate Onboarding test_SDC_and_VNFSDK_API, secured csar, CMS and CERT, valid certificate |
| 77 | [Documentation] |
| 78 | ... This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/test_SDC_and_VNFSDK_API |
| 79 | ... Next sign with certificate that is imported to SDC onabarding POD using CMS and CERT method (CMS file signs csar, zip contains csar, certificate and cms files ) |
| 80 | ... Imports it as zip VSP package to SDC and expects success. |
| 81 | ... Runs VNFSDK validation and and expects success. |
| 82 | test_SDC_and_VNFSDK_API secured_package=TRUE negative_test_case=FALSE secure_type=CMS_AND_CERT sdc_cert=sdc-valid |
| 83 | |
| 84 | Validate Onboarding test_SDC_and_VNFSDK_API secured csar, CMS only, invalid certificate |
| 85 | [Documentation] |
| 86 | ... This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/test_SDC_and_VNFSDK_API |
| 87 | ... Next sign with certificate that is not imported to SDC onabarding POD using CMS only method (CMS file signs csar, zip contains only csar and cms files ) |
| 88 | ... Imports it as zip VSP package to SDC and expects error due to issues with certificate validation. |
| 89 | ... Runs VNFSDK validation and and expects success. |
| 90 | test_SDC_and_VNFSDK_API secured_package=TRUE negative_test_case=FALSE sdc_response=@{invalid_certificate} secure_type=CMS sdc_cert=sdc-invalid |
| 91 | |
| 92 | Validate Onboarding test_SDC_and_VNFSDK_API secured csar, CMS and CERT, invalid certificate |
| 93 | [Documentation] |
| 94 | ... This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/test_SDC_and_VNFSDK_API |
| 95 | ... Next sign with certificate that is not imported to SDC onabarding POD using CMS and CERT method (CMS file signs csar, zip contains csar, certificate and cms files ) |
| 96 | ... Imports it as zip VSP package to SDC and expects error due to issues with certificate validation. |
| 97 | ... Runs VNFSDK validation and and expects success |
| 98 | test_SDC_and_VNFSDK_API secured_package=TRUE negative_test_case=FALSE sdc_response=@{invalid_certificate} secure_type=CMS_AND_CERT sdc_cert=sdc-invalid |
| 99 | |