diff options
author | Seshu Kumar M <seshu.kumar.m@huawei.com> | 2018-03-14 09:22:15 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-03-14 09:22:15 +0000 |
commit | 09f3630ea990197e9d7b669aa2d6a63ec397bf3e (patch) | |
tree | 6625d3e9ac31600d86bf54a50e75dba61cc2c82a /adapters/mso-vnf-adapter/src/test/java/org/openecomp | |
parent | a56de0e221751debd038aca5b6d20d8f9325d294 (diff) | |
parent | 38f720752af4d4aad8c4e467a288d9048659f688 (diff) |
Merge "AT&T 1712 and 1802 release code"
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.java | 25 |
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"; |