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
commit 24cfba015d31c0eb86f64a9eab032d63bb32cc31 Author: lburgazzoli <lburgazz...@gmail.com> AuthorDate: Wed Oct 30 12:10:57 2019 +0100 Add quarkus-platform-ignore to test that are not supposed to be executed in quarkus-platform --- .../org/apache/camel/quarkus/core/CamelTest.java | 29 +++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/integration-tests/core-main/test/src/test/java/org/apache/camel/quarkus/core/CamelTest.java b/integration-tests/core-main/test/src/test/java/org/apache/camel/quarkus/core/CamelTest.java index 934b44c..03b230a 100644 --- a/integration-tests/core-main/test/src/test/java/org/apache/camel/quarkus/core/CamelTest.java +++ b/integration-tests/core-main/test/src/test/java/org/apache/camel/quarkus/core/CamelTest.java @@ -26,6 +26,7 @@ import io.restassured.path.json.JsonPath; import io.restassured.response.Response; import org.apache.camel.quarkus.core.runtime.support.SupportListener; import org.apache.camel.reactive.vertx.VertXReactiveExecutor; +import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; @@ -59,6 +60,29 @@ public class CamelTest { .then().body(is("my-ctx-name")); } + /* + * This test is tagged with quarkus-platform-ignore as it needs to be + * ignored when running camel test from the quarkus-platform as the + * test relies on a local route file being loaded. + */ + @Test + @Tag("quarkus-platform-ignore") + public void testMainInstanceWithXmlRoutes() { + JsonPath p = RestAssured.given() + .accept(MediaType.APPLICATION_JSON) + .get("/test/main/describe") + .then() + .statusCode(200) + .extract() + .body() + .jsonPath(); + + assertThat(p.getList("routeBuilders", String.class)) + .contains(SupportListener.MyBuilder.class.getName()); + assertThat(p.getList("routes", String.class)) + .contains("my-xml-route"); + } + @Test public void testMainInstance() { JsonPath p = RestAssured.given() @@ -73,12 +97,11 @@ public class CamelTest { assertThat(p.getList("listeners", String.class)) .containsOnly(CamelMainEventDispatcher.class.getName(), SupportListener.class.getName()); assertThat(p.getList("routeBuilders", String.class)) - .containsOnly(CamelRoute.class.getName(), SupportListener.MyBuilder.class.getName()); + .contains(CamelRoute.class.getName()); assertThat(p.getList("routes", String.class)) - .containsOnly("keep-alive", "configure", "beforeStart", "my-xml-route"); + .contains("keep-alive", "configure", "beforeStart"); assertThat(p.getBoolean("autoConfigurationLogSummary")).isFalse(); - } @Test