From c15549ebfc6beabb399b68e365f7ad7c5d3d3edf Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Tue, 14 Jan 2020 09:26:45 +0100 Subject: [PATCH] WIP:itflux ALTERNATIVE FIX --- src/test/java/de/juplo/demo/DemoApplicationIT.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/test/java/de/juplo/demo/DemoApplicationIT.java b/src/test/java/de/juplo/demo/DemoApplicationIT.java index 1c628c4..674efc8 100644 --- a/src/test/java/de/juplo/demo/DemoApplicationIT.java +++ b/src/test/java/de/juplo/demo/DemoApplicationIT.java @@ -1,22 +1,21 @@ package de.juplo.demo; -import java.net.URI; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; import static org.mockserver.matchers.Times.exactly; import static org.mockserver.model.HttpForward.forward; import static org.mockserver.model.HttpRequest.request; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest; +import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.MediaType; -import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.web.reactive.server.WebTestClient; import org.springframework.web.reactive.function.client.WebClient; -@ExtendWith(SpringExtension.class) -@WebFluxTest +@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) +@EnableAutoConfiguration class DemoApplicationIT extends IntegrationTestBase { @Autowired @@ -33,7 +32,7 @@ class DemoApplicationIT extends IntegrationTestBase .withPort(NGINX.getMappedPort(80))); webClient .get() - .uri(URI.create("http://S.U.T/?path=test.txt")) + .uri("/?path=test.txt") .exchange() .expectStatus().isOk() .expectHeader().contentType(MediaType.TEXT_HTML) -- 2.20.1