Add quarkus-platform-ignore to test that are not supposed to be executed in quarkus-platform
@@ -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
