aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-vnf-adapter/src/test/java/org/openecomp
diff options
context:
space:
mode:
authorRob Daugherty <rd472p@att.com>2018-03-14 02:07:32 -0400
committerRob Daugherty <rd472p@att.com>2018-03-14 04:08:41 -0400
commit38f720752af4d4aad8c4e467a288d9048659f688 (patch)
treee81066a8b5c77272e30fb57a64999573c4db4d86 /adapters/mso-vnf-adapter/src/test/java/org/openecomp
parentaee3d223f92a6f250f43e17558a2dfd576ff7294 (diff)
AT&T 1712 and 1802 release code
This is code from AT&T's 1712 and 1802 releases. Change-Id: Ie1e85851e94bc66c4d9514a0226c221939531a04 Issue-ID: SO-425 Signed-off-by: Rob Daugherty <rd472p@att.com>
Diffstat (limited to 'adapters/mso-vnf-adapter/src/test/java/org/openecomp')
-rw-r--r--adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/QueryTest.java25
1 files changed, 24 insertions, 1 deletions
diff --git a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/QueryTest.java b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/QueryTest.java
index d898a6547e..282b3b15cd 100644
--- a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/QueryTest.java
+++ b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/QueryTest.java
@@ -28,6 +28,7 @@ import java.util.Map;
import javax.xml.ws.Holder;
import mockit.Mock;
import mockit.MockUp;
+import org.junit.Ignore;
import org.junit.Test;
import org.openecomp.mso.adapters.vnf.MsoVnfAdapter;
import org.openecomp.mso.adapters.vnf.MsoVnfAdapterImpl;
@@ -38,6 +39,10 @@ import org.openecomp.mso.openstack.beans.VnfStatus;
import org.openecomp.mso.openstack.exceptions.MsoException;
import org.openecomp.mso.openstack.utils.MsoHeatUtils;
+import org.openecomp.mso.cloud.CloudConfigFactory;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+
public class QueryTest {
@Test
@@ -95,9 +100,27 @@ public class QueryTest {
}
@Test(expected = VnfException.class)
+ // @Ignore // 1802 merge
public void testQueryVnfWithException() throws VnfException {
{
- MsoVnfAdapter vnfAdapter = new MsoVnfAdapterImpl();
+ String propFile = MsoJavaProperties.class.getClassLoader().getResource("mso.properties").getPath();
+ String cloudConfigJsonFilePath = MsoJavaProperties.class.getClassLoader().getResource("cloud_config.json").getPath();
+
+ MsoPropertiesFactory msoPropFactory = new MsoPropertiesFactory();
+ CloudConfigFactory cloudConfigFact = new CloudConfigFactory();
+ try {
+ msoPropFactory.initializeMsoProperties("MSO_PROP_VNF_ADAPTER", propFile);
+ cloudConfigFact.initializeCloudConfig(cloudConfigJsonFilePath, 1);
+ } catch (org.openecomp.mso.properties.MsoPropertiesException e) {
+ // System.err.println("!?!?!?!! mso config exception: " + e);
+ // e.printStackTrace();
+ } catch (org.openecomp.mso.openstack.exceptions.MsoCloudIdentityNotFound e) {
+ // System.err.println("!?!?!?!! cloud config exception: " + e);
+ // e.printStackTrace();
+ }
+
+ MsoVnfAdapter vnfAdapter = new MsoVnfAdapterImpl(msoPropFactory, cloudConfigFact);
+
String cloudId = "MT";
String tenantId = "MSO_Test";
String vnfName = "VNF_TEST1";