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