From 88c47a23b9428188ff5dd0b46941f8856465376b Mon Sep 17 00:00:00 2001 From: eeginux Date: Wed, 3 Apr 2019 14:28:09 +0000 Subject: PNF WF post instantiation configuration Add PNF ipv4/v6 address for config Deploy Add Integration test for CreateVcpeResCustService_simplified.bpmn Modify the PnfEventReadyDmaapClient to avoid one more running thread Refactor the so-bpmn-infrastructure-flows test resources Modify the CreateVcpeResCustService_simplified.bpmn Add ConfigurePnfResource.bpmn Add Delegates Issue-ID: SO-1506 Change-Id: Iffb69d1441ef0b485ee8cd3fb5da5f1a35279a95 Signed-off-by: eeginux --- .../so/db/catalog/client/CatalogDbClientTest.java | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'adapters/mso-catalog-db-adapter/src') diff --git a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java index 599c99b435..448077717a 100644 --- a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java +++ b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java @@ -658,4 +658,31 @@ public class CatalogDbClientTest extends CatalogDbAdapterBaseTest { Assert.assertNull(pnfResourceCustomization); } + @Test + public void getPnfResourceCustomizationFromJoinTable_validServiceUuid_expectedOutput() { + List pnfResourceCustomizationList = client + .getPnfResourceCustomizationByModelUuid("5df8b6de-2083-11e7-93ae-92361f002676"); + assertEquals(1, pnfResourceCustomizationList.size()); + + PnfResourceCustomization pnfResourceCustomization= pnfResourceCustomizationList.get(0); + assertEquals("modelInstanceName", "PNF routing", pnfResourceCustomization.getModelInstanceName()); + assertEquals("blueprintName", "test_configuration_restconf", pnfResourceCustomization.getBlueprintName()); + assertEquals("blueprintVersion", "1.0.0", pnfResourceCustomization.getBlueprintVersion()); + PnfResource pnfResource = pnfResourceCustomization.getPnfResources(); + assertNotNull(pnfResource); + + assertEquals("PNFResource modelUUID", "ff2ae348-214a-11e7-93ae-92361f002680", pnfResource.getModelUUID()); + assertEquals("PNFResource modelInvariantUUID", "2fff5b20-214b-11e7-93ae-92361f002680", + pnfResource.getModelInvariantUUID()); + assertEquals("PNFResource modelVersion", "1.0", pnfResource.getModelVersion()); + assertEquals("PNFResource orchestration mode", "", pnfResource.getOrchestrationMode()); + } + + @Test + public void getPnfResourceCustomizationFromJoinTable_invalidServiceUuid_nullOutput() { + List pnfResourceCustomizationList = client + .getPnfResourceCustomizationByModelUuid(UUID.randomUUID().toString()); + assertEquals(0, pnfResourceCustomizationList.size()); + } + } -- cgit 1.2.3-korg