Move all actuators under /application
Context path can be configured via `management.context-path`. Closes gh-6886
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user