Move all actuators under /application

Context path can be configured via `management.context-path`.

Closes gh-6886
This commit is contained in:
Madhura Bhave
2016-10-13 10:32:38 -07:00
parent 92468d4ffc
commit bcd79dd992
47 changed files with 242 additions and 186 deletions

View File

@@ -38,16 +38,16 @@ public class SampleHypermediaUiSecureApplicationTests {
@Test
public void links() {
String response = this.restTemplate.getForObject("/actuator", String.class);
String response = this.restTemplate.getForObject("/application", String.class);
assertThat(response).contains("\"_links\":");
}
@Test
public void testInsecureNestedPath() throws Exception {
ResponseEntity<String> entity = this.restTemplate.getForEntity("/env",
ResponseEntity<String> entity = this.restTemplate.getForEntity("/application/env",
String.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
ResponseEntity<String> user = this.restTemplate.getForEntity("/env/foo",
ResponseEntity<String> user = this.restTemplate.getForEntity("/application/env/foo",
String.class);
assertThat(user.getStatusCode()).isEqualTo(HttpStatus.OK);
assertThat(user.getBody()).contains("{\"foo\":");
@@ -55,7 +55,7 @@ public class SampleHypermediaUiSecureApplicationTests {
@Test
public void testSecurePath() throws Exception {
ResponseEntity<String> entity = this.restTemplate.getForEntity("/metrics",
ResponseEntity<String> entity = this.restTemplate.getForEntity("/application/metrics",
String.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED);
}