Fix path in tests

pull/12008/head
Madhura Bhave 7 years ago
parent 0348889fd7
commit 85aeb5c00d

@ -69,14 +69,14 @@ public class SampleActuatorApplicationTests {
@Test @Test
public void testMetricsIsSecure() { public void testMetricsIsSecure() {
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
ResponseEntity<Map> entity = this.restTemplate.getForEntity("/metrics", ResponseEntity<Map> entity = this.restTemplate.getForEntity("/actuator/metrics",
Map.class); Map.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED); 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); 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); 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); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED);
} }

Loading…
Cancel
Save