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 |
Krzysztof Kuzmicki | ae8615f | 2020-05-29 12:35:06 +0200 | [diff] [blame] | 8 | Default Tags vnfsdk pnf_preonboarding_onboarding |
Krzysztof Kuzmicki | 1592b08 | 2020-03-27 14:03:43 +0100 | [diff] [blame] | 9 | |
| 10 | |
| 11 | *** Variables *** |
Krzysztof Kuzmicki | 497430e | 2020-11-02 16:48:38 +0100 | [diff] [blame] | 12 | @{allMandatoryEntriesDefinedInTOSCAMeta} r146092 r816745 r01123 |
| 13 | @{no_pnfd_release_date_time_error} r57019 r01123 r816745 |
| 14 | @{non_mano_artifact_sets_is_mandatory} r146092 r01123 |
| 15 | @{noETSI-Entry-ManifestOrETSI-Entry-Change-Log} r293901 r01123 r130206 |
| 16 | @{PNFD_missing} SOL004 r10087 r87234 r35854 r15837 r17852 r293901 r146092 r57019 r787965 r972082 r01123 r130206 r816745 |
Krzysztof Kuzmicki | ad59044 | 2020-05-07 13:22:54 +0200 | [diff] [blame] | 17 | @{missing_entry_in_manifest} |
Krzysztof Kuzmicki | 497430e | 2020-11-02 16:48:38 +0100 | [diff] [blame] | 18 | @{allMandatoryEntriesDefinedInTOSCAMeta_sdc_message} Manifest contains invalid line: 7: #The manifest file shall include a list of all files contained in or referenced from the VNF package with their location |
| 19 | @{no_pnfd_release_date_time_error_sdc_message} Invalid Manifest metadata entry: '#The manifest file shall include a list of all files contained in or referenced from the VNF package with their location'.;\nAt line 6: '#The manifest file shall include a list of all files contained in or referenced from the VNF package with their location'. |
| 20 | @{non_mano_artifact_sets_is_mandatory_sdc_message} Manifest contains invalid line: 7: #The manifest file shall include a list of all files contained in or referenced from the VNF package with their location |
Krzysztof Kuzmicki | ad59044 | 2020-05-07 13:22:54 +0200 | [diff] [blame] | 21 | @{noETSI-Entry-ManifestOrETSI-Entry-Change-Log_sdc_message} Manifest contains invalid line: 7: #The manifest file shall include a list of all files contained in or referenced from the VNF package with their location Manifest contains invalid line: 7: #The manifest file shall include a list of all files contained in or referenced from the VNF package with their location |
Krzysztof Kuzmicki | 1592b08 | 2020-03-27 14:03:43 +0100 | [diff] [blame] | 22 | @{PNFD_missing_sdc_message} TOSCA.meta file in TOSCA-metadata directory missing entry Created-By |
| 23 | @{invalid_certificate} Could not verify signature! |
Krzysztof Kuzmicki | ad59044 | 2020-05-07 13:22:54 +0200 | [diff] [blame] | 24 | @{missing_entry_in_manifest_sdc_message} 'pnf_main_descriptor.cert' artifact is not being referenced in manifest file |
Krzysztof Kuzmicki | 1592b08 | 2020-03-27 14:03:43 +0100 | [diff] [blame] | 25 | |
| 26 | |
| 27 | *** Test Cases *** |
| 28 | Validate Onboarding allMandatoryEntriesDefinedInTOSCAMeta |
| 29 | [Documentation] |
| 30 | ... This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/allMandatoryEntriesDefinedInTOSCAMeta |
| 31 | ... Imports it as csar VSP package to SDC and comapres with list of expected errors. |
| 32 | ... Runs VNFSDK validation and comapres with list of expected errors. |
Krzysztof Kuzmicki | 73c5591 | 2020-05-22 09:33:51 +0200 | [diff] [blame] | 33 | ... Expected failed requirements from VNFSDK @{allMandatoryEntriesDefinedInTOSCAMeta} |
| 34 | ... Expected errors from SDC Onboarding @{allMandatoryEntriesDefinedInTOSCAMeta_sdc_message} |
Krzysztof Kuzmicki | 1592b08 | 2020-03-27 14:03:43 +0100 | [diff] [blame] | 35 | allMandatoryEntriesDefinedInTOSCAMeta failed_vnfreqNames=@{allMandatoryEntriesDefinedInTOSCAMeta} sdc_response=@{allMandatoryEntriesDefinedInTOSCAMeta_sdc_message} |
| 36 | |
| 37 | Validate Onboarding non_mano_artifact_sets_is_mandatory |
| 38 | [Documentation] |
| 39 | ... This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/non_mano_artifact_sets_is_mandatory |
| 40 | ... Imports it as csar VSP package to SDC and comapres with list of expected errors. |
| 41 | ... Runs VNFSDK validation and comapres with list of expected errors. |
Krzysztof Kuzmicki | 73c5591 | 2020-05-22 09:33:51 +0200 | [diff] [blame] | 42 | ... Expected failed requirements from VNFSDK @{non_mano_artifact_sets_is_mandatory} |
| 43 | ... Expected errors from SDC Onboarding @{non_mano_artifact_sets_is_mandatory_sdc_message} |
Krzysztof Kuzmicki | 1592b08 | 2020-03-27 14:03:43 +0100 | [diff] [blame] | 44 | non_mano_artifact_sets_is_mandatory failed_vnfreqNames=@{non_mano_artifact_sets_is_mandatory} sdc_response=@{non_mano_artifact_sets_is_mandatory_sdc_message} |
| 45 | |
| 46 | Validate Onboarding no_pnfd_release_date_time_error |
| 47 | [Documentation] |
| 48 | ... This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/no_pnfd_release_date_time_error |
| 49 | ... Imports it as csar VSP package to SDC and comapres with list of expected errors. |
| 50 | ... Runs VNFSDK validation and comapres with list of expected errors. |
Krzysztof Kuzmicki | 73c5591 | 2020-05-22 09:33:51 +0200 | [diff] [blame] | 51 | ... Expected failed requirements from VNFSDK @{no_pnfd_release_date_time_error} |
| 52 | ... Expected errors from SDC Onboarding @{no_pnfd_release_date_time_error_sdc_message} |
Krzysztof Kuzmicki | 1592b08 | 2020-03-27 14:03:43 +0100 | [diff] [blame] | 53 | no_pnfd_release_date_time_error failed_vnfreqNames=@{no_pnfd_release_date_time_error} sdc_response=@{no_pnfd_release_date_time_error_sdc_message} |
| 54 | |
| 55 | Validate Onboarding noETSI-Entry-ManifestOrETSI-Entry-Change-Log |
| 56 | [Documentation] |
| 57 | ... This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/noETSI-Entry-ManifestOrETSI-Entry-Change-Log |
| 58 | ... Imports it as csar VSP package to SDC and comapres with list of expected errors. |
| 59 | ... Runs VNFSDK validation and comapres with list of expected errors. |
Krzysztof Kuzmicki | 73c5591 | 2020-05-22 09:33:51 +0200 | [diff] [blame] | 60 | ... Expected failed requirements from VNFSDK @{noETSI-Entry-ManifestOrETSI-Entry-Change-Log} |
| 61 | ... Expected errors from SDC Onboarding @{noETSI-Entry-ManifestOrETSI-Entry-Change-Log_sdc_message} |
Krzysztof Kuzmicki | 1592b08 | 2020-03-27 14:03:43 +0100 | [diff] [blame] | 62 | noETSI-Entry-ManifestOrETSI-Entry-Change-Log failed_vnfreqNames=@{noETSI-Entry-ManifestOrETSI-Entry-Change-Log} sdc_response=@{noETSI-Entry-ManifestOrETSI-Entry-Change-Log_sdc_message} |
| 63 | |
| 64 | Validate Onboarding PNFD_missing |
| 65 | [Documentation] |
| 66 | ... This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/PNFD_missing |
| 67 | ... Imports it as csar VSP package to SDC and comapres with list of expected errors. |
| 68 | ... Runs VNFSDK validation and comapres with list of expected errors. |
Krzysztof Kuzmicki | 73c5591 | 2020-05-22 09:33:51 +0200 | [diff] [blame] | 69 | ... Expected failed requirements from VNFSDK @{PNFD_missing} |
| 70 | ... Expected errors from SDC Onboarding @{PNFD_missing_sdc_message} |
Krzysztof Kuzmicki | 1592b08 | 2020-03-27 14:03:43 +0100 | [diff] [blame] | 71 | PNFD_missing failed_vnfreqNames=@{PNFD_missing} sdc_response=@{PNFD_missing_sdc_message} |
| 72 | |
Krzysztof Kuzmicki | ad59044 | 2020-05-07 13:22:54 +0200 | [diff] [blame] | 73 | Validate Onboarding test_SDC_and_VNFSDK_API, integrity_check CMS_with_cert |
Krzysztof Kuzmicki | 1592b08 | 2020-03-27 14:03:43 +0100 | [diff] [blame] | 74 | [Documentation] |
| 75 | ... This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/test_SDC_and_VNFSDK_API |
| 76 | ... Imports it as csar VSP package to SDC and expects success. |
| 77 | ... Runs VNFSDK validation and and expects success. |
Krzysztof Kuzmicki | 497430e | 2020-11-02 16:48:38 +0100 | [diff] [blame] | 78 | test_SDC_and_VNFSDK_API_with_hash_cert_in_CMS negative_test_case=FALSE integrity_check=CMS_with_cert |
Krzysztof Kuzmicki | 1592b08 | 2020-03-27 14:03:43 +0100 | [diff] [blame] | 79 | |
Krzysztof Kuzmicki | ad59044 | 2020-05-07 13:22:54 +0200 | [diff] [blame] | 80 | Validate Onboarding test_SDC_and_VNFSDK_API, integrity_check CMS_without_cert |
| 81 | [Documentation] |
| 82 | ... This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/test_SDC_and_VNFSDK_API |
| 83 | ... Imports it as csar VSP package to SDC and expects success. |
| 84 | ... Runs VNFSDK validation and and expects success. |
| 85 | test_SDC_and_VNFSDK_API_with_hash negative_test_case=FALSE integrity_check=CMS_without_cert |
| 86 | |
Krzysztof Kuzmicki | ad59044 | 2020-05-07 13:22:54 +0200 | [diff] [blame] | 87 | Validate Onboarding test_SDC_and_VNFSDK_API, secured csar - CMS only - sdc valid certificate, integrity_check CMS_without_cert |
Krzysztof Kuzmicki | 1592b08 | 2020-03-27 14:03:43 +0100 | [diff] [blame] | 88 | [Documentation] |
| 89 | ... This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/test_SDC_and_VNFSDK_API |
| 90 | ... 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 ) |
| 91 | ... Imports it as zip VSP package to SDC and expects success. |
| 92 | ... Runs VNFSDK validation and and expects success. |
Krzysztof Kuzmicki | ad59044 | 2020-05-07 13:22:54 +0200 | [diff] [blame] | 93 | test_SDC_and_VNFSDK_API_with_hash secured_package=TRUE negative_test_case=FALSE integrity_check=CMS_without_cert secure_type=CMS sdc_cert=sdc-valid |
Krzysztof Kuzmicki | 1592b08 | 2020-03-27 14:03:43 +0100 | [diff] [blame] | 94 | |
Krzysztof Kuzmicki | ad59044 | 2020-05-07 13:22:54 +0200 | [diff] [blame] | 95 | Validate Onboarding test_SDC_and_VNFSDK_API, secured csar - CMS and CERT - sdc valid certificate, integrity_check CMS_with_cert |
Krzysztof Kuzmicki | 1592b08 | 2020-03-27 14:03:43 +0100 | [diff] [blame] | 96 | [Documentation] |
| 97 | ... This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/test_SDC_and_VNFSDK_API |
| 98 | ... 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 ) |
| 99 | ... Imports it as zip VSP package to SDC and expects success. |
| 100 | ... Runs VNFSDK validation and and expects success. |
Krzysztof Kuzmicki | 497430e | 2020-11-02 16:48:38 +0100 | [diff] [blame] | 101 | test_SDC_and_VNFSDK_API_with_hash_cert_in_CMS secured_package=TRUE negative_test_case=FALSE integrity_check=CMS_with_cert secure_type=CMS_AND_CERT sdc_cert=sdc-valid |
Krzysztof Kuzmicki | 1592b08 | 2020-03-27 14:03:43 +0100 | [diff] [blame] | 102 | |
Krzysztof Kuzmicki | ad59044 | 2020-05-07 13:22:54 +0200 | [diff] [blame] | 103 | Validate Onboarding test_SDC_and_VNFSDK_API, secured csar - CMS only - sdc invalid certificate, integrity_check CMS_without_cert |
Krzysztof Kuzmicki | 1592b08 | 2020-03-27 14:03:43 +0100 | [diff] [blame] | 104 | [Documentation] |
| 105 | ... This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/test_SDC_and_VNFSDK_API |
| 106 | ... 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 ) |
| 107 | ... Imports it as zip VSP package to SDC and expects error due to issues with certificate validation. |
| 108 | ... Runs VNFSDK validation and and expects success. |
Krzysztof Kuzmicki | ad59044 | 2020-05-07 13:22:54 +0200 | [diff] [blame] | 109 | test_SDC_and_VNFSDK_API_with_hash secured_package=TRUE negative_test_case=FALSE integrity_check=CMS_without_cert sdc_response=@{invalid_certificate} secure_type=CMS sdc_cert=sdc-invalid |
Krzysztof Kuzmicki | 1592b08 | 2020-03-27 14:03:43 +0100 | [diff] [blame] | 110 | |
Krzysztof Kuzmicki | ad59044 | 2020-05-07 13:22:54 +0200 | [diff] [blame] | 111 | Validate Onboarding test_SDC_and_VNFSDK_API, secured csar - CMS and CERT - sdc invalid certificate, integrity_check CMS_with_cert |
Krzysztof Kuzmicki | 1592b08 | 2020-03-27 14:03:43 +0100 | [diff] [blame] | 112 | [Documentation] |
| 113 | ... This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/test_SDC_and_VNFSDK_API |
| 114 | ... 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 ) |
| 115 | ... Imports it as zip VSP package to SDC and expects error due to issues with certificate validation. |
| 116 | ... Runs VNFSDK validation and and expects success |
Krzysztof Kuzmicki | 497430e | 2020-11-02 16:48:38 +0100 | [diff] [blame] | 117 | test_SDC_and_VNFSDK_API_with_hash_cert_in_CMS secured_package=TRUE negative_test_case=FALSE integrity_check=CMS_with_cert sdc_response=@{invalid_certificate} secure_type=CMS_AND_CERT sdc_cert=sdc-invalid |
Krzysztof Kuzmicki | 1592b08 | 2020-03-27 14:03:43 +0100 | [diff] [blame] | 118 | |