From 86f04e1d55b54a1a23bb274d211c6fca85980fef Mon Sep 17 00:00:00 2001 From: "Benjamin, Max (mb388a)" Date: Tue, 2 Apr 2019 22:54:57 -0400 Subject: fix catalogdb cvfnc customization Hibernate entities were all wrong and needed a complete rewrite. The scope kept growing and ended up touching a lot more of the code than originally planned. These changes make the db interactions much easier and more straightforward from java. The flyway script order had to change to make this migration possible. Change-Id: I6ce363a385661300eddb11923ac6a80538edaddc Issue-ID: SO-1710 Signed-off-by: Benjamin, Max (mb388a) --- .../src/test/java/org/onap/so/asdc/client/ASDCControllerITTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'asdc-controller/src/test/java/org/onap') diff --git a/asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCControllerITTest.java b/asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCControllerITTest.java index 03d0a0ff1e..301ef14637 100644 --- a/asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCControllerITTest.java +++ b/asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCControllerITTest.java @@ -29,6 +29,7 @@ import static org.junit.Assert.fail; import java.util.ArrayList; import java.util.Collections; import java.util.List; +import java.util.Optional; import java.util.UUID; import javax.persistence.EntityNotFoundException; @@ -387,8 +388,8 @@ public class ASDCControllerITTest extends BaseTest { * global metadata in the resource-Testservice140-template.yml */ String vnfCustomizationKey = "ca1c8455-8ce2-4a76-a037-3f4cf01cffa0"; - VnfResourceCustomization vnfCustomization = vnfCustomizationRepository - .findById(vnfCustomizationKey).orElseThrow( + VnfResourceCustomization vnfCustomization = Optional.ofNullable(vnfCustomizationRepository + .findOneByModelCustomizationUUID(vnfCustomizationKey)).orElseThrow( () -> new EntityNotFoundException( "VNF resource customization: " + vnfCustomizationKey + " not found")); assertEquals("model customizationUUID", vnfCustomizationKey, vnfCustomization.getModelCustomizationUUID()); -- cgit 1.2.3-korg