From c8ce95ea8bb268ac25b634a2967ce7a875d0a764 Mon Sep 17 00:00:00 2001 From: "Benjamin, Max (mb388a)" Date: Sun, 21 Apr 2019 20:28:38 -0400 Subject: Configuration object status to Inventoried Set initial OrchestrationStatus of Configuration object to Inventoried After Assign call, we need to set the configuration orchestration status to Assigned Change-Id: I4abaeb18d1d220b2bdd03269b3b5a2aba478bf64 Issue-ID: SO-1796 Signed-off-by: Benjamin, Max (mb388a) --- .../so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java | 12 ++++++++++++ .../client/orchestration/AAIConfigurationResourcesTest.java | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'bpmn/so-bpmn-tasks/src/test/java') diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java index 7109ac8826..905f244278 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java @@ -665,6 +665,18 @@ public class AAIUpdateTasksTest extends BaseTaskTest { OrchestrationStatus.ACTIVE); } + @Test + public void updateOrchestrationStatusAssignedFabricConfigurationTest() throws Exception { + gBBInput = execution.getGeneralBuildingBlock(); + doNothing().when(aaiConfigurationResources).updateOrchestrationStatusConfiguration(configuration, + OrchestrationStatus.ASSIGNED); + + aaiUpdateTasks.updateOrchestrationStatusAssignFabricConfiguration(execution); + + verify(aaiConfigurationResources, times(1)).updateOrchestrationStatusConfiguration(configuration, + OrchestrationStatus.ASSIGNED); + } + @Test public void updateContrailServiceInstanceFqdnVfModuleTest() throws Exception { execution.setVariable("contrailServiceInstanceFqdn", "newContrailServiceInstanceFqdn"); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIConfigurationResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIConfigurationResourcesTest.java index 2e1a40dd22..be58ccb046 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIConfigurationResourcesTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIConfigurationResourcesTest.java @@ -98,7 +98,7 @@ public class AAIConfigurationResourcesTest extends TestDataSetup { aaiConfigurationResources.createConfiguration(configuration); - assertEquals(OrchestrationStatus.ASSIGNED, configuration.getOrchestrationStatus()); + assertEquals(OrchestrationStatus.INVENTORIED, configuration.getOrchestrationStatus()); verify(MOCK_aaiResourcesClient, times(1)).create(any(AAIResourceUri.class), isA(org.onap.aai.domain.yang.Configuration.class)); } -- cgit 1.2.3-korg