diff --git a/013-quarkus-oidc-restclient/src/test/java/io/quarkus/qe/OpenApiTest.java b/013-quarkus-oidc-restclient/src/test/java/io/quarkus/qe/OpenApiTest.java index 22742c50..1639d6b3 100644 --- a/013-quarkus-oidc-restclient/src/test/java/io/quarkus/qe/OpenApiTest.java +++ b/013-quarkus-oidc-restclient/src/test/java/io/quarkus/qe/OpenApiTest.java @@ -73,10 +73,14 @@ private String fileExtension(String uri) { private void assertContent(JsonObject content) { assertThat(content.getJsonArray("tags").encode(), is(EXPECTED_TAGS)); - assertThat(content.getJsonObject("info").encode(), is(EXPECTED_INFO)); + assertThat(content.getJsonObject("info").encode(), is(getExpectedInfo())); assertTrue(content.getJsonObject("components").getJsonObject("schemas").containsKey("Score"), "Expected component.schema.Score object."); assertTrue(content.getJsonObject("paths").containsKey("/rest-ping"), "Missing expected path: /rest-ping"); assertTrue(content.getJsonObject("paths").containsKey("/rest-pong"), "Missing expected path: /rest-pong"); } + + String getExpectedInfo() { + return EXPECTED_INFO; + } } diff --git a/013-quarkus-oidc-restclient/src/test/java/io/quarkus/qe/OpenApiTestIT.java b/013-quarkus-oidc-restclient/src/test/java/io/quarkus/qe/OpenApiTestIT.java index 1d49938e..65d10ce2 100644 --- a/013-quarkus-oidc-restclient/src/test/java/io/quarkus/qe/OpenApiTestIT.java +++ b/013-quarkus-oidc-restclient/src/test/java/io/quarkus/qe/OpenApiTestIT.java @@ -4,4 +4,13 @@ @NativeImageTest public class OpenApiTestIT extends OpenApiTest { + // quarkus-maven-plugin:build adjusts OpenAPI info + // see https://github.com/quarkusio/quarkus/pull/19148/commits/8fe04d7a06aa976e0b85d72864578f3ab834a27a + // surefire is executed before quarkus-maven-plugin:build and thus the message there is the generic one + private static final String QUARKUS_ADJUSTED_INFO = "{\"title\":\"013-quarkus-oidc-restclient API\",\"version\":\"1.0.0-SNAPSHOT\"}"; + + @Override + String getExpectedInfo() { + return QUARKUS_ADJUSTED_INFO; + } }