summaryrefslogtreecommitdiffstats
path: root/appc-provider/appc-provider-bundle/src/test/java/org
diff options
context:
space:
mode:
authorvidhyasree <sn141y@att.com>2018-02-21 11:19:33 -0500
committerPatrick Brady <pb071s@att.com>2018-02-22 18:04:35 +0000
commit6cf060d13e4a06894db3050ed23e4e7667fb021f (patch)
tree078a7e8980cf73c23402f0637a93ab6ae2d90c1c /appc-provider/appc-provider-bundle/src/test/java/org
parent446bae37c2f6dabe842cb2b6585a17bcec327a17 (diff)
Task to add ConfigScaleOut to LCM API, Yang Model.
A new action ConfigScaleOut is added to LCM API and Yang model. Removed old action item configscaleout supporting VM action level which is no longer needed. Issue-ID: APPC-479 Change-Id: Ie5452f4d5625fc3be6b66c0f403d12baa64fa096 Signed-off-by: vidhyasree <sn141y@att.com>
Diffstat (limited to 'appc-provider/appc-provider-bundle/src/test/java/org')
-rw-r--r--appc-provider/appc-provider-bundle/src/test/java/org/onap/appc/provider/AppcProviderLcmTest.java37
1 files changed, 1 insertions, 36 deletions
diff --git a/appc-provider/appc-provider-bundle/src/test/java/org/onap/appc/provider/AppcProviderLcmTest.java b/appc-provider/appc-provider-bundle/src/test/java/org/onap/appc/provider/AppcProviderLcmTest.java
index 064f5679f..1d0594837 100644
--- a/appc-provider/appc-provider-bundle/src/test/java/org/onap/appc/provider/AppcProviderLcmTest.java
+++ b/appc-provider/appc-provider-bundle/src/test/java/org/onap/appc/provider/AppcProviderLcmTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP : APPC
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Copyright (C) 2017 Amdocs
* =============================================================================
@@ -53,8 +53,6 @@ import org.opendaylight.yang.gen.v1.org.onap.appc.lcm.rev160108.ConfigModifyInpu
import org.opendaylight.yang.gen.v1.org.onap.appc.lcm.rev160108.ConfigModifyOutput;
import org.opendaylight.yang.gen.v1.org.onap.appc.lcm.rev160108.ConfigRestoreInput;
import org.opendaylight.yang.gen.v1.org.onap.appc.lcm.rev160108.ConfigRestoreOutput;
-import org.opendaylight.yang.gen.v1.org.onap.appc.lcm.rev160108.ConfigScaleoutInput;
-import org.opendaylight.yang.gen.v1.org.onap.appc.lcm.rev160108.ConfigScaleoutOutput;
import org.opendaylight.yang.gen.v1.org.onap.appc.lcm.rev160108.ConfigureInput;
import org.opendaylight.yang.gen.v1.org.onap.appc.lcm.rev160108.ConfigureOutput;
import org.opendaylight.yang.gen.v1.org.onap.appc.lcm.rev160108.DetachVolumeInput;
@@ -596,39 +594,6 @@ public class AppcProviderLcmTest extends AbstractDataBrokerTest {
}
@Test
- public void testConfigScaleout() throws Exception {
- // Validation success
- doReturn("Success").when(successlcmStatus).getMessage();
- doReturn(responseContext).when(requestHandlerOutput).getResponseContext();
- doReturn(requestHandlerOutput).when(appcProviderLcm).executeRequest(any());
- doReturn(null).when(validationService).validateInput(any(), any(), any());
-
- ConfigScaleoutInput configScaleoutInput = mock(ConfigScaleoutInput.class);
- doReturn(newCommonHeader("request-id-test")).when(configScaleoutInput).getCommonHeader();
- doReturn(newActionIdentifier("vnf-id", "vnfc-id", "vserver-id"))
- .when(configScaleoutInput).getActionIdentifiers();
-
- Future<RpcResult<ConfigScaleoutOutput>> results = appcProviderLcm.configScaleout(configScaleoutInput);
- Assert.assertTrue(400 == results.get().getResult().getStatus().getCode());
- Assert.assertEquals("Success", results.get().getResult().getStatus().getMessage());
- verify(appcProviderLcm, times(1)).executeRequest(any());
-
- // Validation failed
- doReturn(failStatus).when(validationService).validateInput(any(), any(), any());
- results = appcProviderLcm.configScaleout(configScaleoutInput);
- Assert.assertEquals(failStatus, results.get().getResult().getStatus());
- verify(appcProviderLcm, times(1)).executeRequest(any());
-
- // parse exception
- doReturn(null).when(validationService).validateInput(any(), any(), any());
- doReturn(null).when(configScaleoutInput).getActionIdentifiers();
- results = appcProviderLcm.configScaleout(configScaleoutInput);
- Assert.assertTrue(LCMCommandStatus.REQUEST_PARSING_FAILED.getResponseCode()
- == results.get().getResult().getStatus().getCode());
- verify(appcProviderLcm, times(1)).executeRequest(any());
- }
-
- @Test
public void testConfigRestore() throws Exception {
// Validation success
doReturn("Success").when(successlcmStatus).getMessage();