From 327b17ab250b4c17cf3f91f5e4cd9bffd89f3d1e Mon Sep 17 00:00:00 2001 From: Marcus G K Williams Date: Wed, 7 Mar 2018 18:17:22 -0800 Subject: Reduce log noise/warnings format to conventions Reduce build log warnings by formatting tests to ONAP code conventions (removing tabs etc.) Issue-ID: SO-368 Change-Id: I48c6d359b83617aebeb79db4e30c1d72d31f7eec Signed-off-by: Marcus G K Williams --- .../mso/adapter_utils/tests/MsoHeatUtilsTest.java | 224 ++++++++++----------- 1 file changed, 111 insertions(+), 113 deletions(-) (limited to 'adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsTest.java') 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(); + } } -- cgit 1.2.3-korg