Skip to content

Commit

Permalink
Fixes Cloud Foundry registration with uppercase letters in route
Browse files Browse the repository at this point in the history
Before this, the route was always lower-cased, but this makes the route registered with Spring Boot Admin not accessible. This changes to use the route as it is, and updates a test to include an uppercase letter in the route.
  • Loading branch information
Tommy Ludwig authored and joshiste committed Jun 11, 2018
1 parent 6a8975b commit d7712b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected String getServiceBaseUrl() {
return null;
}

String uri = cfApplicationProperties.getUris().get(0).toLowerCase();
String uri = cfApplicationProperties.getUris().get(0);
return "http://" + uri;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ public void setup() {
@Test
public void should_use_application_uri() {
when(pathMappedEndpoints.getPath("health")).thenReturn("/actuator/health");
cfApplicationProperties.setUris(singletonList("application"));
cfApplicationProperties.setUris(singletonList("application/Uppercase"));

Application app = factory.createApplication();

assertThat(app.getManagementUrl()).isEqualTo("http://application/actuator");
assertThat(app.getHealthUrl()).isEqualTo("http://application/actuator/health");
assertThat(app.getServiceUrl()).isEqualTo("http://application/");
assertThat(app.getManagementUrl()).isEqualTo("http://application/Uppercase/actuator");
assertThat(app.getHealthUrl()).isEqualTo("http://application/Uppercase/actuator/health");
assertThat(app.getServiceUrl()).isEqualTo("http://application/Uppercase/");
}

}

0 comments on commit d7712b2

Please sign in to comment.