mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Fix path in tests
This commit is contained in:
parent
0348889fd7
commit
85aeb5c00d
@ -69,14 +69,14 @@ public class SampleActuatorApplicationTests {
|
||||
@Test
|
||||
public void testMetricsIsSecure() {
|
||||
@SuppressWarnings("rawtypes")
|
||||
ResponseEntity<Map> entity = this.restTemplate.getForEntity("/metrics",
|
||||
ResponseEntity<Map> entity = this.restTemplate.getForEntity("/actuator/metrics",
|
||||
Map.class);
|
||||
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED);
|
||||
entity = this.restTemplate.getForEntity("/metrics/", Map.class);
|
||||
entity = this.restTemplate.getForEntity("/actuator/metrics/", Map.class);
|
||||
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED);
|
||||
entity = this.restTemplate.getForEntity("/metrics/foo", Map.class);
|
||||
entity = this.restTemplate.getForEntity("/actuator/metrics/foo", Map.class);
|
||||
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED);
|
||||
entity = this.restTemplate.getForEntity("/metrics.json", Map.class);
|
||||
entity = this.restTemplate.getForEntity("/actuator/metrics.json", Map.class);
|
||||
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user