blob: 48ce94ae5ddc15da015aec020e1fbe5429a54881 [file] [log] [blame]
Krzysztof Kuzmicki1592b082020-03-27 14:03:43 +01001*** Settings ***
2Documentation This test suite creates csara and signed zip tosca VSP packages, validates them in VNFSDK and SDC
3Test Timeout 1m
4
5Resource ../resources/test_templates/vnfsdk_validation_template.robot
6Library String
7Test Template Validate Onboarding Package
8Default Tags vnfsdk
9
10
11*** Variables ***
Krzysztof Kuzmickiad590442020-05-07 13:22:54 +020012@{allMandatoryEntriesDefinedInTOSCAMeta} r146092 r130206
13@{no_pnfd_release_date_time_error} r57019 r130206
14@{non_mano_artifact_sets_is_mandatory} r146092 r130206
15@{noETSI-Entry-ManifestOrETSI-Entry-Change-Log} r293901 r130206
16@{PNFD_missing} SOL004 r10087 r87234 r35854 r15837 r17852 r293901 r146092 r57019 r787965 r130206
17@{missing_entry_in_manifest}
18@{allMandatoryEntriesDefinedInTOSCAMeta_sdc_message} Following entry not supported in TOSCA.meta Entry-Tests 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} Following entry not supported in TOSCA.meta Entry-Tests 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} Following entry not supported in TOSCA.meta Entry-Tests 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
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 Kuzmicki1592b082020-03-27 14:03:43 +010022@{PNFD_missing_sdc_message} TOSCA.meta file in TOSCA-metadata directory missing entry Created-By
23@{invalid_certificate} Could not verify signature!
Krzysztof Kuzmickiad590442020-05-07 13:22:54 +020024@{missing_entry_in_manifest_sdc_message} 'pnf_main_descriptor.cert' artifact is not being referenced in manifest file
Krzysztof Kuzmicki1592b082020-03-27 14:03:43 +010025
26
27*** Test Cases ***
28Validate 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.
33 allMandatoryEntriesDefinedInTOSCAMeta failed_vnfreqNames=@{allMandatoryEntriesDefinedInTOSCAMeta} sdc_response=@{allMandatoryEntriesDefinedInTOSCAMeta_sdc_message}
34
35Validate Onboarding non_mano_artifact_sets_is_mandatory
36 [Documentation]
37 ... This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/non_mano_artifact_sets_is_mandatory
38 ... Imports it as csar VSP package to SDC and comapres with list of expected errors.
39 ... Runs VNFSDK validation and comapres with list of expected errors.
40 non_mano_artifact_sets_is_mandatory failed_vnfreqNames=@{non_mano_artifact_sets_is_mandatory} sdc_response=@{non_mano_artifact_sets_is_mandatory_sdc_message}
41
42Validate Onboarding no_pnfd_release_date_time_error
43 [Documentation]
44 ... This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/no_pnfd_release_date_time_error
45 ... Imports it as csar VSP package to SDC and comapres with list of expected errors.
46 ... Runs VNFSDK validation and comapres with list of expected errors.
47 no_pnfd_release_date_time_error failed_vnfreqNames=@{no_pnfd_release_date_time_error} sdc_response=@{no_pnfd_release_date_time_error_sdc_message}
48
49Validate Onboarding noETSI-Entry-ManifestOrETSI-Entry-Change-Log
50 [Documentation]
51 ... This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/noETSI-Entry-ManifestOrETSI-Entry-Change-Log
52 ... Imports it as csar VSP package to SDC and comapres with list of expected errors.
53 ... Runs VNFSDK validation and comapres with list of expected errors.
54 noETSI-Entry-ManifestOrETSI-Entry-Change-Log failed_vnfreqNames=@{noETSI-Entry-ManifestOrETSI-Entry-Change-Log} sdc_response=@{noETSI-Entry-ManifestOrETSI-Entry-Change-Log_sdc_message}
55
56Validate Onboarding PNFD_missing
57 [Documentation]
58 ... This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/PNFD_missing
59 ... Imports it as csar VSP package to SDC and comapres with list of expected errors.
60 ... Runs VNFSDK validation and comapres with list of expected errors.
61 PNFD_missing failed_vnfreqNames=@{PNFD_missing} sdc_response=@{PNFD_missing_sdc_message}
62
Krzysztof Kuzmickiad590442020-05-07 13:22:54 +020063Validate Onboarding test_SDC_and_VNFSDK_API, integrity_check CMS_with_cert
Krzysztof Kuzmicki1592b082020-03-27 14:03:43 +010064 [Documentation]
65 ... This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/test_SDC_and_VNFSDK_API
66 ... Imports it as csar VSP package to SDC and expects success.
67 ... Runs VNFSDK validation and and expects success.
Krzysztof Kuzmickiad590442020-05-07 13:22:54 +020068 test_SDC_and_VNFSDK_API_with_hash negative_test_case=FALSE integrity_check=CMS_with_cert
Krzysztof Kuzmicki1592b082020-03-27 14:03:43 +010069
Krzysztof Kuzmickiad590442020-05-07 13:22:54 +020070Validate Onboarding test_SDC_and_VNFSDK_API, integrity_check CMS_without_cert
71 [Documentation]
72 ... This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/test_SDC_and_VNFSDK_API
73 ... Imports it as csar VSP package to SDC and expects success.
74 ... Runs VNFSDK validation and and expects success.
75 test_SDC_and_VNFSDK_API_with_hash negative_test_case=FALSE integrity_check=CMS_without_cert
76
77Validate Onboarding package with missing entry in manifest, integrity_check CMS_with_cert
78 [Documentation]
79 ... This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/test_SDC_and_VNFSDK_API
80 ... Imports it as csar VSP package to SDC and expects success.
81 ... Runs VNFSDK validation and and expects success.
82 test_SDC_and_VNFSDK_API_missing_entry_in_manifest negative_test_case=TRUE failed_vnfreqNames=@{missing_entry_in_manifest} sdc_response=@{missing_entry_in_manifest_sdc_message} integrity_check=CMS_with_cert
83
84Validate Onboarding test_SDC_and_VNFSDK_API, secured csar - CMS only - sdc valid certificate, integrity_check CMS_without_cert
Krzysztof Kuzmicki1592b082020-03-27 14:03:43 +010085 [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 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 success.
89 ... Runs VNFSDK validation and and expects success.
Krzysztof Kuzmickiad590442020-05-07 13:22:54 +020090 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 Kuzmicki1592b082020-03-27 14:03:43 +010091
Krzysztof Kuzmickiad590442020-05-07 13:22:54 +020092Validate Onboarding test_SDC_and_VNFSDK_API, secured csar - CMS and CERT - sdc valid certificate, integrity_check CMS_with_cert
Krzysztof Kuzmicki1592b082020-03-27 14:03:43 +010093 [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 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 success.
97 ... Runs VNFSDK validation and and expects success.
Krzysztof Kuzmickiad590442020-05-07 13:22:54 +020098 test_SDC_and_VNFSDK_API_with_hash secured_package=TRUE negative_test_case=FALSE integrity_check=CMS_with_cert secure_type=CMS_AND_CERT sdc_cert=sdc-valid
Krzysztof Kuzmicki1592b082020-03-27 14:03:43 +010099
Krzysztof Kuzmickiad590442020-05-07 13:22:54 +0200100Validate Onboarding test_SDC_and_VNFSDK_API, secured csar - CMS only - sdc invalid certificate, integrity_check CMS_without_cert
Krzysztof Kuzmicki1592b082020-03-27 14:03:43 +0100101 [Documentation]
102 ... This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/test_SDC_and_VNFSDK_API
103 ... 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 )
104 ... Imports it as zip VSP package to SDC and expects error due to issues with certificate validation.
105 ... Runs VNFSDK validation and and expects success.
Krzysztof Kuzmickiad590442020-05-07 13:22:54 +0200106 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 Kuzmicki1592b082020-03-27 14:03:43 +0100107
Krzysztof Kuzmickiad590442020-05-07 13:22:54 +0200108Validate Onboarding test_SDC_and_VNFSDK_API, secured csar - CMS and CERT - sdc invalid certificate, integrity_check CMS_with_cert
Krzysztof Kuzmicki1592b082020-03-27 14:03:43 +0100109 [Documentation]
110 ... This test case creates TOSCA csar software package for PNF, based on /var/opt/ONAP/demo/tosca/vnfsdk/test_SDC_and_VNFSDK_API
111 ... 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 )
112 ... Imports it as zip VSP package to SDC and expects error due to issues with certificate validation.
113 ... Runs VNFSDK validation and and expects success
Krzysztof Kuzmickiad590442020-05-07 13:22:54 +0200114 test_SDC_and_VNFSDK_API_with_hash 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 Kuzmicki1592b082020-03-27 14:03:43 +0100115