use of de.codecentric.boot.admin.client.registration.DefaultApplicationFactory in project spring-boot-admin by codecentric.
the class DefaultApplicationFactoryTest method test_mgmtPortPath.
@Test
public void test_mgmtPortPath() {
management.setContextPath("/admin");
DefaultApplicationFactory factory = new DefaultApplicationFactory(client, management, server, "/alive");
publishApplicationReadyEvent(factory, 8080, 8081);
Application app = factory.createApplication();
assertThat(app.getManagementUrl(), is("http://" + getHostname() + ":8081/admin"));
assertThat(app.getHealthUrl(), is("http://" + getHostname() + ":8081/admin/alive"));
assertThat(app.getServiceUrl(), is("http://" + getHostname() + ":8080"));
}
Aggregations