Fix path in tests

pull/12008/head
Madhura Bhave 7 years ago
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…
Cancel
Save