use of de.codecentric.boot.admin.client.registration.Application in project spring-boot-admin by codecentric.
the class DefaultApplicationFactoryTest method test_ssl.
@Test
public void test_ssl() {
server.setSsl(new Ssl());
server.getSsl().setEnabled(true);
publishApplicationReadyEvent(factory, 8080, null);
Application app = factory.createApplication();
assertThat(app.getManagementUrl(), is("https://" + getHostname() + ":8080"));
assertThat(app.getHealthUrl(), is("https://" + getHostname() + ":8080/health"));
assertThat(app.getServiceUrl(), is("https://" + getHostname() + ":8080"));
}
use of de.codecentric.boot.admin.client.registration.Application in project spring-boot-admin by codecentric.
the class DefaultApplicationFactoryTest method test_allcustom.
@Test
public void test_allcustom() {
client.setHealthUrl("http://health");
client.setManagementUrl("http://management");
client.setServiceUrl("http://service");
Application app = factory.createApplication();
assertThat(app.getServiceUrl(), is("http://service"));
assertThat(app.getManagementUrl(), is("http://management"));
assertThat(app.getHealthUrl(), is("http://health"));
}
use of de.codecentric.boot.admin.client.registration.Application in project spring-boot-admin by codecentric.
the class DefaultApplicationFactoryTest method test_preferIpAddress.
@Test
public void test_preferIpAddress() throws UnknownHostException {
client.setPreferIp(true);
server.setAddress(InetAddress.getByName("127.0.0.1"));
management.setAddress(InetAddress.getByName("127.0.0.2"));
publishApplicationReadyEvent(factory, 8080, 8081);
Application app = factory.createApplication();
assertThat(app.getManagementUrl(), is("http://127.0.0.2:8081"));
assertThat(app.getHealthUrl(), is("http://127.0.0.2:8081/health"));
assertThat(app.getServiceUrl(), is("http://127.0.0.1:8080"));
}
use of de.codecentric.boot.admin.client.registration.Application in project spring-boot-admin by codecentric.
the class DefaultApplicationFactoryTest method test_contextPath.
@Test
public void test_contextPath() {
server.setContextPath("app");
publishApplicationReadyEvent(factory, 80, null);
Application app = factory.createApplication();
assertThat(app.getManagementUrl(), is("http://" + getHostname() + ":80/app"));
assertThat(app.getHealthUrl(), is("http://" + getHostname() + ":80/app/health"));
assertThat(app.getServiceUrl(), is("http://" + getHostname() + ":80/app"));
}
use of de.codecentric.boot.admin.client.registration.Application in project spring-boot-admin by codecentric.
the class DefaultApplicationFactoryTest method test_contextPath_mgmtPath.
@Test
public void test_contextPath_mgmtPath() {
server.setContextPath("app");
management.setContextPath("/admin");
publishApplicationReadyEvent(factory, 8080, null);
Application app = factory.createApplication();
assertThat(app.getManagementUrl(), is("http://" + getHostname() + ":8080/app/admin"));
assertThat(app.getHealthUrl(), is("http://" + getHostname() + ":8080/app/admin/health"));
assertThat(app.getServiceUrl(), is("http://" + getHostname() + ":8080/app"));
}
Aggregations