diff options
author | xg353y <xg353y@intl.att.com> | 2017-04-11 13:30:42 +0200 |
---|---|---|
committer | xg353y <xg353y@intl.att.com> | 2017-04-11 15:34:19 +0200 |
commit | b6b7bef8bdcad15af01ac88a038dd763ce59f68f (patch) | |
tree | 399d39da23aaa37701e487df064e3e0c27709ef3 /adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests | |
parent | 19340cad94eeaa1b580f7c0c99531de499e8ca14 (diff) |
[MSO-8] Update the maven dependency
Update the maven depenency for sdc-distribution-client to cooperate with the sdc changes.
Change-Id: I2da936e5c40cb68c7181bb78307192dd5655b5dc
Signed-off-by: xg353y <xg353y@intl.att.com>
Diffstat (limited to 'adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests')
2 files changed, 39 insertions, 40 deletions
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/CloudConfigTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/CloudConfigTest.java index 8632d02164..6be668c056 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/CloudConfigTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/CloudConfigTest.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -39,14 +39,14 @@ import org.openecomp.mso.cloud.CloudSite; * */ public class CloudConfigTest { - + private static CloudConfig con; private static CloudConfigFactory cloudConfigFactory= new CloudConfigFactory(); - + public CloudConfigTest () { - + } - + /** * This method is called before any test occurs. * It creates a fake tree from scratch @@ -55,11 +55,11 @@ public class CloudConfigTest { public static final void prepare () { ClassLoader classLoader = CloudConfigTest.class.getClassLoader(); String config = classLoader.getResource("cloud_config.json").toString().substring(5); - + cloudConfigFactory.initializeCloudConfig(config,1); con = cloudConfigFactory.getCloudConfig(); } - + /** * This method implements a test for the getCloudConfig method. */ @@ -79,17 +79,19 @@ public class CloudConfigTest { CloudSite site1 = siteMap.get("MT"); CloudSite site2 = siteMap.get("DAN"); CloudSite site3 = siteMap.get("MTINJVCC101"); - + CloudSite site4 = siteMap.get("MTSNJA4LCP1"); + assertEquals (site1.getRegionId(), "regionOne"); assertEquals (site1.getIdentityServiceId(), "MT_KEYSTONE"); assertEquals (site2.getRegionId(), "RegionOne"); assertEquals (site2.getIdentityServiceId(), "DAN_KEYSTONE"); assertEquals (site3.getRegionId(), "regionTwo"); assertEquals (site3.getIdentityServiceId(), "MTINJVCC101_DCP"); - + assertEquals (site4.getRegionId(), "mtsnjlcp1"); + assertEquals (site4.getIdentityServiceId(), "MTSNJA3DCP1"); } - - + + /** * This method implements a test for the getIdentityServices method. */ @@ -97,12 +99,12 @@ public class CloudConfigTest { public final void testGetIdentityServices () { Map<String,CloudIdentity> identityMap = con.getIdentityServices (); assertNotNull(identityMap); - + CloudIdentity identity1 = identityMap.get("MT_KEYSTONE"); CloudIdentity identity2 = identityMap.get("DAN_KEYSTONE"); CloudIdentity identity3 = identityMap.get("MTINJVCC101_DCP"); CloudIdentity identity4 = identityMap.get("MTSNJA3DCP1"); - + // assertEquals (identity1.getKeystoneUrl(), "http://localhost:5000/v2.0"); // assertEquals (identity1.getIdentityUrl(), "http://localhost:5000/v2.0"); assertEquals (identity1.getMsoId(), "john"); @@ -110,7 +112,7 @@ public class CloudConfigTest { assertEquals (identity1.getAdminTenant(), "admin"); assertEquals (identity1.getMemberRole(), "_member_"); assertEquals (identity1.hasTenantMetadata(), false); - + // assertEquals (identity2.getKeystoneUrl(), "http://localhost:5000/v2.0"); // assertEquals (identity2.getIdentityUrl(), "http://localhost:5000/v2.0"); assertEquals (identity2.getMsoId(), "mockId"); @@ -118,7 +120,7 @@ public class CloudConfigTest { assertEquals (identity2.getAdminTenant(), "service"); assertEquals (identity2.getMemberRole(), "_member_"); assertEquals (identity2.hasTenantMetadata(), false); - + // assertEquals (identity3.getKeystoneUrl(), "http://localhost:5000/v2.0"); // assertEquals (identity3.getIdentityUrl(), "http://localhost:5000/v2.0"); assertEquals (identity3.getMsoId(), "mockIdToo"); @@ -126,7 +128,7 @@ public class CloudConfigTest { assertEquals (identity3.getAdminTenant(), "service"); assertEquals (identity3.getMemberRole(), "admin"); assertEquals (identity3.hasTenantMetadata(), true); - + // assertEquals (identity4.getKeystoneUrl(), "https://localhost:5000/v2.0"); // assertEquals (identity4.getIdentityUrl(), "https://localhost:5000/v2.0"); assertEquals (identity4.getMsoId(), "mockIdToo"); @@ -136,7 +138,7 @@ public class CloudConfigTest { assertEquals (identity4.hasTenantMetadata(), true); } - + /** * This method implements a test for the getCloudSite method. */ @@ -146,9 +148,6 @@ public class CloudConfigTest { assertNotNull(site1); assertEquals (site1.getRegionId(), "regionOne"); assertEquals (site1.getIdentityServiceId(), "MT_KEYSTONE"); - - - } /** @@ -165,7 +164,7 @@ public class CloudConfigTest { assertEquals (identity1.getAdminTenant(), "admin"); assertEquals (identity1.getMemberRole(), "_member_"); assertEquals (identity1.hasTenantMetadata(), false); - + CloudIdentity identity2 = con.getIdentityService("Test"); assertNull(identity2); } 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 6f8a6e93d8..3427e42304 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 @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -47,45 +47,45 @@ 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() { 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); + msoHeatUtils = new MsoHeatUtils("NO_PROP",msoPropertiesFactory,cloudConfigFactory); } - + @Test - public final void testCreateStackBadCloudConfig () { + public final void testCreateStackBadCloudConfig () throws MsoStackAlreadyExists, MsoTenantNotFound, MsoException, MsoCloudSiteNotFound { try { msoHeatUtils.createStack ("DOESNOTEXIST", "test", "stackName", "test", new HashMap<String,Object> (), Boolean.TRUE, 10); - } catch (MsoException e) { + } catch (MsoCloudSiteNotFound e) { + + } - } - } - + @Test public final void testCreateStackFailedConnectionHeatClient () throws MsoStackAlreadyExists, MsoTenantNotFound, MsoException, MsoCloudSiteNotFound { try { msoHeatUtils.createStack ("MT", "test", "stackName", "test", new HashMap<String,Object> (), 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<String,Object> (), Boolean.TRUE, 10); } catch (MsoIOException e) { - + } - + } - - - + + + } |