use of org.apache.servicecomb.deployment.SystemBootstrapInfo in project incubator-servicecomb-java-chassis by apache.
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"));
}
use of org.apache.servicecomb.deployment.SystemBootstrapInfo in project incubator-servicecomb-java-chassis by apache.
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"));
}
use of org.apache.servicecomb.deployment.SystemBootstrapInfo in project incubator-servicecomb-java-chassis by apache.
the class TestServiceCenterDefaultDeploymentProvider method testConfigurationEnv.
@Test
public void testConfigurationEnv() {
System.setProperty("servicecomb.service.registry.address", "https://localhost:30100");
ServiceCenterDefaultDeploymentProvider.setConfiguration(ConfigUtil.createLocalConfig());
SystemBootstrapInfo info = Deployment.getSystemBootStrapInfo(ServiceCenterDefaultDeploymentProvider.SYSTEM_KEY_SERVICE_CENTER);
Assert.assertEquals(info.getAccessURL().get(0), "https://localhost:30100");
System.getProperties().remove("servicecomb.service.registry.address");
}
use of org.apache.servicecomb.deployment.SystemBootstrapInfo in project incubator-servicecomb-java-chassis by apache.
the class MonitorDefaultDeploymentProvider method getSystemBootStrapInfo.
@Override
public SystemBootstrapInfo getSystemBootStrapInfo(String systemKey) {
if (!systemKey.equals(MonitorConstant.SYSTEM_KEY_DASHBOARD_SERVICE)) {
return null;
}
List<String> msAddresses = ConfigUtil.parseArrayValue(configuration.getString(MonitorConstant.MONITOR_URI));
if (msAddresses.isEmpty()) {
return null;
}
SystemBootstrapInfo ms = new SystemBootstrapInfo();
ms.setAccessURL(msAddresses);
return ms;
}
use of org.apache.servicecomb.deployment.SystemBootstrapInfo in project incubator-servicecomb-java-chassis by apache.
the class ServiceCenterDefaultDeploymentProvider method getSystemBootStrapInfo.
@Override
public SystemBootstrapInfo getSystemBootStrapInfo(String systemKey) {
if (!systemKey.equals(SYSTEM_KEY_SERVICE_CENTER)) {
return null;
}
SystemBootstrapInfo sc = new SystemBootstrapInfo();
List<String> urls = ConfigUtil.parseArrayValue(configuration.getString("servicecomb.service.registry.address"));
if (urls.isEmpty()) {
urls = Arrays.asList("http://127.0.0.1:30100");
}
sc.setAccessURL(urls);
return sc;
}
Aggregations