diff --git a/http/rest-client-reactive/src/main/java/io/quarkus/ts/http/restclient/reactive/files/FileResource.java b/http/rest-client-reactive/src/main/java/io/quarkus/ts/http/restclient/reactive/files/FileResource.java index 797326974..617effbf7 100644 --- a/http/rest-client-reactive/src/main/java/io/quarkus/ts/http/restclient/reactive/files/FileResource.java +++ b/http/rest-client-reactive/src/main/java/io/quarkus/ts/http/restclient/reactive/files/FileResource.java @@ -10,9 +10,9 @@ import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; import org.jboss.resteasy.reactive.MultipartForm; +import org.jboss.resteasy.reactive.RestResponse; import io.quarkus.logging.Log; import io.smallrye.mutiny.Uni; @@ -51,10 +51,10 @@ public Uni uploadMultipart(@MultipartForm FileWrapper body) { @GET @Produces(MediaType.MULTIPART_FORM_DATA) @Path("/download-multipart") - public Response downloadMultipart() { + public RestResponse downloadMultipart() { FileWrapper wrapper = new FileWrapper(); wrapper.file = FILE; - return Response.ok(wrapper).build(); + return RestResponse.ok(wrapper); } @GET diff --git a/http/rest-client-reactive/src/main/java/io/quarkus/ts/http/restclient/reactive/proxy/ProxyClient.java b/http/rest-client-reactive/src/main/java/io/quarkus/ts/http/restclient/reactive/proxy/ProxyClient.java index fb9db8265..93c91d983 100644 --- a/http/rest-client-reactive/src/main/java/io/quarkus/ts/http/restclient/reactive/proxy/ProxyClient.java +++ b/http/rest-client-reactive/src/main/java/io/quarkus/ts/http/restclient/reactive/proxy/ProxyClient.java @@ -4,6 +4,7 @@ import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; import org.eclipse.microprofile.rest.client.annotation.RegisterClientHeaders; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; @@ -22,7 +23,7 @@ public interface ProxyClient { @GET @Path("/example.txt") @Produces(MediaType.TEXT_PLAIN) - Uni getText(); + Uni getText(); @GET @Path("/auth") diff --git a/http/rest-client-reactive/src/main/java/io/quarkus/ts/http/restclient/reactive/proxy/ProxyResource.java b/http/rest-client-reactive/src/main/java/io/quarkus/ts/http/restclient/reactive/proxy/ProxyResource.java index 29214137f..c3785d834 100644 --- a/http/rest-client-reactive/src/main/java/io/quarkus/ts/http/restclient/reactive/proxy/ProxyResource.java +++ b/http/rest-client-reactive/src/main/java/io/quarkus/ts/http/restclient/reactive/proxy/ProxyResource.java @@ -5,6 +5,7 @@ import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; import org.eclipse.microprofile.rest.client.inject.RestClient; @@ -27,7 +28,7 @@ public Uni getRoot() { @GET @Path("/banned") @Produces(MediaType.TEXT_PLAIN) - public Uni getBanned() { + public Uni getBanned() { return client.getText(); } diff --git a/http/rest-client-reactive/src/main/resources/proxy.properties b/http/rest-client-reactive/src/main/resources/proxy.properties index 075eab02d..967cc7213 100644 --- a/http/rest-client-reactive/src/main/resources/proxy.properties +++ b/http/rest-client-reactive/src/main/resources/proxy.properties @@ -3,4 +3,5 @@ quarkus.rest-client."io.quarkus.ts.http.restclient.reactive.proxy.ProxyClient".p quarkus.rest-client."io.quarkus.ts.http.restclient.reactive.proxy.ProxyClient".proxy-user=proxyuser quarkus.rest-client."io.quarkus.ts.http.restclient.reactive.proxy.ProxyClient".proxy-password=proxypassword quarkus.rest-client.logging.scope=request-response -quarkus.log.category."org.jboss.resteasy.reactive.client.logging".level=DEBUG +quarkus.log.category."org.jboss.resteasy.reactive.client.logging".level=INFO +microprofile.rest.client.disable.default.mapper=true diff --git a/http/rest-client-reactive/src/test/java/io/quarkus/ts/http/restclient/reactive/ProxyIT.java b/http/rest-client-reactive/src/test/java/io/quarkus/ts/http/restclient/reactive/ProxyIT.java index b81c55dbb..b88157e48 100644 --- a/http/rest-client-reactive/src/test/java/io/quarkus/ts/http/restclient/reactive/ProxyIT.java +++ b/http/rest-client-reactive/src/test/java/io/quarkus/ts/http/restclient/reactive/ProxyIT.java @@ -39,7 +39,7 @@ void getThrough() { @Test void banned() { Response banned = proxyApp.given().with().get("/proxied/banned"); - Assertions.assertEquals(HttpStatus.SC_OK, banned.statusCode()); + Assertions.assertEquals(HttpStatus.SC_FORBIDDEN, banned.statusCode()); Assertions.assertEquals("Reading is prohibited by corporate policy!", banned.body().asString()); } diff --git a/http/rest-client-reactive/src/test/resources/proxy/Dockerfile b/http/rest-client-reactive/src/test/resources/proxy/Dockerfile index 1cc9e078d..0218c1479 100644 --- a/http/rest-client-reactive/src/test/resources/proxy/Dockerfile +++ b/http/rest-client-reactive/src/test/resources/proxy/Dockerfile @@ -1,2 +1,3 @@ FROM nginx:1.21 +EXPOSE 8090 COPY nginx.conf /etc/nginx/nginx.conf diff --git a/http/rest-client-reactive/src/test/resources/proxy/deploy.sh b/http/rest-client-reactive/src/test/resources/proxy/deploy.sh index cd3749b89..b928c1af8 100755 --- a/http/rest-client-reactive/src/test/resources/proxy/deploy.sh +++ b/http/rest-client-reactive/src/test/resources/proxy/deploy.sh @@ -1,3 +1,6 @@ +VERSION=1.0.1 docker build -t nginx-proxy . docker tag nginx-proxy quay.io/quarkusqeteam/proxy:latest +docker tag nginx-proxy quay.io/quarkusqeteam/proxy:$VERSION docker push quay.io/quarkusqeteam/proxy:latest +docker push quay.io/quarkusqeteam/proxy:$VERSION diff --git a/http/rest-client-reactive/src/test/resources/proxy/nginx.conf b/http/rest-client-reactive/src/test/resources/proxy/nginx.conf index cf7b3ba6c..8002542c4 100644 --- a/http/rest-client-reactive/src/test/resources/proxy/nginx.conf +++ b/http/rest-client-reactive/src/test/resources/proxy/nginx.conf @@ -7,7 +7,7 @@ http { proxy_pass http://$host; } location ~ \.(txt)$ { - return 203 "Reading is prohibited by corporate policy!"; + return 403 "Reading is prohibited by corporate policy!"; } location /auth { return 200 $http_proxy_authorization; diff --git a/lifecycle-application/pom.xml b/lifecycle-application/pom.xml index 81db20c19..e9d4abb33 100644 --- a/lifecycle-application/pom.xml +++ b/lifecycle-application/pom.xml @@ -39,7 +39,7 @@ - 2.7.5.Final + 2.7.6.Final diff --git a/pom.xml b/pom.xml index 08702466b..01d372fed 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 2.22.2 quarkus-bom io.quarkus - 2.7.5.Final + 2.7.6.Final 1.1.0.Final 0.32.0 2.6.1.Final diff --git a/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliExtensionsIT.java b/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliExtensionsIT.java old mode 100644 new mode 100755 index 864f4835e..bd2d40dcf --- a/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliExtensionsIT.java +++ b/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliExtensionsIT.java @@ -18,6 +18,7 @@ import io.quarkus.test.scenarios.QuarkusScenario; import io.quarkus.test.scenarios.annotations.DisabledOnQuarkusSnapshot; import io.quarkus.test.scenarios.annotations.DisabledOnQuarkusVersion; +import io.quarkus.test.scenarios.annotations.EnabledOnQuarkusVersion; import io.quarkus.test.services.quarkus.model.QuarkusProperties; /** @@ -29,6 +30,7 @@ @QuarkusScenario @DisabledOnQuarkusVersion(version = "1\\..*", reason = "Quarkus CLI has been reworked in 2.x") @DisabledIfSystemProperty(named = "profile.id", matches = "native", disabledReason = "Only for JVM verification") +@EnabledOnQuarkusVersion(version = ".*redhat.*", reason = "There is no stream 2.7 in code.quarkus.io anymore") public class QuarkusCliExtensionsIT { static final String AGROAL_EXTENSION_NAME = "Agroal - Database connection pool"; @@ -87,9 +89,6 @@ public void shouldListExtensionsUsingPlatformBom() { } @DisabledOnQuarkusSnapshot(reason = "999-SNAPSHOT is not pushed into the platform site") - @DisabledOnQuarkusVersion(version = "2.7.5.Final", reason = "Quarkus 2.7 stream was removed from code.quarkus.io") - //TODO Currently code.quarkus and quarkusCli are pointing to the same set of defined streams. - // ZULIP ref: https://quarkusio.zulipchat.com/#narrow/stream/191168-core-team/topic/streams.20on.20registry.20.2F.20code.2Equarkus/near/280456392 @Test public void shouldListExtensionsUsingStream() { String streamVersion = getCurrentStreamVersion(); @@ -158,4 +157,4 @@ private void assertListFullOptionOutput() { private void assertResultIsSuccessful() { assertTrue(result.isSuccessful(), "Extensions list command didn't work. Output: " + result.getOutput()); } -} \ No newline at end of file +}