From 96b5a685d0c3afddb632e4a68ca7483f933b55dc Mon Sep 17 00:00:00 2001 From: Rob Daugherty Date: Fri, 9 Mar 2018 15:02:18 -0500 Subject: Revert Reduce log noise/warnings This reverts commit 327b17ab250b4c17cf3f91f5e4cd9bffd89f3d1e. It is seriously impeding our ability complete the promised merge of AT&T 1802 code. While I'm all for coding standards, if we are serious about using spaces instead of tabs, then I think we need to (1) agree with the community when this will happen, (2) do consistently in all files, and (3) enforce it. Change-Id: Ib9b996f6b6c7d81ac9ac95d58b0c7d8cc39675ff Issue-ID: SO-368 Signed-off-by: Rob Daugherty --- .../tests/MsoHeatUtilsWithUpdateTest.java | 77 +++++++++++----------- 1 file changed, 38 insertions(+), 39 deletions(-) (limited to 'adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsWithUpdateTest.java') diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsWithUpdateTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsWithUpdateTest.java index 47ffff8941..62043e83b8 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsWithUpdateTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsWithUpdateTest.java @@ -27,7 +27,6 @@ import java.util.HashMap; import java.util.Map; import java.util.Optional; - import org.junit.Before; import org.junit.Ignore; import org.junit.Test; @@ -51,86 +50,86 @@ import com.woorea.openstack.base.client.OpenStackConnectException; @RunWith(MockitoJUnitRunner.class) public class MsoHeatUtilsWithUpdateTest { - public static MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory(); - public static CloudConfigFactory cloudConfigFactory = new CloudConfigFactory(); - + public static MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory(); + public static CloudConfigFactory cloudConfigFactory = new CloudConfigFactory(); + @Mock CloudConfig cloudConfig; @InjectMocks - MsoHeatUtilsWithUpdate util = new MsoHeatUtilsWithUpdate("NO_PROP", msoPropertiesFactory, cloudConfigFactory); + MsoHeatUtilsWithUpdate util=new MsoHeatUtilsWithUpdate("NO_PROP",msoPropertiesFactory,cloudConfigFactory); private CloudSite cloudSite; @Before - public void init() { - cloudSite = new CloudSite(); - cloudSite.setId("cloud"); - CloudIdentity cloudIdentity = new CloudIdentity(); + public void init () { + cloudSite = new CloudSite (); + cloudSite.setId ("cloud"); + CloudIdentity cloudIdentity = new CloudIdentity (); cloudIdentity.setIdentityServerType(IdentityServerType.KEYSTONE); - cloudIdentity.setKeystoneUrl("toto"); - cloudIdentity.setMsoPass(CloudIdentity.encryptPassword("mockId")); - cloudSite.setIdentityService(cloudIdentity); - when(cloudConfig.getCloudSite("cloud")).thenReturn(Optional.of(cloudSite)); - when(cloudConfig.getCloudSite("none")).thenReturn(Optional.empty()); + cloudIdentity.setKeystoneUrl ("toto"); + cloudIdentity.setMsoPass (CloudIdentity.encryptPassword ("mockId")); + cloudSite.setIdentityService (cloudIdentity); + when(cloudConfig.getCloudSite("cloud")).thenReturn (Optional.of(cloudSite)); + when(cloudConfig.getCloudSite("none")).thenReturn (Optional.empty()); } @Test @Ignore - public void testUpdateStack() { + public void testUpdateStack () { // Heat heat = Mockito.mock (Heat.class); - Map stackInputs = new HashMap<>(); + Map stackInputs = new HashMap <> (); try { - util.updateStack("none", "tenantId", "stackName", "heatTemplate", stackInputs, false, 1); + util.updateStack ("none", "tenantId", "stackName", "heatTemplate", stackInputs, false, 1); } catch (MsoException e) { if (e instanceof MsoCloudSiteNotFound) { // Ok } else { - e.printStackTrace(); - fail("Exception caught"); + e.printStackTrace (); + fail ("Exception caught"); } } try { - util.updateStack("cloud", "tenantId", "stackName", "heatTemplate", stackInputs, false, 1); + util.updateStack ("cloud", "tenantId", "stackName", "heatTemplate", stackInputs, false, 1); } catch (MsoException e) { - if (e instanceof MsoIOException && e.getCause() != null - && e.getCause() instanceof OpenStackConnectException) { + if (e instanceof MsoIOException && e.getCause () != null + && e.getCause () instanceof OpenStackConnectException) { // Ok, we were able to go up to the connection to OpenStack } else { - e.printStackTrace(); - fail("Exception caught"); + e.printStackTrace (); + fail ("Exception caught"); } } try { - util.updateStack("cloud", "tenantId", "stackName", "heatTemplate", stackInputs, false, 1, "environment"); + util.updateStack ("cloud", "tenantId", "stackName", "heatTemplate", stackInputs, false, 1, "environment"); } catch (MsoException e) { - if (e instanceof MsoIOException && e.getCause() != null - && e.getCause() instanceof OpenStackConnectException) { + if (e instanceof MsoIOException && e.getCause () != null + && e.getCause () instanceof OpenStackConnectException) { // Ok, we were able to go up to the connection to OpenStack } else { - e.printStackTrace(); - fail("Exception caught"); + e.printStackTrace (); + fail ("Exception caught"); } } try { - util.updateStack("cloud", "tenantId", "stackName", "heatTemplate", stackInputs, false, 1, "environment", null); + util.updateStack ("cloud", "tenantId", "stackName", "heatTemplate", stackInputs, false, 1, "environment", null); } catch (MsoException e) { - if (e instanceof MsoIOException && e.getCause() != null - && e.getCause() instanceof OpenStackConnectException) { + if (e instanceof MsoIOException && e.getCause () != null + && e.getCause () instanceof OpenStackConnectException) { // Ok, we were able to go up to the connection to OpenStack } else { - e.printStackTrace(); - fail("Exception caught"); + e.printStackTrace (); + fail ("Exception caught"); } } try { - util.updateStack("cloud", "tenantId", "stackName", "heatTemplate", stackInputs, false, 1, "environment", null, null); + util.updateStack ("cloud", "tenantId", "stackName", "heatTemplate", stackInputs, false, 1, "environment", null, null); } catch (MsoException e) { - if (e instanceof MsoIOException && e.getCause() != null - && e.getCause() instanceof OpenStackConnectException) { + if (e instanceof MsoIOException && e.getCause () != null + && e.getCause () instanceof OpenStackConnectException) { // Ok, we were able to go up to the connection to OpenStack } else { - e.printStackTrace(); - fail("Exception caught"); + e.printStackTrace (); + fail ("Exception caught"); } } } -- cgit 1.2.3-korg