summaryrefslogtreecommitdiffstats
path: root/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsWithUpdateTest.java
diff options
context:
space:
mode:
authorRob Daugherty <rd472p@att.com>2018-03-09 15:02:18 -0500
committerRob Daugherty <rd472p@att.com>2018-03-09 15:08:14 -0500
commit96b5a685d0c3afddb632e4a68ca7483f933b55dc (patch)
tree246399de05a3d429bf45ef1e5af2b9b0218d99f3 /adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsWithUpdateTest.java
parent4475278c81668109b2b37a1d2720d8f2910641c4 (diff)
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 <rd472p@att.com>
Diffstat (limited to 'adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsWithUpdateTest.java')
-rw-r--r--adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsWithUpdateTest.java77
1 files changed, 38 insertions, 39 deletions
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<String, Object> stackInputs = new HashMap<>();
+ Map <String, Object> 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");
}
}
}