aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsTest.java
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2018-03-09 10:00:26 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-09 10:00:26 +0000
commitf3b28a0aafd83a57d42afbf23c9f6fbe6f546db3 (patch)
tree5ecb2b2a78ab3139828db18de5f2a76d76c77519 /adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsTest.java
parent8d0b9eb56af520d28c423da76c0f0be02cb453c7 (diff)
parent327b17ab250b4c17cf3f91f5e4cd9bffd89f3d1e (diff)
Merge "Reduce log noise/warnings format to conventions"
Diffstat (limited to 'adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsTest.java')
-rw-r--r--adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsTest.java224
1 files changed, 111 insertions, 113 deletions
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsTest.java
index c2d4f9ba60..84b3fb4f91 100644
--- a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsTest.java
+++ b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsTest.java
@@ -40,119 +40,117 @@ import com.woorea.openstack.heat.model.CreateStackParam;
/**
* This class implements test methods of the MsoHeatUtils
- *
- *
*/
public class MsoHeatUtilsTest extends MsoCommonUtils {
- public static MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
- public static CloudConfigFactory cloudConfigFactory = new CloudConfigFactory();
- public static MsoHeatUtils msoHeatUtils;
-
- @BeforeClass
- public static final void loadClasses() throws MsoCloudIdentityNotFound {
- ClassLoader classLoader = CloudConfigTest.class.getClassLoader();
- String config = classLoader.getResource("cloud_config.json").toString().substring(5);
- cloudConfigFactory.initializeCloudConfig(config, 1);
- msoHeatUtils = new MsoHeatUtils("NO_PROP", msoPropertiesFactory, cloudConfigFactory);
- }
-
- @Test
- public final void testCreateStackBadCloudConfig()
- throws MsoStackAlreadyExists, MsoTenantNotFound, MsoException, MsoCloudSiteNotFound {
- try {
- msoHeatUtils.createStack("DOESNOTEXIST", "test", "stackName", "test", new HashMap<>(),
- Boolean.TRUE, 10);
- } catch (MsoCloudSiteNotFound e) {
-
- } catch (java.lang.NullPointerException npe) {
-
- }
-
- }
-
- @Test
- public final void testCreateStackFailedConnectionHeatClient()
- throws MsoStackAlreadyExists, MsoTenantNotFound, MsoException, MsoCloudSiteNotFound {
- try {
- msoHeatUtils.createStack("MT", "test", "stackName", "test", new HashMap<>(), Boolean.TRUE,
- 10);
- } catch (MsoIOException e) {
-
- }
-
- }
-
- @Test
- public final void testCreateStackFailedConnection()
- throws MsoStackAlreadyExists, MsoTenantNotFound, MsoException, MsoCloudSiteNotFound {
- try {
- msoHeatUtils.createStack("MT", "test", "stackName", "test", new HashMap<>(), Boolean.TRUE,
- 10);
- } catch (MsoIOException e) {
-
- }
-
- }
-
- @Test
- public final void createStackSuccessWithEnvironment() throws MsoException {
- try {
- msoHeatUtils.createStack("MT", "test", "stackName", "test", new HashMap<>(), Boolean.TRUE, 10,
- "environment");
- } catch (MsoIOException e) {
-
- }
-
- }
-
- @Test
- public final void createStackSuccessWithFiles() throws MsoException {
- try {
- msoHeatUtils.createStack("MT", "test", "stackName", "test", new HashMap<>(), Boolean.TRUE, 10,
- "environment", new HashMap<>());
- } catch (MsoIOException e) {
-
- }
-
- }
-
- @Test
- public final void createStackSuccessWithHeatFiles() throws MsoException {
- try {
- msoHeatUtils.createStack("MT", "test", "stackName", "test", new HashMap<>(), Boolean.TRUE, 10,
- "environment", new HashMap<>(), new HashMap<>());
- } catch (MsoIOException e) {
-
- }
- }
-
- @Test
- public final void requestToStringBuilderTest() {
- CreateStackParam param = new CreateStackParam();
- param.setDisableRollback(false);
- param.setEnvironment("environment");
- param.setFiles(new HashMap<>());
- param.setParameters(new HashMap<>());
- param.setStackName("stackName");
- param.setTemplate("template");
- param.setTemplateUrl("http://templateUrl");
- param.setTimeoutMinutes(1);
-
- msoHeatUtils.requestToStringBuilder(param);
- }
-
- @Test
- public final void heatCacheResetTest() {
- msoHeatUtils.heatCacheReset();
- }
-
- @Test
- public final void expireHeatClientTest() {
- msoHeatUtils.expireHeatClient("tenantId", "cloudId");
- }
-
- @Test
- public final void heatCacheCleanupTest() {
- msoHeatUtils.heatCacheCleanup();
- }
+ public static MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+ public static CloudConfigFactory cloudConfigFactory = new CloudConfigFactory();
+ public static MsoHeatUtils msoHeatUtils;
+
+ @BeforeClass
+ public static final void loadClasses() throws MsoCloudIdentityNotFound {
+ ClassLoader classLoader = CloudConfigTest.class.getClassLoader();
+ String config = classLoader.getResource("cloud_config.json").toString().substring(5);
+ cloudConfigFactory.initializeCloudConfig(config, 1);
+ msoHeatUtils = new MsoHeatUtils("NO_PROP", msoPropertiesFactory, cloudConfigFactory);
+ }
+
+ @Test
+ public final void testCreateStackBadCloudConfig()
+ throws MsoStackAlreadyExists, MsoTenantNotFound, MsoException, MsoCloudSiteNotFound {
+ try {
+ msoHeatUtils.createStack("DOESNOTEXIST", "test", "stackName", "test", new HashMap<>(),
+ Boolean.TRUE, 10);
+ } catch (MsoCloudSiteNotFound e) {
+
+ } catch (java.lang.NullPointerException npe) {
+
+ }
+
+ }
+
+ @Test
+ public final void testCreateStackFailedConnectionHeatClient()
+ throws MsoStackAlreadyExists, MsoTenantNotFound, MsoException, MsoCloudSiteNotFound {
+ try {
+ msoHeatUtils.createStack("MT", "test", "stackName", "test", new HashMap<>(), Boolean.TRUE,
+ 10);
+ } catch (MsoIOException e) {
+
+ }
+
+ }
+
+ @Test
+ public final void testCreateStackFailedConnection()
+ throws MsoStackAlreadyExists, MsoTenantNotFound, MsoException, MsoCloudSiteNotFound {
+ try {
+ msoHeatUtils.createStack("MT", "test", "stackName", "test", new HashMap<>(), Boolean.TRUE,
+ 10);
+ } catch (MsoIOException e) {
+
+ }
+
+ }
+
+ @Test
+ public final void createStackSuccessWithEnvironment() throws MsoException {
+ try {
+ msoHeatUtils.createStack("MT", "test", "stackName", "test", new HashMap<>(), Boolean.TRUE, 10,
+ "environment");
+ } catch (MsoIOException e) {
+
+ }
+
+ }
+
+ @Test
+ public final void createStackSuccessWithFiles() throws MsoException {
+ try {
+ msoHeatUtils.createStack("MT", "test", "stackName", "test", new HashMap<>(), Boolean.TRUE, 10,
+ "environment", new HashMap<>());
+ } catch (MsoIOException e) {
+
+ }
+
+ }
+
+ @Test
+ public final void createStackSuccessWithHeatFiles() throws MsoException {
+ try {
+ msoHeatUtils.createStack("MT", "test", "stackName", "test", new HashMap<>(), Boolean.TRUE, 10,
+ "environment", new HashMap<>(), new HashMap<>());
+ } catch (MsoIOException e) {
+
+ }
+ }
+
+ @Test
+ public final void requestToStringBuilderTest() {
+ CreateStackParam param = new CreateStackParam();
+ param.setDisableRollback(false);
+ param.setEnvironment("environment");
+ param.setFiles(new HashMap<>());
+ param.setParameters(new HashMap<>());
+ param.setStackName("stackName");
+ param.setTemplate("template");
+ param.setTemplateUrl("http://templateUrl");
+ param.setTimeoutMinutes(1);
+
+ msoHeatUtils.requestToStringBuilder(param);
+ }
+
+ @Test
+ public final void heatCacheResetTest() {
+ msoHeatUtils.heatCacheReset();
+ }
+
+ @Test
+ public final void expireHeatClientTest() {
+ msoHeatUtils.expireHeatClient("tenantId", "cloudId");
+ }
+
+ @Test
+ public final void heatCacheCleanupTest() {
+ msoHeatUtils.heatCacheCleanup();
+ }
}