Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backports/3.8 16.02 #1668

Merged
merged 11 commits into from
Feb 19, 2024
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,12 @@ This module will setup a very minimal configuration (only `quarkus-resteasy`) an
Reactive equivalent of the http/rest-client module.
Exclusions: XML test. Reason: https://quarkus.io/blog/resteasy-reactive/#what-jax-rs-features-are-missing

Additionally, it's include endpoints to check usage of HTTP/2 using REST client over the http and https.
HTTP/2 REST client tests check sync and async response by:
- Two endpoint used by client
- Eight endpoints used for validation of client request


### `http/rest-client-reactive-vanilla`
Verifies Rest Client usage, while no request are going only internally on the server.
This module requires to not have any resteasy dependency, for an issue to be reproducible.
Expand Down Expand Up @@ -505,7 +511,7 @@ The application also uses RESTEasy to expose a RESTful API, Jackson for JSON ser
There are actually coverage scenarios `sql-app` directory:

- `postgresql`: the PostgreSQL JDBC driver; produces the PostgreSQL-specific build of the application and runs the OpenShift test with PostgreSQL
- `mysql`: same for MysQL
- `mysql`: same for MySQL
- `mariadb`: same for MariaDB
- `mssql`: same for MSSQL
- `oracle`: The same case as the others, but for Oracle, only JVM mode is supported. Native mode is not covered due to a bug in Quarkus, which causes it to fail when used in combination with other JDBC drivers (see `OracleDatabaseIT`). OpenShift scenario is also not supported due to another bug (see `OpenShiftOracleDatabaseIT`).
Expand All @@ -515,16 +521,18 @@ This might not be recommended for production, but is good enough for test.
Container images used in the tests are:

- PostgreSQL:
- version 13: `postgres:13.6`
- version 10: `registry.redhat.io/rhscl/postgresql-10-rhel7` (only if `ts.redhat.registry.enabled` is set)
- version 16: `postgres:16.1`
- version 10: `registry.redhat.io/rhel8/postgresql-10` (only if `ts.redhat.registry.enabled` is set)
- MySQL:
- version 5.7: `mysql:5.7`
- version 8.0: `registry.access.redhat.com/rhscl/mysql-80-rhel7`
- MariaDB:
- version 10.6: `mariadb:10.6`
- version 10.11: `mariadb:10.11`
- version 10.3: `registry.redhat.io/rhel8/mariadb-103`
- version 10.5: `registry.redhat.io/rhel8/mariadb-105`
- MSSQL: `mcr.microsoft.com/mssql/rhel/server`
- Oracle
- version 21 XE: `gvenzl/oracle-xe:21-slim-faststart`
- version 23: `gvenzl/oracle-free:23-slim-faststart`

### `sql-db/sql-app-oracle`
Functionally identical to `sql-db/sql-app`, but using only `quarkus-jdbc-oracle` driver. This is a workaround for the missing native Oracle coverage in `sql-db/sql-app`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import org.awaitility.core.ThrowingRunnable;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

Expand Down Expand Up @@ -111,7 +110,6 @@ public void timeoutPropertyRecognized() {
verifyDevModePropertyRecognized(app, QUARKUS_ANALYTICS_TIMEOUT_PROPERTY);
}

@Disabled("https://github.com/quarkusio/quarkus/issues/34825")
@Test
public void uriPropertyRecognized() {
QuarkusCliRestService app = createAppDefault();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import static io.quarkus.ts.buildtimeanalytics.AnalyticsUtils.QUARKUS_ANALYTICS_URI_BASE_PROPERTY;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

Expand Down Expand Up @@ -116,7 +115,6 @@ public void timeoutPropertyRecognized() {
verifyBuildPropertyRecognized(buildResult, QUARKUS_ANALYTICS_TIMEOUT_PROPERTY);
}

@Disabled("https://github.com/quarkusio/quarkus/issues/34825")
@Test
public void uriPropertyRecognized() {
QuarkusCliRestService app = createAppDefault();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package io.quarkus.ts.configmap.api.server;

import org.junit.jupiter.api.Disabled;

import io.quarkus.test.bootstrap.RestService;
import io.quarkus.test.services.QuarkusApplication;

@Disabled("https://github.com/quarkusio/quarkus/issues/38018")
public class OpenShiftApiServerConfigMapConfigIT extends OpenShiftBaseConfigIT {

@QuarkusApplication
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package io.quarkus.ts.configmap.api.server;

import org.junit.jupiter.api.Disabled;

import io.quarkus.test.bootstrap.RestService;
import io.quarkus.test.services.QuarkusApplication;

@Disabled("https://github.com/quarkusio/quarkus/issues/38018")
public class OpenShiftApiServerConfigSecretConfigIT extends OpenShiftBaseConfigIT {

@QuarkusApplication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import jakarta.inject.Inject;

import org.apache.http.HttpStatus;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import io.quarkus.test.bootstrap.RestService;
Expand All @@ -32,7 +31,6 @@
import io.restassured.response.Response;

@OpenShiftScenario(deployment = OpenShiftDeploymentStrategy.UsingOpenShiftExtension)
@Disabled("https://github.com/quarkusio/quarkus/issues/38018")
public class OpenShiftConfigSourcePriorityIT {

private static final String CONFIGMAP_YAML = CONFIGMAP + "-yaml";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import io.quarkus.test.services.QuarkusApplication;

@OpenShiftScenario(deployment = OpenShiftDeploymentStrategy.UsingOpenShiftExtension)
@Disabled("https://github.com/quarkusio/quarkus/issues/38018")
public class OpenShiftFailOnMissingConfigIT {

@QuarkusApplication
Expand All @@ -21,6 +20,7 @@ public class OpenShiftFailOnMissingConfigIT {
.withProperty("quarkus.kubernetes-config.config-maps", "absent-config-map");

@Test
@Disabled("We can not detect this failure at the moment due to https://github.com/quarkusio/quarkus/issues/38481")
public void shouldFailOnStart() {
assertThrows(AssertionError.class, () -> app.start(),
"Should fail because property 'quarkus.kubernetes-config.fail-on-missing-config' is true and ConfigMap 'absent-config-map' is missing.");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package io.quarkus.ts.configmap.api.server;

import org.junit.jupiter.api.Disabled;

import io.quarkus.test.bootstrap.RestService;
import io.quarkus.test.services.QuarkusApplication;

@Disabled("https://github.com/quarkusio/quarkus/issues/38018")
public class OpenShiftFileSystemConfigMapConfigIT extends OpenShiftBaseConfigIT {

@QuarkusApplication
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package io.quarkus.ts.configmap.api.server;

import org.junit.jupiter.api.Disabled;

import io.quarkus.test.bootstrap.RestService;
import io.quarkus.test.services.QuarkusApplication;

@Disabled("https://github.com/quarkusio/quarkus/issues/38018")
public class OpenShiftFileSystemConfigSecretConfigIT extends OpenShiftBaseConfigIT {

@QuarkusApplication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,24 @@
import java.util.Set;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;

import io.quarkus.test.scenarios.OpenShiftDeploymentStrategy;
import io.quarkus.test.scenarios.OpenShiftScenario;
import io.quarkus.test.scenarios.annotations.DisabledOnNative;
import io.quarkus.test.services.QuarkusApplication;
import io.quarkus.test.services.knative.eventing.FunqyKnativeEventsService;
import io.quarkus.test.services.knative.eventing.OpenShiftExtensionFunqyKnativeEventsService;
import io.quarkus.test.services.knative.eventing.spi.ForwardResponseDTO;
import io.restassured.common.mapper.TypeRef;

@DisabledIfSystemProperty(named = "ts.arm.missing.services.excludes", matches = "true", disabledReason = "https://github.com/quarkus-qe/quarkus-test-suite/issues/1142")
@DisabledOnNative(reason = "https://github.com/quarkusio/quarkus/issues/37142")
@Tag("use-quarkus-openshift-extension")
@Tag("serverless")
@OpenShiftScenario(deployment = OpenShiftDeploymentStrategy.UsingOpenShiftExtension)
@Disabled("https://github.com/quarkusio/quarkus/issues/38018")
public class ServerlessExtensionOpenShiftFunqyKnEventsIT {

@QuarkusApplication
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,6 @@ HealthClientService/mp-rest/url=http://localhost:${quarkus.http.port}
HealthClientService/mp-rest/scope=jakarta.inject.Singleton
# FollowRedirect not supported QUARKUS-781
# HealthClientService/mp-rest/followRedirects=true
HttpVersionClientService/mp-rest/url=https://localhost:${quarkus.http.ssl-port}
HttpVersionClientService/mp-rest/scope=jakarta.inject.Singleton
HttpVersionClientService/mp-rest/hostnameVerifier=io.quarkus.restclient.NoopHostnameVerifier
HttpVersionClientService/mp-rest/trustStore=classpath:/META-INF/resources/server.truststore
HttpVersionClientService/mp-rest/trustStorePassword=password
HttpVersionClientServiceAsync/mp-rest/url=https://localhost:${quarkus.http.ssl-port}
HttpVersionClientServiceAsync/mp-rest/scope=jakarta.inject.Singleton
HttpVersionClientServiceAsync/mp-rest/hostnameVerifier=io.quarkus.restclient.NoopHostnameVerifier
HttpVersionClientServiceAsync/mp-rest/trustStore=classpath:/META-INF/resources/server.truststore
HttpVersionClientServiceAsync/mp-rest/trustStorePassword=password
# gRPC
quarkus.grpc.clients.hello.host=localhost
quarkus.grpc.clients.hello.port=${quarkus.http.port}
Expand All @@ -43,8 +33,6 @@ quarkus.keycloak.policy-enforcer.paths.swagger-ui.path=/api/swagger-ui/*
quarkus.keycloak.policy-enforcer.paths.swagger-ui.enforcement-mode=DISABLED
quarkus.keycloak.policy-enforcer.paths.health.path=/api/health/*
quarkus.keycloak.policy-enforcer.paths.health.enforcement-mode=DISABLED
quarkus.keycloak.policy-enforcer.paths.version.path=/api/httpVersion/*
quarkus.keycloak.policy-enforcer.paths.version.enforcement-mode=DISABLED
# Application endpoints
quarkus.keycloak.policy-enforcer.paths.99-bottles-of-beer.path=/api/99-bottles-of-beer/*
quarkus.keycloak.policy-enforcer.paths.99-bottles-of-beer.enforcement-mode=DISABLED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ void setUp() {
}

@Test
@Disabled("https://github.com/quarkusio/quarkus/issues/30511")
@Disabled("Wait for this to be fixed https://github.com/HtmlUnit/htmlunit/issues/232 or rewrite from HtmlUnit")
public void uiChange() throws IOException {
RestService app = getApp();
URILike uri = getUri();

HtmlPage before = webClient.getPage(uri.withPath("/q/dev/io.quarkus.quarkus-vertx-http/config").toString());
HtmlPage before = webClient.getPage(uri.withPath("/q/dev-ui/configuration-form-editor").toString());
QuarkusUIField field = new QuarkusUIField(before.getElementById(PROPERTY));
assertEquals("42", field.getValue(), "Wrong initial value shown in UI!");
assertEquals("42", app.getProperty(PROPERTY, ""), "Properties contain wrong initial value!");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@

import org.apache.http.HttpStatus;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
Expand All @@ -72,11 +71,7 @@
import io.quarkus.example.StreamingGrpc;
import io.quarkus.test.bootstrap.Protocol;
import io.quarkus.test.bootstrap.RestService;
import io.quarkus.test.scenarios.annotations.DisabledOnNative;
import io.quarkus.test.scenarios.annotations.EnabledOnQuarkusVersion;
import io.quarkus.ts.http.advanced.reactive.clients.HttpVersionClientService;
import io.quarkus.ts.http.advanced.reactive.clients.HttpVersionClientServiceAsync;
import io.quarkus.ts.http.advanced.reactive.clients.RestClientServiceBuilder;
import io.restassured.http.Header;
import io.restassured.response.ValidatableResponse;
import io.smallrye.mutiny.Uni;
Expand All @@ -96,7 +91,6 @@ public abstract class BaseHttpAdvancedReactiveIT {
private static final int RETRY = 3;
private static final String PASSWORD = "password";
private static final String KEY_STORE_PATH = "META-INF/resources/server.keystore";
private static final int ASSERT_TIMEOUT_SECONDS = 10;
private static final String UTF_8_CHARSET = ";charset=UTF-8";
private static final String CONTENT = "content";

Expand Down Expand Up @@ -235,33 +229,6 @@ public void http2Server() throws InterruptedException, URISyntaxException {
assertThat(done.getCount(), equalTo(0L));
}

@Test
@DisplayName("Http/2 Client Sync test")
@Disabled("blocked by: https://issues.redhat.com/browse/QUARKUS-658")
public void http2ClientSync() throws Exception {
HttpVersionClientService versionHttpClient = new RestClientServiceBuilder<HttpVersionClientService>(
getAppEndpoint()).withHostVerified(true).withPassword(PASSWORD).withKeyStorePath(KEY_STORE_PATH)
.build(HttpVersionClientService.class);

Response resp = versionHttpClient.getClientHttpVersion();
assertEquals(SC_OK, resp.getStatus());
assertEquals(HttpVersion.HTTP_2.name(), resp.getHeaderString(HttpClientVersionResource.HTTP_VERSION));
}

@Test
@DisplayName("Http/2 Client Async test")
@Disabled("blocked by: https://issues.redhat.com/browse/QUARKUS-658")
public void http2ClientAsync() throws Exception {
HttpVersionClientServiceAsync clientServiceAsync = new RestClientServiceBuilder<HttpVersionClientServiceAsync>(
getAppEndpoint()).withHostVerified(true).withPassword(PASSWORD).withKeyStorePath(KEY_STORE_PATH)
.build(HttpVersionClientServiceAsync.class);

Response resp = clientServiceAsync.getClientHttpVersion().await().atMost(Duration.ofSeconds(ASSERT_TIMEOUT_SECONDS));

assertEquals(SC_OK, resp.getStatus());
assertEquals(HttpVersion.HTTP_2.name(), resp.getHeaderString(HttpClientVersionResource.HTTP_VERSION));
}

@Test
@DisplayName("Non-application endpoint move to /q/")
@EnabledOnQuarkusVersion(version = "1\\..*", reason = "Redirection is no longer supported in 2.x")
Expand Down Expand Up @@ -450,7 +417,6 @@ public void interceptedTest() {
@DisplayName("SSE check for event responses values containing empty data")
@Test
@Tag("QUARKUS-3701")
@DisabledOnNative(reason = "https://github.com/quarkusio/quarkus/issues/36986")
void testSseResponseForEmptyData() {
getApp().given()
.get(ROOT_PATH + "/sse/client-update")
Expand Down

This file was deleted.

This file was deleted.

Loading