From 325cf1ad4faa9cf2c15ef3939c0a1f17e72f6981 Mon Sep 17 00:00:00 2001 From: Eric Deandrea Date: Mon, 23 Dec 2024 09:14:13 -0500 Subject: [PATCH] Fix UI build --- .../src/main/resources/application.properties | 1 - .../sample/superheroes/ui/EnvResourceIT.java | 2 ++ .../sample/superheroes/ui/ITTestProfile.java | 16 ++++++++++++++++ .../quarkus/sample/superheroes/ui/WebUIIT.java | 3 ++- 4 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 ui-super-heroes/src/test/java/io/quarkus/sample/superheroes/ui/ITTestProfile.java diff --git a/ui-super-heroes/src/main/resources/application.properties b/ui-super-heroes/src/main/resources/application.properties index 350d6a6b3..ef4b9a2a6 100644 --- a/ui-super-heroes/src/main/resources/application.properties +++ b/ui-super-heroes/src/main/resources/application.properties @@ -1,6 +1,5 @@ quarkus.application.name=ui-super-heroes quarkus.banner.path=banner.txt -quarkus.test.integration-test-profile=test quarkus.http.test-port=0 quarkus.rest.jackson.optimization.enable-reflection-free-serializers=true diff --git a/ui-super-heroes/src/test/java/io/quarkus/sample/superheroes/ui/EnvResourceIT.java b/ui-super-heroes/src/test/java/io/quarkus/sample/superheroes/ui/EnvResourceIT.java index e068758d1..be687bcf1 100644 --- a/ui-super-heroes/src/test/java/io/quarkus/sample/superheroes/ui/EnvResourceIT.java +++ b/ui-super-heroes/src/test/java/io/quarkus/sample/superheroes/ui/EnvResourceIT.java @@ -1,11 +1,13 @@ package io.quarkus.sample.superheroes.ui; import io.quarkus.test.junit.QuarkusIntegrationTest; +import io.quarkus.test.junit.TestProfile; /** * Tests the resource layer ({@link EnvResource}). */ @QuarkusIntegrationTest +@TestProfile(ITTestProfile.class) class EnvResourceIT extends EnvResourceTests { } diff --git a/ui-super-heroes/src/test/java/io/quarkus/sample/superheroes/ui/ITTestProfile.java b/ui-super-heroes/src/test/java/io/quarkus/sample/superheroes/ui/ITTestProfile.java new file mode 100644 index 000000000..5d7cba569 --- /dev/null +++ b/ui-super-heroes/src/test/java/io/quarkus/sample/superheroes/ui/ITTestProfile.java @@ -0,0 +1,16 @@ +package io.quarkus.sample.superheroes.ui; + +import java.util.HashMap; +import java.util.Map; + +import io.quarkiverse.quinoa.testing.QuinoaTestProfiles; + +public class ITTestProfile extends QuinoaTestProfiles.Enable { + @Override + public Map getConfigOverrides() { + var configOverrides = new HashMap<>(super.getConfigOverrides()); + configOverrides.put("api.base.url", "http://${quarkus.microcks.default.http.host}:${quarkus.microcks.default.http.port}/rest/Fights+API/1.0"); + + return configOverrides; + } +} diff --git a/ui-super-heroes/src/test/java/io/quarkus/sample/superheroes/ui/WebUIIT.java b/ui-super-heroes/src/test/java/io/quarkus/sample/superheroes/ui/WebUIIT.java index 3c369ef01..f437dfe53 100644 --- a/ui-super-heroes/src/test/java/io/quarkus/sample/superheroes/ui/WebUIIT.java +++ b/ui-super-heroes/src/test/java/io/quarkus/sample/superheroes/ui/WebUIIT.java @@ -1,11 +1,12 @@ package io.quarkus.sample.superheroes.ui; import io.quarkus.test.junit.QuarkusIntegrationTest; +import io.quarkus.test.junit.TestProfile; /** * Tests the resource layer ({@link EnvResource}). */ @QuarkusIntegrationTest +@TestProfile(ITTestProfile.class) class WebUIIT extends WebUITests { - }