diff options
author | 2022-05-26 10:23:13 +0100 | |
---|---|---|
committer | 2022-05-31 14:27:16 +0000 | |
commit | ccd6a2c2037610d13769e2759ea5653babf5cacb (patch) | |
tree | 04f7105c492a44a845e2c1531ebb911ba301fc69 /openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp | |
parent | b43eb22f91ffdc1e2ba5d82b3dc1a2c4250d06e0 (diff) |
Delete VSP - Ensure complete deletion of VSP from DB
Delete data from tables still containing the
deleted VSP id
Issue-ID: SDC-4023
Signed-off-by: franciscovila <javier.paradela.vila@est.tech>
Change-Id: I0b389d22ccba1b888005a5bf3f1af000867e32c1
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp')
1 files changed, 5 insertions, 1 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImplTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImplTest.java index 76e4910a66..9653012789 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImplTest.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/test/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImplTest.java @@ -63,6 +63,7 @@ import org.openecomp.sdc.datatypes.model.ItemType; import org.openecomp.sdc.itempermissions.PermissionsManager; import org.openecomp.sdc.notification.services.NotificationPropagationManager; import org.openecomp.sdc.vendorsoftwareproduct.VendorSoftwareProductManager; +import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspDetails; import org.openecomp.sdc.versioning.AsdcItemManager; import org.openecomp.sdc.versioning.VersioningManager; import org.openecomp.sdc.versioning.dao.types.Version; @@ -199,7 +200,10 @@ class VendorSoftwareProductsImplTest { final Version version2 = new Version("version2Id"); final List<Version> versionList = List.of(version1, version2); when(versioningManager.list(vspId)).thenReturn(versionList); - + VspDetails vspDetails = new VspDetails(); + vspDetails.setCategory("cat"); + vspDetails.setSubCategory("sub"); + when(vendorSoftwareProductManager.getVsp(vspId, version1)).thenReturn(vspDetails); when(itemManager.list(any())).thenReturn(List.of(item)); Response rsp = vendorSoftwareProducts.deleteVsp(vspId, user); assertEquals(HttpStatus.SC_OK, rsp.getStatus()); |