diff options
author | Sunil <sb00577584@techmahindra.com> | 2020-04-25 13:48:21 +0530 |
---|---|---|
committer | Sunil Kumar Biradar <SB00577584@techmahindra.com> | 2020-04-28 04:54:08 +0000 |
commit | fe7a17f308f23ea8963d0948b5dc5388d626c1f9 (patch) | |
tree | 6dd096779948c211fcd39d3f94a84dfc9d2fdd6a /bpmn/so-bpmn-tasks/src/test | |
parent | 0151f5c120f7d325a337efd522f7b46b0f027a1f (diff) |
Adding Generic VNF information in ControllerExeuctionBB flow
Solving BlueprintName and BlueprintVersion issue
Changing vf-module to vfmodule
Updating AAI with Orchestration status
Issue-ID: SO-2806
Signed-off-by: sunilb <sb00577584@techmahindra.com>
Change-Id: I91aa653b946bae3940000f724710de87af3ce7df
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/test')
2 files changed, 40 insertions, 2 deletions
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 e5b003a437..a7dfe7f7a4 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 @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (c) 2020 Tech Mahindra + * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -753,4 +755,40 @@ public class AAIUpdateTasksTest extends BaseTaskTest { when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.PNF))).thenReturn(pnf); return pnf; } + + @Test + public void updateOrchestrationStatusVnfConfigAssignedTest() throws Exception { + doNothing().when(aaiVnfResources).updateOrchestrationStatusVnf(genericVnf, OrchestrationStatus.CONFIGASSIGNED); + + aaiUpdateTasks.updateOrchestrationStatus(execution, "vnf", "config-assign"); + + verify(aaiVnfResources, times(1)).updateOrchestrationStatusVnf(genericVnf, OrchestrationStatus.CONFIGASSIGNED); + } + + @Test + public void updateOrchestrationStatusVnfConfigDeployedTest() throws Exception { + doNothing().when(aaiVnfResources).updateOrchestrationStatusVnf(genericVnf, OrchestrationStatus.CONFIGDEPLOYED); + + aaiUpdateTasks.updateOrchestrationStatus(execution, "vnf", "config-deploy"); + + verify(aaiVnfResources, times(1)).updateOrchestrationStatusVnf(genericVnf, OrchestrationStatus.CONFIGDEPLOYED); + } + + @Test + public void updateOrchestrationStatusVfModuleConfigDeployedTest() throws Exception { + doNothing().when(aaiVfModuleResources).updateOrchestrationStatusVfModule(vfModule, genericVnf, + OrchestrationStatus.CONFIGDEPLOYED); + aaiUpdateTasks.updateOrchestrationStatus(execution, "vfmodule", "config-deploy"); + verify(aaiVfModuleResources, times(1)).updateOrchestrationStatusVfModule(vfModule, genericVnf, + OrchestrationStatus.CONFIGDEPLOYED); + } + + @Test + public void updateOrchestrationStatusVfModuleConfigAssignedTest() throws Exception { + doNothing().when(aaiVfModuleResources).updateOrchestrationStatusVfModule(vfModule, genericVnf, + OrchestrationStatus.CONFIGASSIGNED); + aaiUpdateTasks.updateOrchestrationStatus(execution, "vfmodule", "config-assign"); + verify(aaiVfModuleResources, times(1)).updateOrchestrationStatusVfModule(vfModule, genericVnf, + OrchestrationStatus.CONFIGASSIGNED); + } } diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ControllerExecutionTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ControllerExecutionTest.java index 72a987c395..f35939ec39 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ControllerExecutionTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ControllerExecutionTest.java @@ -99,7 +99,7 @@ public class ControllerExecutionTest extends BaseTaskTest { controllerExecution.setControllerActorScopeAction(execution); assertEquals(TEST_SCOPE, execution.getVariable("scope")); assertEquals(TEST_ACTION, execution.getVariable("action")); - assertEquals(TEST_CONTROLLER_ACTOR, execution.getVariable("controllerActor")); + assertEquals(TEST_CONTROLLER_ACTOR, execution.getVariable("actor")); } @@ -114,7 +114,7 @@ public class ControllerExecutionTest extends BaseTaskTest { bbNameSelectionReference.setScope(TEST_SCOPE); doReturn(bbNameSelectionReference).when(catalogDbClient).getBBNameSelectionReference(TEST_CONTROLLER_ACTOR, TEST_SCOPE, TEST_ACTION); - execution.setVariable("controllerActor", TEST_CONTROLLER_ACTOR); + execution.setVariable("actor", TEST_CONTROLLER_ACTOR); execution.setVariable("scope", TEST_SCOPE); execution.setVariable("action", TEST_ACTION); |