package org.onap.so.cloud;
import static org.junit.Assert.*;
-
import java.util.Optional;
-
import org.junit.Test;
import org.onap.so.BaseTest;
import org.onap.so.db.catalog.beans.AuthenticationType;
*
*
*/
-public class CloudConfigTest extends BaseTest{
-
- @Autowired
- private CloudConfig con;
-
- /**
- * This method implements a test for the getCloudSite method.
- */
- @Test
- public final void testGetCloudSite () {
- CloudSite site1 = con.getCloudSite("MTN13").get();
-
- assertEquals ("mtn13", site1.getRegionId());
- assertEquals ("mtn13", site1.getIdentityServiceId());
- assertEquals ("MDT13", site1.getClli());
- assertEquals ("3.0", site1.getCloudVersion());
- }
-
+public class CloudConfigTest extends BaseTest {
- /**
- * This method implements a test for the getIdentityServices method.
- * @throws MsoException
- */
- @Test
- public final void testGetIdentityServices () throws MsoException {
+ @Autowired
+ private CloudConfig con;
- CloudIdentity identity1 = con.getIdentityService("mtn13");
+ /**
+ * This method implements a test for the getCloudSite method.
+ */
+ @Test
+ public final void testGetCloudSite() {
+ CloudSite site1 = con.getCloudSite("MTN13").get();
- assertEquals("m93945", identity1.getMsoId());
- assertEquals("93937EA01B94A10A49279D4572B48369", identity1.getMsoPass());
- assertEquals("admin", identity1.getAdminTenant());
- assertEquals("admin", identity1.getMemberRole());
- assertTrue(identity1.getIdentityUrl().contains("http://localhost:"));
- assertEquals(ServerType.KEYSTONE, identity1.getIdentityServerType());
- assertEquals(AuthenticationType.USERNAME_PASSWORD, identity1.getIdentityAuthenticationType());
+ assertEquals("mtn13", site1.getRegionId());
+ assertEquals("mtn13", site1.getIdentityServiceId());
+ assertEquals("MDT13", site1.getClli());
+ assertEquals("3.0", site1.getCloudVersion());
+ }
- }
+ /**
+ * This method implements a test for the getCloudSite method.
+ */
+ @Test
+ public final void testGetDefaultCloudSite() {
+ Optional<CloudSite> site = con.getCloudSite("NotThere");
+ assertTrue(site.isPresent());
+ CloudSite site1 = site.get();
+ assertEquals("NotThere", site1.getRegionId());
+ assertEquals("MDT13", site1.getClli());
+ assertEquals("NotThere", site1.getId());
+ }
- /**
- * This method implements a test for the getCloudSite method.
- */
- @Test
- public final void testGetDefaultCloudSite () {
- Optional<CloudSite> site = con.getCloudSite("NotThere");
- assertTrue(site.isPresent());
- CloudSite site1 = site.get();
- assertEquals ("NotThere", site1.getRegionId());
- assertEquals("MDT13", site1.getClli());
- assertEquals("NotThere", site1.getId());
- }
-
}