From: Kai Moritz Date: Tue, 14 Jan 2020 08:26:45 +0000 (+0100) Subject: WIP:itflux ALTERNATIVE FIX X-Git-Tag: wip-it~9 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=c15549ebfc6beabb399b68e365f7ad7c5d3d3edf;p=demos%2Ftesting WIP:itflux ALTERNATIVE FIX --- 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)