|
|
@ -50,6 +50,7 @@ import org.springframework.http.HttpStatus;
|
|
|
|
import org.springframework.test.web.reactive.server.EntityExchangeResult;
|
|
|
|
import org.springframework.test.web.reactive.server.EntityExchangeResult;
|
|
|
|
import org.springframework.test.web.reactive.server.WebTestClient;
|
|
|
|
import org.springframework.test.web.reactive.server.WebTestClient;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
|
|
|
import org.springframework.web.reactive.function.client.ExchangeStrategies;
|
|
|
|
|
|
|
|
|
|
|
|
import static org.assertj.core.api.Assertions.assertThat;
|
|
|
|
import static org.assertj.core.api.Assertions.assertThat;
|
|
|
|
|
|
|
|
|
|
|
@ -159,7 +160,10 @@ public class WebMvcEndpointExposureIntegrationTests {
|
|
|
|
private WebTestClient createClient(AssertableWebApplicationContext context) {
|
|
|
|
private WebTestClient createClient(AssertableWebApplicationContext context) {
|
|
|
|
int port = context.getSourceApplicationContext(ServletWebServerApplicationContext.class).getWebServer()
|
|
|
|
int port = context.getSourceApplicationContext(ServletWebServerApplicationContext.class).getWebServer()
|
|
|
|
.getPort();
|
|
|
|
.getPort();
|
|
|
|
return WebTestClient.bindToServer().baseUrl("http://localhost:" + port).build();
|
|
|
|
ExchangeStrategies exchangeStrategies = ExchangeStrategies.builder()
|
|
|
|
|
|
|
|
.codecs((configurer) -> configurer.defaultCodecs().maxInMemorySize(512 * 1024)).build();
|
|
|
|
|
|
|
|
return WebTestClient.bindToServer().baseUrl("http://localhost:" + port).exchangeStrategies(exchangeStrategies)
|
|
|
|
|
|
|
|
.build();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private boolean isExposed(WebTestClient client, HttpMethod method, String path) throws Exception {
|
|
|
|
private boolean isExposed(WebTestClient client, HttpMethod method, String path) throws Exception {
|
|
|
|