You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2019/12/02 20:13:52 UTC
[camel-quarkus] branch master updated: mp-config: enable testing
profiles in native mode
This is an automated email from the ASF dual-hosted git repository.
lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/master by this push:
new 4bb8ad0 mp-config: enable testing profiles in native mode
4bb8ad0 is described below
commit 4bb8ad008f68c835b1248cf7e5088b6142373076
Author: lburgazzoli <lb...@gmail.com>
AuthorDate: Mon Dec 2 14:01:25 2019 +0100
mp-config: enable testing profiles in native mode
---
integration-tests/core-main/pom.xml | 1 +
.../java/org/apache/camel/quarkus/core/CamelTest.java | 15 +--------------
2 files changed, 2 insertions(+), 14 deletions(-)
diff --git a/integration-tests/core-main/pom.xml b/integration-tests/core-main/pom.xml
index ec50d44..bf66707 100644
--- a/integration-tests/core-main/pom.xml
+++ b/integration-tests/core-main/pom.xml
@@ -126,6 +126,7 @@
<configuration>
<systemProperties>
<native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
+ <quarkus.test.native-image-profile>staging</quarkus.test.native-image-profile>
</systemProperties>
</configuration>
</execution>
diff --git a/integration-tests/core-main/src/test/java/org/apache/camel/quarkus/core/CamelTest.java b/integration-tests/core-main/src/test/java/org/apache/camel/quarkus/core/CamelTest.java
index 0074eab..5d72afe 100644
--- a/integration-tests/core-main/src/test/java/org/apache/camel/quarkus/core/CamelTest.java
+++ b/integration-tests/core-main/src/test/java/org/apache/camel/quarkus/core/CamelTest.java
@@ -17,10 +17,8 @@
package org.apache.camel.quarkus.core;
import java.net.HttpURLConnection;
-import java.util.Objects;
import javax.ws.rs.core.MediaType;
-import io.quarkus.runtime.configuration.ProfileManager;
import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
import io.restassured.http.ContentType;
@@ -42,18 +40,7 @@ public class CamelTest {
public void testProperties() {
RestAssured.when().get("/test/property/camel.context.name").then().body(is("quarkus-camel-example"));
RestAssured.when().get("/test/property/camel.component.timer.basic-property-binding").then().body(is("true"));
-
- //
- // It is not possible to use a custom test configuration profile in native mode for now.
- // Native tests are always run using the prod profile, see:
- //
- // https://quarkus.io/guides/maven-tooling#custom-test-configuration-profile
- //
- if (Objects.equals("staging", ProfileManager.getActiveProfile())) {
- RestAssured.when().get("/test/property/the.message").then().body(is("test"));
- } else {
- RestAssured.when().get("/test/property/the.message").then().body(is("default"));
- }
+ RestAssured.when().get("/test/property/the.message").then().body(is("test"));
}
@Test