|
|
|
@ -216,9 +216,9 @@ public class GatewayControllerEndpointTests {
@@ -216,9 +216,9 @@ public class GatewayControllerEndpointTests {
|
|
|
|
|
testRouteDefinition.setUri(URI.create("example.org")); |
|
|
|
|
|
|
|
|
|
testClient.post().uri("http://localhost:" + port + "/actuator/gateway/routes/no-scheme-test-route") |
|
|
|
|
.accept(MediaType.APPLICATION_JSON).body(BodyInserters.fromValue(testRouteDefinition)).exchange() |
|
|
|
|
.expectStatus().isBadRequest().expectBody().jsonPath("$.message") |
|
|
|
|
.isEqualTo("The URI format [example.org] is incorrect, scheme can not be empty"); |
|
|
|
|
.accept(MediaType.APPLICATION_JSON).body(BodyInserters.fromValue(testRouteDefinition)).exchange() |
|
|
|
|
.expectStatus().isBadRequest().expectBody().jsonPath("$.message") |
|
|
|
|
.isEqualTo("The URI format [example.org] is incorrect, scheme can not be empty"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@ -228,9 +228,8 @@ public class GatewayControllerEndpointTests {
@@ -228,9 +228,8 @@ public class GatewayControllerEndpointTests {
|
|
|
|
|
testRouteDefinition.setUri(null); |
|
|
|
|
|
|
|
|
|
testClient.post().uri("http://localhost:" + port + "/actuator/gateway/routes/no-scheme-test-route") |
|
|
|
|
.accept(MediaType.APPLICATION_JSON).body(BodyInserters.fromValue(testRouteDefinition)).exchange() |
|
|
|
|
.expectStatus().isBadRequest().expectBody().jsonPath("$.message") |
|
|
|
|
.isEqualTo("The URI can not be empty"); |
|
|
|
|
.accept(MediaType.APPLICATION_JSON).body(BodyInserters.fromValue(testRouteDefinition)).exchange() |
|
|
|
|
.expectStatus().isBadRequest().expectBody().jsonPath("$.message").isEqualTo("The URI can not be empty"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|