From 2583008c4fcab4fa08fb5e566ba6ba4a047628b4 Mon Sep 17 00:00:00 2001 From: "Merkel, Jeff" Date: Tue, 24 Sep 2019 13:10:45 -0400 Subject: - Added serviceDeployed variable for - Added serviceDeployed variable for distributions with 2 resources. Issue-ID: SO-2362 Signed-off-by: Benjamin, Max (mb388a) Change-Id: I60a5240ed6b8213a24d3c4044c36b232ba3e9f7a --- .../asdc/client/test/rest/ASDCRestInterfaceTest.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'asdc-controller/src/test') diff --git a/asdc-controller/src/test/java/org/onap/so/asdc/client/test/rest/ASDCRestInterfaceTest.java b/asdc-controller/src/test/java/org/onap/so/asdc/client/test/rest/ASDCRestInterfaceTest.java index e1b124775b..7171fff812 100644 --- a/asdc-controller/src/test/java/org/onap/so/asdc/client/test/rest/ASDCRestInterfaceTest.java +++ b/asdc-controller/src/test/java/org/onap/so/asdc/client/test/rest/ASDCRestInterfaceTest.java @@ -56,12 +56,16 @@ import org.onap.so.db.catalog.beans.NetworkResource; import org.onap.so.db.catalog.beans.NetworkResourceCustomization; import org.onap.so.db.catalog.beans.Service; import org.onap.so.db.catalog.beans.ToscaCsar; +import org.onap.so.db.catalog.beans.VnfResource; +import org.onap.so.db.catalog.beans.VnfResourceCustomization; import org.onap.so.db.catalog.beans.Workflow; import org.onap.so.db.catalog.data.repository.AllottedResourceCustomizationRepository; import org.onap.so.db.catalog.data.repository.AllottedResourceRepository; import org.onap.so.db.catalog.data.repository.NetworkResourceRepository; import org.onap.so.db.catalog.data.repository.ServiceRepository; import org.onap.so.db.catalog.data.repository.ToscaCsarRepository; +import org.onap.so.db.catalog.data.repository.VnfCustomizationRepository; +import org.onap.so.db.catalog.data.repository.VnfResourceRepository; import org.onap.so.db.catalog.data.repository.WorkflowRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.web.client.TestRestTemplate; @@ -87,6 +91,9 @@ public class ASDCRestInterfaceTest extends BaseTest { @Autowired private NetworkResourceRepository networkRepo; + @Autowired + private VnfCustomizationRepository vnfCustRepo; + @Autowired private WorkflowRepository workflowRepo; @@ -297,6 +304,18 @@ public class ASDCRestInterfaceTest extends BaseTest { Optional networkResource = networkRepo.findById("89789b26-a46b-4cee-aed0-d46e21f93a5e"); assertTrue(networkResource.isPresent()); assertEquals("Generic NeutronNet", networkResource.get().getModelName()); + + List vnfCustomizationResources = + vnfCustRepo.findByModelCustomizationUUID("01564fe7-0541-4d92-badc-464cc35f83ba"); + + for (VnfResourceCustomization vnfResourceCustomization : vnfCustomizationResources) { + + assertTrue(vnfResourceCustomization.getVfModuleCustomizations().stream() + .anyMatch(vfModuleCust -> "354b1e83-47db-4af1-8af4-9c14b03b482d" + .equals(vfModuleCust.getModelCustomizationUUID()))); + + } + } @Test -- cgit 1.2.3-korg