summaryrefslogtreecommitdiffstats
path: root/aai-service/provider/src/test
diff options
context:
space:
mode:
authorRich Tabedzki <richard.tabedzki@att.com>2017-12-18 19:47:17 +0000
committerRich Tabedzki <richard.tabedzki@att.com>2017-12-18 19:48:23 +0000
commitc2f80d2048346ceab1eb09249665f7d82a875c2d (patch)
treec1c62cd523fae7459100f26914d32c203053e85e /aai-service/provider/src/test
parent890ad9dd6632cc2c2a125645afeee4724b3598be (diff)
Isolate deprecated code in CCSDK aai-service
Changes made: * removed deprecated methods no longer used in AAI Service feature. * Externalize inner class AAIExecutor as AAIClientRESTExecutor to improve clarity and modularity of code. Change-Id: Ifd68fb931fbf03e451462993b760a7c29e8a8e2d Issue-ID: CCSDK-137 Signed-off-by: Rich Tabedzki <richard.tabedzki@att.com>
Diffstat (limited to 'aai-service/provider/src/test')
-rwxr-xr-xaai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/EchoRequestTest.java5
-rwxr-xr-xaai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/GenericRequestTest.java38
-rwxr-xr-xaai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/RegressionTest.java30
-rwxr-xr-xaai-service/provider/src/test/resources/aaiclient.properties5
4 files changed, 40 insertions, 38 deletions
diff --git a/aai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/EchoRequestTest.java b/aai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/EchoRequestTest.java
index 9d1f6a530..327e4c652 100755
--- a/aai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/EchoRequestTest.java
+++ b/aai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/EchoRequestTest.java
@@ -25,6 +25,7 @@ import static org.junit.Assert.assertNotNull;
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
+import java.net.URISyntaxException;
import java.net.URL;
import org.junit.AfterClass;
@@ -66,9 +67,9 @@ public class EchoRequestTest {
try {
url = request.getRequestUrl("GET", null);
assertNotNull(url);
- } catch (UnsupportedEncodingException | MalformedURLException exc) {
+ } catch (UnsupportedEncodingException | MalformedURLException | URISyntaxException exc) {
LOG.error("Failed test", exc);
- }
+ }
}
diff --git a/aai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/GenericRequestTest.java b/aai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/GenericRequestTest.java
index 5f9fc7f8b..eb84cfdf3 100755
--- a/aai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/GenericRequestTest.java
+++ b/aai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/GenericRequestTest.java
@@ -27,6 +27,7 @@ import static org.junit.Assert.fail;
import java.io.File;
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
+import java.net.URISyntaxException;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
@@ -37,7 +38,6 @@ import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
import org.onap.ccsdk.sli.adaptors.aai.data.AAIDatum;
-import org.openecomp.aai.inventory.v11.GenericVnf;
import org.openecomp.aai.inventory.v11.LInterface;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -116,23 +116,23 @@ public class GenericRequestTest {
}
}
- @Test
- public void test003() {
- LOG.info("----------------------- Test: " + new Object(){}.getClass().getEnclosingMethod().getName() + " -----------------------");
- try
- {
- String vnf_id = "4718302b-7884-4959-a499-f470c62418ff";
-
- GenericVnf genericVnf = client.requestGenericVnfData(vnf_id);
-
- client.deleteGenericVnfData(vnf_id, genericVnf.getResourceVersion());
-
- }
- catch (Throwable e)
- {
- LOG.error("Caught exception", e);
- }
- }
+// @Test
+// public void test003() {
+// LOG.info("----------------------- Test: " + new Object(){}.getClass().getEnclosingMethod().getName() + " -----------------------");
+// try
+// {
+// String vnf_id = "4718302b-7884-4959-a499-f470c62418ff";
+//
+// GenericVnf genericVnf = client.requestGenericVnfData(vnf_id);
+//
+// client.deleteGenericVnfData(vnf_id, genericVnf.getResourceVersion());
+//
+// }
+// catch (Throwable e)
+// {
+// LOG.error("Caught exception", e);
+// }
+// }
@Test
@@ -143,7 +143,7 @@ public class GenericRequestTest {
try {
url = request.getRequestUrl("GET", null);
assertNotNull(url);
- } catch (UnsupportedEncodingException | MalformedURLException exc) {
+ } catch (UnsupportedEncodingException | MalformedURLException | URISyntaxException exc) {
LOG.error("Failed test", exc);
}
diff --git a/aai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/RegressionTest.java b/aai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/RegressionTest.java
index 4563adfca..0e81e5b52 100755
--- a/aai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/RegressionTest.java
+++ b/aai-service/provider/src/test/java/org/onap/ccsdk/sli/adaptors/aai/RegressionTest.java
@@ -75,21 +75,21 @@ public class RegressionTest {
LOG.info("----------------------- AAIResourceTest.tearDown -----------------------");
}
- @Test
- public void R1510Test05GenericVnfDataRequestDelete() {
- LOG.info("----------------------- Test: " + new Object(){}.getClass().getEnclosingMethod().getName() + " -----------------------");
- try
- {
- String vnf_id = "bpsx0001v-7071";
- boolean response = client.deleteGenericVnfData(vnf_id, null);
- assertTrue(response);
-
- }
- catch (Throwable e)
- {
- assert(true);
- }
- }
+// @Test
+// public void R1510Test05GenericVnfDataRequestDelete() {
+// LOG.info("----------------------- Test: " + new Object(){}.getClass().getEnclosingMethod().getName() + " -----------------------");
+// try
+// {
+// String vnf_id = "bpsx0001v-7071";
+// boolean response = client.deleteGenericVnfData(vnf_id, null);
+// assertTrue(response);
+//
+// }
+// catch (Throwable e)
+// {
+// assert(true);
+// }
+// }
@Test
public void R1604TestWanConnectorSave01Request()
diff --git a/aai-service/provider/src/test/resources/aaiclient.properties b/aai-service/provider/src/test/resources/aaiclient.properties
index 84d851a41..43f5fff5f 100755
--- a/aai-service/provider/src/test/resources/aaiclient.properties
+++ b/aai-service/provider/src/test/resources/aaiclient.properties
@@ -28,7 +28,7 @@
#
org.onap.ccsdk.sli.adaptors.aai.ssl.trust=/opt/bvc/tls-client/truststore.client.jks
org.onap.ccsdk.sli.adaptors.aai.ssl.trust.psswd=adminadmin
-org.onap.ccsdk.sli.adaptors.aai.ssl.key=/opt/bvc/tls-client/keystore.client.jks
+org.onap.ccsdk.sli.adaptors.aai.ssl.key=/opt/bvc/tls-client/keystore.client.p12
org.onap.ccsdk.sli.adaptors.aai.ssl.key.psswd=adminadmin
org.onap.ccsdk.sli.adaptors.aai.host.certificate.ignore=true
@@ -40,7 +40,8 @@ org.onap.ccsdk.sli.adaptors.aai.application=CCSDK
#
# Configuration file for A&AI Client
#
-org.onap.ccsdk.sli.adaptors.aai.uri=https://aai.api.simpledemo.openecomp.org:8443
+org.onap.ccsdk.sli.adaptors.aai.uri=https://au3txvcaaas10-eth2.auk3.aic.cip.att.com:8443
+#org.onap.ccsdk.sli.adaptors.aai.uri=https://aai.api.simpledemo.openecomp.org:8443
#org.onap.ccsdk.sli.adaptors.aai.uri=https://aai-int2.test.att.com:8443
#