Skip to content

Commit ecaa634

Browse files
committed
Update path in actuator sample tests
1 parent c8951ae commit ecaa634

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/CorsSampleActuatorApplicationTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ public void setUp() throws Exception {
5151

5252
@Test
5353
public void sensitiveEndpointShouldReturnUnauthorized() throws Exception {
54-
ResponseEntity<Map> entity = this.testRestTemplate.getForEntity("/env", Map.class);
54+
ResponseEntity<Map> entity = this.testRestTemplate.getForEntity("/application/env", Map.class);
5555
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.UNAUTHORIZED);
5656
}
5757

5858
@Test
5959
public void preflightRequestForInsensitiveShouldReturnOk() throws Exception {
60-
RequestEntity<?> healthRequest = RequestEntity.options(new URI("/health"))
60+
RequestEntity<?> healthRequest = RequestEntity.options(new URI("/application/health"))
6161
.header("Origin","http://localhost:8080")
6262
.header("Access-Control-Request-Method", "GET")
6363
.build();
@@ -67,7 +67,7 @@ public void preflightRequestForInsensitiveShouldReturnOk() throws Exception {
6767

6868
@Test
6969
public void preflightRequestForSensitiveEndpointShouldReturnOk() throws Exception {
70-
RequestEntity<?> entity = RequestEntity.options(new URI("/env"))
70+
RequestEntity<?> entity = RequestEntity.options(new URI("/application/env"))
7171
.header("Origin","http://localhost:8080")
7272
.header("Access-Control-Request-Method", "GET")
7373
.build();
@@ -77,7 +77,7 @@ public void preflightRequestForSensitiveEndpointShouldReturnOk() throws Exceptio
7777

7878
@Test
7979
public void preflightRequestWhenCorsConfigInvalidShouldReturnForbidden() throws Exception {
80-
RequestEntity<?> entity = RequestEntity.options(new URI("/health"))
80+
RequestEntity<?> entity = RequestEntity.options(new URI("/application/health"))
8181
.header("Origin","http://localhost:9095")
8282
.header("Access-Control-Request-Method", "GET")
8383
.build();

0 commit comments

Comments
 (0)