X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FNBI.git;a=blobdiff_plain;f=osm_nbi%2Ftests%2Ftest.py;h=884c08cfa9b0af63402fb8c99aceb448a529a602;hp=ddb5e697c0281fb16b1859d7b2c6a308039f4e3e;hb=95f94c211daae2fc8b9d6f78c0ca076afc8d41d7;hpb=04dbb0e85e2d3d10fc7ae79ad43af38e3f73e230 diff --git a/osm_nbi/tests/test.py b/osm_nbi/tests/test.py index ddb5e69..884c08c 100755 --- a/osm_nbi/tests/test.py +++ b/osm_nbi/tests/test.py @@ -1791,6 +1791,14 @@ class TestDescriptors: "/vnfpkgm/v1/vnf_packages/{}/package_content".format(self.vnfd_id), headers_zip_yaml, "@b" + vnfd_filename_path, 204, None, 0) + queries = ["mgmt-interface.cp=mgmt", "vdu.0.interface.0.external-connection-point-ref=mgmt", + "vdu.0.interface.1.internal-connection-point-ref=internal", + "internal-vld.0.internal-connection-point.0.id-ref=internal"] + for query in queries: + engine.test("Upload invalid VNFD ", "PUT", + "/vnfpkgm/v1/vnf_packages/{}/package_content?{}".format(self.vnfd_id, query), + headers_zip_yaml, "@b" + vnfd_filename_path, 422, r_header_yaml, "yaml") + # test bug 605 engine.test("Upload invalid VNFD ", "PUT", "/vnfpkgm/v1/vnf_packages/{}/package_content".format(self.vnfd_id), headers_yaml, self.vnfd_prova, 422, r_header_yaml, "yaml") @@ -1821,6 +1829,12 @@ class TestDescriptors: "@b" + nsd_filename_path, 201, r_headers_yaml_location_nsd, "yaml") self.nsd_id = engine.last_id + queries = ["vld.0.vnfd-connection-point-ref.0.vnfd-id-ref=hf"] + for query in queries: + engine.test("Upload invalid NSD ", "PUT", + "/nsd/v1/ns_descriptors/{}/nsd_content?{}".format(self.nsd_id, query), + headers_zip_yaml, "@b" + nsd_filename_path, 422, r_header_yaml, "yaml") + # get nsd descriptor engine.test("Get NSD descriptor", "GET", "/nsd/v1/ns_descriptors/{}".format(self.nsd_id), headers_yaml, None, 200, r_header_yaml, "yaml")