Browse Source

formatting

pull/1212/head
Spencer Gibb 5 years ago
parent
commit
afa858af6e
No known key found for this signature in database
GPG Key ID: 7788A47380690861
  1. 6
      spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/cors/SimpleUrlHandlerCorsTests.java
  2. 10
      spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/filter/factory/RetryGatewayFilterFactoryIntegrationTests.java
  3. 3
      spring-cloud-gateway-mvc/src/test/java/org/springframework/cloud/gateway/mvc/ProductionConfigurationTests.java

6
spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/cors/SimpleUrlHandlerCorsTests.java

@ -57,7 +57,8 @@ public class SimpleUrlHandlerCorsTests extends BaseWebClientTests {
assertThat(bodyToMono.block()).isNull(); assertThat(bodyToMono.block()).isNull();
assertThat(asHttpHeaders.getAccessControlAllowOrigin()) assertThat(asHttpHeaders.getAccessControlAllowOrigin())
.as("Missing header value in response: " .as("Missing header value in response: "
+ HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN).isEqualTo("*"); + HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)
.isEqualTo("*");
assertThat(asHttpHeaders.getAccessControlAllowMethods()) assertThat(asHttpHeaders.getAccessControlAllowMethods())
.as("Missing header value in response: " .as("Missing header value in response: "
+ HttpHeaders.ACCESS_CONTROL_ALLOW_METHODS) + HttpHeaders.ACCESS_CONTROL_ALLOW_METHODS)
@ -76,7 +77,8 @@ public class SimpleUrlHandlerCorsTests extends BaseWebClientTests {
assertThat(bodyToMono.block()).isNotNull(); assertThat(bodyToMono.block()).isNotNull();
assertThat(asHttpHeaders.getAccessControlAllowOrigin()) assertThat(asHttpHeaders.getAccessControlAllowOrigin())
.as("Missing header value in response: " .as("Missing header value in response: "
+ HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN).isEqualTo("*"); + HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)
.isEqualTo("*");
assertThat(clientResponse.statusCode()).as("CORS request failed.") assertThat(clientResponse.statusCode()).as("CORS request failed.")
.isEqualTo(HttpStatus.NOT_FOUND); .isEqualTo(HttpStatus.NOT_FOUND);
} }

10
spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/filter/factory/RetryGatewayFilterFactoryIntegrationTests.java

@ -208,12 +208,10 @@ public class RetryGatewayFilterFactoryIntegrationTests extends BaseWebClientTest
.uri(uri)) .uri(uri))
.route("retry_with_backoff", r -> r.host("**.retrywithbackoff.org") .route("retry_with_backoff", r -> r.host("**.retrywithbackoff.org")
.filters(f -> f.prefixPath("/httpbin") .filters(f -> f.prefixPath("/httpbin").retry(config -> {
.retry(config -> { config.setRetries(2).setBackoff(Duration.ofMillis(100),
config.setRetries(2).setBackoff( null, 2, true);
Duration.ofMillis(100), null, 2, true); })).uri(uri))
}))
.uri(uri))
.route("retry_with_loadbalancer", .route("retry_with_loadbalancer",
r -> r.host("**.retrywithloadbalancer.org") r -> r.host("**.retrywithloadbalancer.org")

3
spring-cloud-gateway-mvc/src/test/java/org/springframework/cloud/gateway/mvc/ProductionConfigurationTests.java

@ -359,8 +359,7 @@ public class ProductionConfigurationTests {
@PostMapping("/proxy/no-body") @PostMapping("/proxy/no-body")
public ResponseEntity<Foo> noBody(ProxyExchange<Foo> proxy) throws Exception { public ResponseEntity<Foo> noBody(ProxyExchange<Foo> proxy) throws Exception {
return proxy.uri(home.toString() + "/foos") return proxy.uri(home.toString() + "/foos").post();
.post();
} }
@GetMapping("/forward/**") @GetMapping("/forward/**")

Loading…
Cancel
Save