diff options
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"; |