package org.openecomp.mso.client.appc;\r
\r
import static org.junit.Assert.assertEquals;\r
+import static org.junit.Assert.assertNotNull;\r
\r
import java.util.Properties;\r
import java.util.UUID;\r
import org.junit.BeforeClass;\r
import org.junit.Ignore;\r
import org.junit.Test;\r
-\r
import org.onap.appc.client.lcm.model.Action;\r
import org.onap.appc.client.lcm.model.ActionIdentifiers;\r
import org.onap.appc.client.lcm.model.CheckLockInput;\r
System.setProperty("mso.config.path", "src/test/resources");\r
}\r
\r
+ @Test\r
+ public void testClientCreation() {\r
+ ApplicationControllerClient client = new ApplicationControllerClient("appc");\r
+ assertEquals(client.getControllerType(), "APPC");\r
+ assertNotNull(client.getAppCClient());\r
+ }\r
+\r
@Test\r
public void createRequest_CheckLock_RequestBuilt() {\r
- ApplicationControllerClient client = new ApplicationControllerClient();\r
+ ApplicationControllerClient client = new ApplicationControllerClient("APPC");\r
ActionIdentifiers actionIdentifiers = new ActionIdentifiers();\r
actionIdentifiers.setVnfId("vnfId");\r
CheckLockInput checkLockInput = (CheckLockInput) client.createRequest(Action.CheckLock, actionIdentifiers, null,\r
@Test\r
@Ignore // 1802 merge\r
public void runCommand_liveAppc() {\r
- ApplicationControllerClient client = new ApplicationControllerClient();\r
+ ApplicationControllerClient client = new ApplicationControllerClient("appc");\r
ActionIdentifiers actionIdentifiers = new ActionIdentifiers();\r
//actionIdentifiers.setVnfId("ca522254-2ba4-4fbd-b15b-0ef0d9cfda5f");\r
actionIdentifiers.setVnfId("2d2bf10e-81a5-");\r
@Test\r
@Ignore // 1802 merge\r
public void runCommand_CheckLock_RequestBuilt() {\r
- ApplicationControllerClient client = new ApplicationControllerClient();\r
+ ApplicationControllerClient client = new ApplicationControllerClient("appc");\r
ActionIdentifiers actionIdentifiers = new ActionIdentifiers();\r
actionIdentifiers.setVnfId("fusion-vpp-vnf-001");\r
Status status;\r
public void test_getLCMPropertiesHelper() {\r
ApplicationControllerClient client = new ApplicationControllerClient();\r
Properties properties = client.getLCMProperties();\r
+ assertEquals(properties.get("topic.read"), "APPC-TEST-AMDOCS2");\r
assertEquals(properties.get("topic.write"), "APPC-TEST-AMDOCS1-DEV3");\r
+ assertEquals(properties.get("SDNC-topic.read"), "SDNC-LCM-READ");\r
+ assertEquals(properties.get("SDNC-topic.write"), "SDNC-LCM-WRITE");\r
assertEquals(properties.get("topic.read.timeout"), "120000");\r
assertEquals(properties.get("client.response.timeout"), "120000");\r
- assertEquals(properties.get("topic.read"), "APPC-TEST-AMDOCS2");\r
assertEquals(properties.get("poolMembers"),\r
"uebsb93kcdc.it.att.com:3904,uebsb92kcdc.it.att.com:3904,uebsb91kcdc.it.att.com:3904");\r
assertEquals(properties.get("client.key"), "iaEMAfjsVsZnraBP");\r
assertEquals(properties.get("client.secret"), "wcivUjsjXzmGFBfxMmyJu9dz");\r
+ assertEquals(properties.get("controllerType"), "appc");\r
}\r
\r
}
\ No newline at end of file