aboutsummaryrefslogtreecommitdiffstats
path: root/asdc-controller/src/test
diff options
context:
space:
mode:
authorMerkel, Jeff <jeff.merkel@att.com>2019-09-24 13:10:45 -0400
committerBenjamin, Max (mb388a) <mb388a@att.com>2019-09-24 13:10:45 -0400
commit2583008c4fcab4fa08fb5e566ba6ba4a047628b4 (patch)
treeca57499935bf97db06a15cf4e3009bc8385ce6b3 /asdc-controller/src/test
parent96231b3365d378a86b71d93b8a7d64aef8be531c (diff)
- Added serviceDeployed variable for
- Added serviceDeployed variable for distributions with 2 resources. Issue-ID: SO-2362 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: I60a5240ed6b8213a24d3c4044c36b232ba3e9f7a
Diffstat (limited to 'asdc-controller/src/test')
-rw-r--r--asdc-controller/src/test/java/org/onap/so/asdc/client/test/rest/ASDCRestInterfaceTest.java19
1 files changed, 19 insertions, 0 deletions
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;
@@ -88,6 +92,9 @@ public class ASDCRestInterfaceTest extends BaseTest {
private NetworkResourceRepository networkRepo;
@Autowired
+ private VnfCustomizationRepository vnfCustRepo;
+
+ @Autowired
private WorkflowRepository workflowRepo;
@Autowired
@@ -297,6 +304,18 @@ public class ASDCRestInterfaceTest extends BaseTest {
Optional<NetworkResource> networkResource = networkRepo.findById("89789b26-a46b-4cee-aed0-d46e21f93a5e");
assertTrue(networkResource.isPresent());
assertEquals("Generic NeutronNet", networkResource.get().getModelName());
+
+ List<VnfResourceCustomization> 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