Search in sources :

Example 1 with SystemBootstrapInfo

use of org.apache.servicecomb.deployment.SystemBootstrapInfo in project java-chassis by ServiceComb.

the class TestConfigCenterDefaultDeploymentProvider method testConfiguration.

@Test
public void testConfiguration() {
    ConfigCenterDefaultDeploymentProvider.setConfiguration(ConfigUtil.createLocalConfig());
    SystemBootstrapInfo info = Deployment.getSystemBootStrapInfo(ConfigCenterDefaultDeploymentProvider.SYSTEM_KEY_CONFIG_CENTER);
    Assert.assertEquals(info.getAccessURL().get(0), "https://172.16.8.7:30103");
    Assert.assertNull(Deployment.getSystemBootStrapInfo("wrong"));
}
Also used : SystemBootstrapInfo(org.apache.servicecomb.deployment.SystemBootstrapInfo) Test(org.junit.Test)

Example 2 with SystemBootstrapInfo

use of org.apache.servicecomb.deployment.SystemBootstrapInfo in project java-chassis by ServiceComb.

the class TestConfigCenterDefaultDeploymentProvider method testConfigurationEnv.

@Test
public void testConfigurationEnv() {
    System.setProperty("servicecomb.config.client.serverUri", "https://localhost:9988");
    ConfigCenterDefaultDeploymentProvider.setConfiguration(ConfigUtil.createLocalConfig());
    SystemBootstrapInfo info = Deployment.getSystemBootStrapInfo(ConfigCenterDefaultDeploymentProvider.SYSTEM_KEY_CONFIG_CENTER);
    Assert.assertEquals(info.getAccessURL().get(0), "https://localhost:9988");
    System.getProperties().remove("servicecomb.config.client.serverUri");
}
Also used : SystemBootstrapInfo(org.apache.servicecomb.deployment.SystemBootstrapInfo) Test(org.junit.Test)

Example 3 with SystemBootstrapInfo

use of org.apache.servicecomb.deployment.SystemBootstrapInfo in project java-chassis by ServiceComb.

the class TestKieCenterDefaultDeploymentProvider method testConfiguration.

@Test
public void testConfiguration() {
    KieCenterDefaultDeploymentProvider.setConfiguration(ConfigUtil.createLocalConfig());
    SystemBootstrapInfo info = Deployment.getSystemBootStrapInfo(KieCenterDefaultDeploymentProvider.SYSTEM_KEY_KIE_CENTER);
    Assert.assertEquals(info.getAccessURL().get(0), "https://172.16.8.7:30110");
    Assert.assertNull(Deployment.getSystemBootStrapInfo("wrong"));
}
Also used : SystemBootstrapInfo(org.apache.servicecomb.deployment.SystemBootstrapInfo) Test(org.junit.Test)

Example 4 with SystemBootstrapInfo

use of org.apache.servicecomb.deployment.SystemBootstrapInfo in project java-chassis by ServiceComb.

the class TestServiceCenterDefaultDeploymentProvider method testConfiguration.

@Test
public void testConfiguration() {
    ServiceCenterDefaultDeploymentProvider.setConfiguration(ConfigUtil.createLocalConfig());
    SystemBootstrapInfo info = Deployment.getSystemBootStrapInfo(ServiceCenterDefaultDeploymentProvider.SYSTEM_KEY_SERVICE_CENTER);
    Assert.assertEquals(info.getAccessURL().get(0), "http://127.0.0.1:30100");
    Assert.assertNull(Deployment.getSystemBootStrapInfo("wrong"));
}
Also used : SystemBootstrapInfo(org.apache.servicecomb.deployment.SystemBootstrapInfo) Test(org.junit.Test)

Example 5 with SystemBootstrapInfo

use of org.apache.servicecomb.deployment.SystemBootstrapInfo in project java-chassis by ServiceComb.

the class TestServiceCenterDefaultDeploymentProvider method testConfigurationEnvTwo.

@Test
public void testConfigurationEnvTwo() {
    System.setProperty("servicecomb.service.registry.address", "http://127.0.0.1:30100,http://127.0.0.2:30100");
    ServiceCenterDefaultDeploymentProvider.setConfiguration(ConfigUtil.createLocalConfig());
    SystemBootstrapInfo info = Deployment.getSystemBootStrapInfo(ServiceCenterDefaultDeploymentProvider.SYSTEM_KEY_SERVICE_CENTER);
    Assert.assertEquals(info.getAccessURL().size(), 2);
    Assert.assertEquals(info.getAccessURL().get(0), "http://127.0.0.1:30100");
    Assert.assertEquals(info.getAccessURL().get(1), "http://127.0.0.2:30100");
    System.getProperties().remove("servicecomb.service.registry.address");
}
Also used : SystemBootstrapInfo(org.apache.servicecomb.deployment.SystemBootstrapInfo) Test(org.junit.Test)

Aggregations

SystemBootstrapInfo (org.apache.servicecomb.deployment.SystemBootstrapInfo)30 Test (org.junit.Test)18 ArrayList (java.util.ArrayList)2