aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/test
diff options
context:
space:
mode:
authorRob Daugherty <rd472p@att.com>2018-04-24 13:53:25 -0400
committerRob Daugherty <rd472p@att.com>2018-04-24 14:26:12 -0400
commitbb34137b85575dd36121d8cfc63b469e9a2ebf08 (patch)
tree33b7aba21b0db8bf9511488c10ffa0718c94d42a /bpmn/MSOCommonBPMN/src/test
parent4e40f1186d6dac2bf112ee21dccf5b6a463c00b8 (diff)
Create VF Module Error
There are multiple issues here. 1) The LCM healthcheck and config-scale-out should be made conditional upon the VNF orchestration status being Active or Activated. I'm not going to do that with this commit, since the logic will probably need to be moved to the DoCreateVfModule flow. What I will do is bypass the LCM operations to unblock testing. Another ticket will need to address the real solution. 2) APP-C gave us an API where the controller type is configured in their client object, which is NOT what we wanted. As a result, we have to keep a client object for each controller type. Our implementation did not do this. 3) Need to support the APP-C client configuration properties for specifying the SDN-C topic names. I'm refactoring the APP-C client urn mapping names to make it clear that they are for configuring the APP-C *client* and not necessarily for APP-C itself. Change-Id: I588f3b98b4ee44ba53b4931f9f1a7938ee70bebf Issue-ID: SO-577 Signed-off-by: Rob Daugherty <rd472p@att.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/test')
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/appc/ApplicationControllerClientTest.java16
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/mso.bpmn.urn.properties14
2 files changed, 20 insertions, 10 deletions
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/appc/ApplicationControllerClientTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/appc/ApplicationControllerClientTest.java
index e737f5da16..ec093bebbd 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/appc/ApplicationControllerClientTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/appc/ApplicationControllerClientTest.java
@@ -21,6 +21,7 @@
package org.openecomp.mso.client.appc;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
import java.util.Properties;
import java.util.UUID;
@@ -28,7 +29,6 @@ import java.util.UUID;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
-
import org.onap.appc.client.lcm.model.Action;
import org.onap.appc.client.lcm.model.ActionIdentifiers;
import org.onap.appc.client.lcm.model.CheckLockInput;
@@ -42,6 +42,13 @@ public class ApplicationControllerClientTest {
}
@Test
+ public void testClientCreation() {
+ ApplicationControllerClient client = new ApplicationControllerClient("appc");
+ assertEquals(client.getControllerType(), "appc");
+ assertNotNull(client.getAppCClient());
+ }
+
+ @Test
public void createRequest_CheckLock_RequestBuilt() {
ApplicationControllerClient client = new ApplicationControllerClient("appc");
ActionIdentifiers actionIdentifiers = new ActionIdentifiers();
@@ -89,14 +96,15 @@ public class ApplicationControllerClientTest {
@Test
public void test_getLCMPropertiesHelper() {
ApplicationControllerClient client = new ApplicationControllerClient("appc");
- Properties properties = client.getLCMProperties("appc");
+ Properties properties = client.getLCMProperties();
+ assertEquals(properties.get("topic.read"), "APPC-TEST-AMDOCS2");
assertEquals(properties.get("topic.write"), "APPC-TEST-AMDOCS1-DEV3");
+ assertEquals(properties.get("topic.sdnc.read"), "SDNC-LCM-READ");
+ assertEquals(properties.get("topic.sdnc.write"), "SDNC-LCM-WRITE");
assertEquals(properties.get("topic.read.timeout"), "120000");
assertEquals(properties.get("client.response.timeout"), "120000");
- assertEquals(properties.get("topic.read"), "APPC-TEST-AMDOCS2");
assertEquals(properties.get("poolMembers"),
"uebsb93kcdc.it.att.com:3904,uebsb92kcdc.it.att.com:3904,uebsb91kcdc.it.att.com:3904");
- assertEquals(properties.get("client.controllerType"), "appc");
assertEquals(properties.get("client.key"), "iaEMAfjsVsZnraBP");
assertEquals(properties.get("client.secret"), "wcivUjsjXzmGFBfxMmyJu9dz");
}
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/mso.bpmn.urn.properties b/bpmn/MSOCommonBPMN/src/test/resources/mso.bpmn.urn.properties
index 539d365150..4b338aed0c 100644
--- a/bpmn/MSOCommonBPMN/src/test/resources/mso.bpmn.urn.properties
+++ b/bpmn/MSOCommonBPMN/src/test/resources/mso.bpmn.urn.properties
@@ -33,14 +33,16 @@ policy.client.auth=Basic bTAzNzQzOnBvbGljeVIwY2sk
policy.auth=Basic dGVzdHBkcDphbHBoYTEyMw==
policy.environment=TEST
-appc.topic.read=APPC-TEST-AMDOCS2
-appc.topic.write=APPC-TEST-AMDOCS1-DEV3
-appc.topic.read.timeout=120000
+appc.client.topic.read=APPC-TEST-AMDOCS2
+appc.client.topic.write=APPC-TEST-AMDOCS1-DEV3
+appc.client.topic.sdnc.read=SDNC-LCM-READ
+appc.client.topic.sdnc.write=SDNC-LCM-WRITE
+appc.client.topic.read.timeout=120000
appc.client.response.timeout=120000
-appc.service=ueb
-appc.poolMembers=uebsb93kcdc.it.att.com:3904,uebsb92kcdc.it.att.com:3904,uebsb91kcdc.it.att.com:3904
+appc.client.poolMembers=uebsb93kcdc.it.att.com:3904,uebsb92kcdc.it.att.com:3904,uebsb91kcdc.it.att.com:3904
appc.client.key=iaEMAfjsVsZnraBP
appc.client.secret=wcivUjsjXzmGFBfxMmyJu9dz
+appc.client.service=ueb
mso.adapters.sdnc.endpoint=http://localhost:28090/SDNCAdapter
mso.adapters.sdnc.rest.endpoint=http://localhost:28090/SDNCAdapter/v1/sdnc
@@ -134,4 +136,4 @@ log.debug.vnfAdapterRestV1=true
sdno.health-check.dmaap.username=m04768@mso.ecomp.att.com
sdno.health-check.dmaap.password=eHQ1cUJrOUc
sdno.health-check.dmaap.subscriber.topic=com.att.sdno.test-health-diagnostic-v02
-sdno.health-check.dmaap.publisher.topic=com.att.sdno.test-health-diagnostic-v02 \ No newline at end of file
+sdno.health-check.dmaap.publisher.topic=com.att.sdno.test-health-diagnostic-v02