aboutsummaryrefslogtreecommitdiffstats
path: root/asdc-controller/src/test/java/org
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2019-04-02 22:54:57 -0400
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-04-02 22:54:57 -0400
commit86f04e1d55b54a1a23bb274d211c6fca85980fef (patch)
treee8fb0a8c1d5e64761068df56faa8a8e509fa2f48 /asdc-controller/src/test/java/org
parentd59fc0ad5db7b7cacf5996f86db34f41090061fa (diff)
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) <mb388a@us.att.com>
Diffstat (limited to 'asdc-controller/src/test/java/org')
-rw-r--r--asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCControllerITTest.java5
1 files changed, 3 insertions, 2 deletions
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());