diff options
author | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2018-08-24 09:13:17 -0400 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2018-08-24 09:15:09 -0400 |
commit | ffe800d5eb0b2465a73af42987238b5ca73cd02f (patch) | |
tree | 2434609bfec97f922ac6d8ea6c5a1d0a5543033b /bpmn/so-bpmn-tasks/src/test | |
parent | 969cde43a1c52fc5a0131cd94713a3c4ba3d1564 (diff) |
retired flows no longer in use
corrected spelling for migration sql file
delete 1802-style flow, MSO to create l3network in AAI
Revert "retire 1802-style flow, MSO to create l3network in AAI"
retire 1802-style flow, MSO to create l3network in AAI
Change-Id: I0a63d086891565c2346424a3d1b49ce974f5db24
Issue-ID: SO-901
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/test')
-rw-r--r-- | bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetworkTest.java | 56 |
1 files changed, 4 insertions, 52 deletions
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetworkTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetworkTest.java index a206140014..6e5bd314d8 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetworkTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetworkTest.java @@ -25,7 +25,6 @@ import org.junit.Before; import org.junit.Test; import org.onap.so.bpmn.BaseTaskTest; import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network; -import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey; import org.onap.so.client.exception.BBObjectNotFoundException; import org.onap.so.db.catalog.beans.OrchestrationStatus; @@ -36,80 +35,33 @@ public class AssignNetworkTest extends BaseTaskTest { @Autowired private AssignNetwork assignNetwork; - private ServiceInstance serviceInstance; private L3Network network; @Before public void before() { - serviceInstance = setServiceInstance(); network = setL3Network(); } @Test - public void hasCollectionTest() throws Exception { - setServiceInstance(); - //collection present by default base test setup - boolean hasCollection = assignNetwork.hasCollection(execution); - assertEquals(true, hasCollection); - - boolean skip = assignNetwork.skipNetworkCreationInAAI(execution); - assertEquals(false, skip); - } - - @Test - public void hasNoCollectionTest() throws Exception { - //clear collection + public void networkNotFoundTest() throws Exception { + //network status to PRECREATED - when it was NOT found by name try { - serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); - } catch(BBObjectNotFoundException e) { - serviceInstance = setServiceInstance(); - } - serviceInstance.setCollection(null); - boolean hasCollection = assignNetwork.hasCollection(execution); - assertEquals(false, hasCollection); - - boolean skip = assignNetwork.skipNetworkCreationInAAI(execution); - assertEquals(true, skip); - } - - @Test - public void hasNoCollectionNoNetworkTest() throws Exception { - //clear collection and updated network status to PRECREATED - when it was NOT found by name - try { - serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID,execution.getLookupMap().get(ResourceKey.NETWORK_ID)); } catch(BBObjectNotFoundException e) { - serviceInstance = setServiceInstance(); } - serviceInstance.setCollection(null); + network.setOrchestrationStatus(OrchestrationStatus.PRECREATED); - boolean hasCollection = assignNetwork.hasCollection(execution); boolean networkFound = assignNetwork.networkFoundByName(execution); - assertEquals(false, hasCollection); assertEquals(false, networkFound); - - boolean skip = assignNetwork.skipNetworkCreationInAAI(execution); - assertEquals(true, skip); } @Test - public void hasNetworkNoCollectionTest() throws Exception { - //clear collection and updated network status to INVENTORIED - when it was found by name + public void networkFoundTest() throws Exception { try { - serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID,execution.getLookupMap().get(ResourceKey.NETWORK_ID)); } catch(BBObjectNotFoundException e) { - serviceInstance = setServiceInstance(); } - serviceInstance.setCollection(null); - network.setOrchestrationStatus(OrchestrationStatus.INVENTORIED); - boolean hasCollection = assignNetwork.hasCollection(execution); boolean networkFound = assignNetwork.networkFoundByName(execution); - assertEquals(false, hasCollection); assertEquals(true, networkFound); - - boolean skip = assignNetwork.skipNetworkCreationInAAI(execution); - assertEquals(true, skip); } - } |