blob: 12e3df3a4325a842cc1b57653f99aa421f03fc97 [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
Krzysztof Kuzmickiae8615f2020-05-29 12:35:06 +02008Default Tags vnfsdk pnf_preonboarding_onboarding
Krzysztof Kuzmicki1592b082020-03-27 14:03:43 +01009
10
11*** Variables ***
Krzysztof Kuzmicki497430e2020-11-02 16:48:38 +010012@{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 Kuzmickiad590442020-05-07 13:22:54 +020017@{missing_entry_in_manifest}
Krzysztof Kuzmicki497430e2020-11-02 16:48:38 +010018@{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 Kuzmickiad590442020-05-07 13:22:54 +020021@{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.
Krzysztof Kuzmicki73c55912020-05-22 09:33:51 +020033 ... Expected failed requirements from VNFSDK @{allMandatoryEntriesDefinedInTOSCAMeta}
34 ... Expected errors from SDC Onboarding @{allMandatoryEntriesDefinedInTOSCAMeta_sdc_message}
Krzysztof Kuzmicki1592b082020-03-27 14:03:43 +010035 allMandatoryEntriesDefinedInTOSCAMeta failed_vnfreqNames=@{allMandatoryEntriesDefinedInTOSCAMeta} sdc_response=@{allMandatoryEntriesDefinedInTOSCAMeta_sdc_message}
36
37Validate 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 Kuzmicki73c55912020-05-22 09:33:51 +020042 ... 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 Kuzmicki1592b082020-03-27 14:03:43 +010044 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
46Validate 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 Kuzmicki73c55912020-05-22 09:33:51 +020051 ... 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 Kuzmicki1592b082020-03-27 14:03:43 +010053 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
55Validate 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 Kuzmicki73c55912020-05-22 09:33:51 +020060 ... 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 Kuzmicki1592b082020-03-27 14:03:43 +010062 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
64Validate 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 Kuzmicki73c55912020-05-22 09:33:51 +020069 ... Expected failed requirements from VNFSDK @{PNFD_missing}
70 ... Expected errors from SDC Onboarding @{PNFD_missing_sdc_message}
Krzysztof Kuzmicki1592b082020-03-27 14:03:43 +010071 PNFD_missing failed_vnfreqNames=@{PNFD_missing} sdc_response=@{PNFD_missing_sdc_message}
72
Krzysztof Kuzmickiad590442020-05-07 13:22:54 +020073Validate Onboarding test_SDC_and_VNFSDK_API, integrity_check CMS_with_cert
Krzysztof Kuzmicki1592b082020-03-27 14:03:43 +010074 [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 Kuzmicki497430e2020-11-02 16:48:38 +010078 test_SDC_and_VNFSDK_API_with_hash_cert_in_CMS negative_test_case=FALSE integrity_check=CMS_with_cert
Krzysztof Kuzmicki1592b082020-03-27 14:03:43 +010079
Krzysztof Kuzmickiad590442020-05-07 13:22:54 +020080Validate 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 Kuzmickiad590442020-05-07 13:22:54 +020087Validate 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 +010088 [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 Kuzmickiad590442020-05-07 13:22:54 +020093 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 +010094
Krzysztof Kuzmickiad590442020-05-07 13:22:54 +020095Validate 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 +010096 [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 Kuzmicki497430e2020-11-02 16:48:38 +0100101 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 Kuzmicki1592b082020-03-27 14:03:43 +0100102
Krzysztof Kuzmickiad590442020-05-07 13:22:54 +0200103Validate 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 +0100104 [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 Kuzmickiad590442020-05-07 13:22:54 +0200109 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 +0100110
Krzysztof Kuzmickiad590442020-05-07 13:22:54 +0200111Validate 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 +0100112 [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 Kuzmicki497430e2020-11-02 16:48:38 +0100117 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 Kuzmicki1592b082020-03-27 14:03:43 +0100118