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. 8
      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

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

@ -57,11 +57,12 @@ public class SimpleUrlHandlerCorsTests extends BaseWebClientTests { @@ -57,11 +57,12 @@ public class SimpleUrlHandlerCorsTests extends BaseWebClientTests {
assertThat(bodyToMono.block()).isNull();
assertThat(asHttpHeaders.getAccessControlAllowOrigin())
.as("Missing header value in response: "
+ HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN).isEqualTo("*");
+ HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)
.isEqualTo("*");
assertThat(asHttpHeaders.getAccessControlAllowMethods())
.as("Missing header value in response: "
+ HttpHeaders.ACCESS_CONTROL_ALLOW_METHODS)
.isEqualTo(Arrays.asList(new HttpMethod[] {HttpMethod.GET}));
.isEqualTo(Arrays.asList(new HttpMethod[] { HttpMethod.GET }));
assertThat(clientResponse.statusCode()).as("Pre Flight call failed.")
.isEqualTo(HttpStatus.OK);
}
@ -76,7 +77,8 @@ public class SimpleUrlHandlerCorsTests extends BaseWebClientTests { @@ -76,7 +77,8 @@ public class SimpleUrlHandlerCorsTests extends BaseWebClientTests {
assertThat(bodyToMono.block()).isNotNull();
assertThat(asHttpHeaders.getAccessControlAllowOrigin())
.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.")
.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 @@ -208,12 +208,10 @@ public class RetryGatewayFilterFactoryIntegrationTests extends BaseWebClientTest
.uri(uri))
.route("retry_with_backoff", r -> r.host("**.retrywithbackoff.org")
.filters(f -> f.prefixPath("/httpbin")
.retry(config -> {
config.setRetries(2).setBackoff(
Duration.ofMillis(100), null, 2, true);
}))
.uri(uri))
.filters(f -> f.prefixPath("/httpbin").retry(config -> {
config.setRetries(2).setBackoff(Duration.ofMillis(100),
null, 2, true);
})).uri(uri))
.route("retry_with_loadbalancer",
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 { @@ -359,8 +359,7 @@ public class ProductionConfigurationTests {
@PostMapping("/proxy/no-body")
public ResponseEntity<Foo> noBody(ProxyExchange<Foo> proxy) throws Exception {
return proxy.uri(home.toString() + "/foos")
.post();
return proxy.uri(home.toString() + "/foos").post();
}
@GetMapping("/forward/**")

Loading…
Cancel
Save