This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 80adea330725 [JBang-IT] Extend IT coverage for Camel-CLI subcommands
(#29083)
80adea330725 is described below
commit 80adea330725b0e620f0618aa5ae7cab643f51bc
Author: Jakub Vrubel <[email protected]>
AuthorDate: Mon Nov 23 20:10:24 2026 +0100
[JBang-IT] Extend IT coverage for Camel-CLI subcommands (#29083)
Add 24 integration-test classes to camel-jbang-it covering get, cmd, top,
infra, ps, plugin, doctor, dirty, wrapper, dependency list, validate, restart,
transform (DataWeave), eval expression and run --max-seconds/--max-messages,
with an error-route.yaml fixture for GetErrorITCase.
Co-authored-by: Guillaume Nodet - AI Bot <[email protected]>
---
.../core/commands/process/ListConsumerTest.java | 1 +
dsl/camel-jbang/camel-jbang-it/pom.xml | 6 ++
.../apache/camel/dsl/jbang/it/CmdChaosITCase.java | 72 ++++++++++++++
.../apache/camel/dsl/jbang/it/CmdDumpITCase.java | 77 +++++++++++++++
.../dsl/jbang/it/CmdJvmDiagnosticsITCase.java | 78 +++++++++++++++
.../apache/camel/dsl/jbang/it/CmdStubITCase.java | 47 +++++++++
.../camel/dsl/jbang/it/CmdSuspendResumeITCase.java | 49 ++++++++++
.../dsl/jbang/it/DependencyAdvancedITCase.java | 47 +++++++++
.../org/apache/camel/dsl/jbang/it/DirtyITCase.java | 52 ++++++++++
.../apache/camel/dsl/jbang/it/DoctorITCase.java | 37 +++++++
.../camel/dsl/jbang/it/EvalExpressionITCase.java | 43 +++++++++
.../camel/dsl/jbang/it/GetEndpointsITCase.java | 52 ++++++++++
.../apache/camel/dsl/jbang/it/GetErrorITCase.java | 42 ++++++++
.../apache/camel/dsl/jbang/it/GetHealthITCase.java | 37 +++++++
.../camel/dsl/jbang/it/GetPlatformHttpITCase.java | 37 +++++++
.../camel/dsl/jbang/it/GetRunningStateITCase.java | 98 +++++++++++++++++++
.../dsl/jbang/it/GetStartupRecorderITCase.java | 39 ++++++++
.../camel/dsl/jbang/it/InfraAdvancedITCase.java | 106 +++++++++++++++++++++
.../camel/dsl/jbang/it/PluginListGetITCase.java | 48 ++++++++++
.../camel/dsl/jbang/it/ProcessListITCase.java | 48 ++++++++++
.../apache/camel/dsl/jbang/it/RestartITCase.java | 53 +++++++++++
.../camel/dsl/jbang/it/RunMaxSecondsITCase.java | 47 +++++++++
.../camel/dsl/jbang/it/TopSubcommandsITCase.java | 61 ++++++++++++
.../dsl/jbang/it/TransformDataWeaveITCase.java | 43 +++++++++
.../camel/dsl/jbang/it/ValidateAdvancedITCase.java | 61 ++++++++++++
.../apache/camel/dsl/jbang/it/WrapperITCase.java | 39 ++++++++
.../dsl/jbang/it/support/JBangTestSupport.java | 6 +-
.../src/test/resources/jbang/it/error-route.yaml | 23 +++++
.../src/test/resources/jbang/it/route2-once.yaml | 26 +++++
29 files changed, 1373 insertions(+), 2 deletions(-)
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/process/ListConsumerTest.java
b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/process/ListConsumerTest.java
index a13445e7e2a3..ba41326f587d 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/process/ListConsumerTest.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/process/ListConsumerTest.java
@@ -108,6 +108,7 @@ class ListConsumerTest extends ProcessCommandTestSupport {
String output = printer.getOutput();
assertTrue(output.startsWith("["), "JSON output should be array");
assertTrue(output.contains("timer:tick"));
+ assertTrue(output.contains("Timer"), "Consumer suffix should be
removed from type");
}
}
diff --git a/dsl/camel-jbang/camel-jbang-it/pom.xml
b/dsl/camel-jbang/camel-jbang-it/pom.xml
index b0d199282a6b..2138de54a327 100644
--- a/dsl/camel-jbang/camel-jbang-it/pom.xml
+++ b/dsl/camel-jbang/camel-jbang-it/pom.xml
@@ -173,6 +173,12 @@
<artifactId>camel-util</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-chaos</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test-junit6</artifactId>
diff --git
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/CmdChaosITCase.java
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/CmdChaosITCase.java
new file mode 100644
index 000000000000..aabe985af1c3
--- /dev/null
+++
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/CmdChaosITCase.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.it;
+
+import java.io.IOException;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.camel.dsl.jbang.it.support.JBangTestSupport;
+import org.assertj.core.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+
+import static org.junit.jupiter.api.condition.OS.WINDOWS;
+
+@DisabledOnOs(WINDOWS)
+public class CmdChaosITCase extends JBangTestSupport {
+
+ // until must not exceed camel.chaos.maxDuration default (10m)
+ private static final String RULE = "endpoint=timer:yaml delay
duration=500ms rate=1.0 until=5m";
+
+ @Test
+ public void testCmdChaosAddAndList() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ String pid = executeBackground(String.format("run %s/route2.yaml
--chaos", mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ execute(String.format("cmd chaos-add %s --rule='%s'", pid, RULE));
+ checkCommandOutputs("get chaos", "timer", ASSERTION_WAIT_SECONDS);
+ }
+
+ @Test
+ public void testCmdChaosClear() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ String pid = executeBackground(String.format("run %s/route2.yaml
--chaos", mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ execute(String.format("cmd chaos-add %s --rule='%s'", pid, RULE));
+ checkCommandOutputs("get chaos", "timer", ASSERTION_WAIT_SECONDS);
+ execute(String.format("cmd chaos-clear %s", pid));
+ checkCommandDoesNotOutput("get chaos", "timer");
+ }
+
+ @Test
+ public void testCmdChaosChangeAndRemove() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ String pid = executeBackground(String.format("run %s/route2.yaml
--chaos", mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ String addOutput = execute(String.format("cmd chaos-add %s
--rule='%s'", pid, RULE));
+ // chaos-add outputs "Added chaos rule r1" — extract the rule id
+ Matcher m = Pattern.compile("Added chaos rule
(r\\d+)").matcher(addOutput);
+ Assertions.assertThat(m.find()).as("chaos-add output: %s",
addOutput).isTrue();
+ String ruleId = m.group(1);
+ execute(String.format("cmd chaos-change %s --id=%s --rule='%s'", pid,
ruleId,
+ "endpoint=timer:yaml delay duration=1s rate=0.5 until=5m"));
+ checkCommandOutputs("get chaos", "timer", ASSERTION_WAIT_SECONDS);
+ execute(String.format("cmd chaos-remove %s --id=%s", pid, ruleId));
+ checkCommandDoesNotOutput("get chaos", "timer");
+ }
+}
diff --git
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/CmdDumpITCase.java
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/CmdDumpITCase.java
new file mode 100644
index 000000000000..b9f2d98a7230
--- /dev/null
+++
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/CmdDumpITCase.java
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.it;
+
+import java.io.IOException;
+
+import org.apache.camel.dsl.jbang.it.support.JBangTestSupport;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+
+import static org.junit.jupiter.api.condition.OS.WINDOWS;
+
+@DisabledOnOs(WINDOWS)
+public class CmdDumpITCase extends JBangTestSupport {
+
+ @Test
+ public void testCmdRouteDump() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ executeBackground(String.format("run %s/route2.yaml", mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ checkCommandOutputs("cmd route-dump", "timer");
+ }
+
+ @Test
+ public void testCmdRouteDumpYaml() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ executeBackground(String.format("run %s/route2.yaml", mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ checkCommandOutputs("cmd route-dump --format=yaml", "timer");
+ }
+
+ @Test
+ public void testCmdRouteDumpXml() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ executeBackground(String.format("run %s/route2.yaml", mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ checkCommandOutputs("cmd route-dump --format=xml", "timer");
+ }
+
+ @Test
+ public void testCmdRouteDiagram() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ executeBackground(String.format("run %s/route2.yaml", mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ checkCommandOutputs("cmd route-diagram --theme=ascii", "timer");
+ }
+
+ @Test
+ public void testCmdRouteStructure() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ executeBackground(String.format("run %s/route2.yaml", mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ checkCommandOutputs("cmd route-structure", "route1");
+ }
+
+ @Test
+ public void testCmdRouteTopology() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ executeBackground(String.format("run %s/route2.yaml", mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ checkCommandOutputs("cmd route-topology --theme=ascii", "route1");
+ }
+}
diff --git
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/CmdJvmDiagnosticsITCase.java
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/CmdJvmDiagnosticsITCase.java
new file mode 100644
index 000000000000..f653893d884b
--- /dev/null
+++
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/CmdJvmDiagnosticsITCase.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.it;
+
+import java.io.IOException;
+
+import org.apache.camel.dsl.jbang.it.support.JBangTestSupport;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+
+import static org.junit.jupiter.api.condition.OS.WINDOWS;
+
+@DisabledOnOs(WINDOWS)
+public class CmdJvmDiagnosticsITCase extends JBangTestSupport {
+
+ @Test
+ public void testCmdGc() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ executeBackground(String.format("run %s/route2.yaml", mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ execute("cmd gc");
+ // route should still be running after GC
+ checkCommandOutputs("get route", "Started", ASSERTION_WAIT_SECONDS);
+ }
+
+ @Test
+ public void testCmdThreadDump() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ executeBackground(String.format("run %s/route2.yaml", mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ // default filter is "Camel", so output lists threads with "Camel" in
their name
+ checkCommandOutputs("cmd thread-dump", "Camel");
+ }
+
+ @Test
+ public void testCmdHeapHistogram() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ executeBackground(String.format("run %s/route2.yaml", mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ checkCommandOutputs("cmd heap-histogram", "java.lang");
+ }
+
+ @Test
+ public void testCmdReload() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ executeBackground(String.format("run %s/route2.yaml", mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ execute("cmd reload");
+ // route should resume processing after reload
+ checkCommandOutputs("get route", "Started", ASSERTION_WAIT_SECONDS);
+ }
+
+ @Test
+ public void testCmdResetStats() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2_ONCE);
+ executeBackground(String.format("run %s/route2-once.yaml",
mountPoint()));
+ // wait for all 3 exchanges to be processed so the timer stops and
counters are stable
+ checkCommandOutputsPattern("get count", "\\S+\\s+\\S+\\s+3\\s+0",
ASSERTION_WAIT_SECONDS);
+ execute("cmd reset-stats");
+ // timer stopped after repeatCount=3, so counters stay at 0 after reset
+ checkCommandOutputsPattern("get count", "\\S+\\s+\\S+\\s+0\\s+0",
ASSERTION_WAIT_SECONDS);
+ checkCommandOutputs("get route", "Started", ASSERTION_WAIT_SECONDS);
+ }
+}
diff --git
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/CmdStubITCase.java
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/CmdStubITCase.java
new file mode 100644
index 000000000000..397aa1c2a3c1
--- /dev/null
+++
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/CmdStubITCase.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.it;
+
+import java.io.IOException;
+
+import org.apache.camel.dsl.jbang.it.support.JBangTestSupport;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+
+import static org.junit.jupiter.api.condition.OS.WINDOWS;
+
+@DisabledOnOs(WINDOWS)
+public class CmdStubITCase extends JBangTestSupport {
+
+ @Test
+ public void testCmdStub() throws IOException {
+ copyResourceInDataFolder(TestResources.STUB_ROUTE);
+ executeBackground(String.format("run %s/StubRoute.java --stub=jms",
mountPoint()));
+ checkLogContains("Started route1");
+ // stub command lists stub queues by their queue name (not the scheme
prefix)
+ checkCommandOutputs("cmd stub", "inbox", ASSERTION_WAIT_SECONDS);
+ }
+
+ @Test
+ public void testCmdBrowse() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ executeBackground(String.format("run %s/route2.yaml", mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ // browse lists messages from browse-able endpoints; empty result is
valid for log endpoints
+ execute("cmd browse");
+ }
+}
diff --git
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/CmdSuspendResumeITCase.java
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/CmdSuspendResumeITCase.java
new file mode 100644
index 000000000000..4f45a8d58870
--- /dev/null
+++
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/CmdSuspendResumeITCase.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.it;
+
+import java.io.IOException;
+
+import org.apache.camel.dsl.jbang.it.support.JBangTestSupport;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+
+import static org.junit.jupiter.api.condition.OS.WINDOWS;
+
+@DisabledOnOs(WINDOWS)
+public class CmdSuspendResumeITCase extends JBangTestSupport {
+
+ @Test
+ public void testCmdSuspendRoute() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ executeBackground(String.format("run %s/route2.yaml", mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ execute("cmd suspend-route --id=route1");
+ checkCommandOutputsPattern("get route --wide-uri",
"route1\\s+timer.*?Suspended", ASSERTION_WAIT_SECONDS);
+ }
+
+ @Test
+ public void testCmdResumeRoute() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ executeBackground(String.format("run %s/route2.yaml", mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ execute("cmd suspend-route --id=route1");
+ checkCommandOutputsPattern("get route --wide-uri",
"route1\\s+timer.*?Suspended", ASSERTION_WAIT_SECONDS);
+ execute("cmd resume-route --id=route1");
+ checkCommandOutputsPattern("get route --wide-uri",
"route1\\s+timer.*?Started", ASSERTION_WAIT_SECONDS);
+ }
+}
diff --git
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/DependencyAdvancedITCase.java
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/DependencyAdvancedITCase.java
new file mode 100644
index 000000000000..78739a40452f
--- /dev/null
+++
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/DependencyAdvancedITCase.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.it;
+
+import java.io.IOException;
+
+import org.apache.camel.dsl.jbang.it.support.JBangTestSupport;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+
+import static org.junit.jupiter.api.condition.OS.WINDOWS;
+
+@DisabledOnOs(WINDOWS)
+public class DependencyAdvancedITCase extends JBangTestSupport {
+
+ @Test
+ public void testDependencyList() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ // dependency list resolves the Camel artifacts needed for a route file
+ checkCommandOutputs(
+ String.format("dependency list %s/route2.yaml", mountPoint()),
+ "camel-main");
+ }
+
+ @Test
+ public void testDependencyListShowsComponent() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ // the timer component is referenced in route2.yaml so it must appear
in the dependency list
+ checkCommandOutputs(
+ String.format("dependency list %s/route2.yaml", mountPoint()),
+ "camel-timer");
+ }
+}
diff --git
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/DirtyITCase.java
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/DirtyITCase.java
new file mode 100644
index 000000000000..d9768d4b2ba9
--- /dev/null
+++
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/DirtyITCase.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.it;
+
+import org.apache.camel.dsl.jbang.it.support.JBangTestSupport;
+import org.assertj.core.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+
+import static org.junit.jupiter.api.condition.OS.WINDOWS;
+
+@DisabledOnOs(WINDOWS)
+public class DirtyITCase extends JBangTestSupport {
+
+ @Test
+ public void testDirtyClean() {
+ // dirty output depends on the environment: blank when ~/.camel has no
orphan files,
+ // or "There are N orphan files" when stale files from dead processes
are present.
+ String output = execute("dirty").trim();
+ Assertions.assertThat(output)
+ .as("dirty output should be blank or report 'There are N
orphan files'")
+ .satisfiesAnyOf(
+ s -> Assertions.assertThat(s).isEmpty(),
+ s -> Assertions.assertThat(s).containsPattern("There
are \\d+ orphan files"));
+ }
+
+ @Test
+ public void testDirtyCleanFlag() {
+ // --clean attempts to remove orphan files; output is blank when
nothing to clean,
+ // or "Cleaned N orphan files" when some were removed (non-deletable
entries, e.g. dirs, may persist).
+ String output = execute("dirty --clean").trim();
+ Assertions.assertThat(output)
+ .as("dirty --clean output should be blank or report 'Cleaned N
orphan files'")
+ .satisfiesAnyOf(
+ s -> Assertions.assertThat(s).isEmpty(),
+ s -> Assertions.assertThat(s).containsPattern("Cleaned
\\d+ orphan files"));
+ }
+}
diff --git
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/DoctorITCase.java
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/DoctorITCase.java
new file mode 100644
index 000000000000..ced45a3535e9
--- /dev/null
+++
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/DoctorITCase.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.it;
+
+import org.apache.camel.dsl.jbang.it.support.JBangTestSupport;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+
+import static org.junit.jupiter.api.condition.OS.WINDOWS;
+
+@DisabledOnOs(WINDOWS)
+public class DoctorITCase extends JBangTestSupport {
+
+ @Test
+ public void testDoctor() {
+ checkCommandOutputs("doctor", "Camel CLI Doctor");
+ }
+
+ @Test
+ public void testDoctorJson() {
+ checkCommandOutputs("doctor --json", "status");
+ }
+}
diff --git
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/EvalExpressionITCase.java
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/EvalExpressionITCase.java
new file mode 100644
index 000000000000..4932bc2051fe
--- /dev/null
+++
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/EvalExpressionITCase.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.it;
+
+import org.apache.camel.dsl.jbang.it.support.JBangTestSupport;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+
+import static org.junit.jupiter.api.condition.OS.WINDOWS;
+
+@DisabledOnOs(WINDOWS)
+public class EvalExpressionITCase extends JBangTestSupport {
+
+ @Test
+ public void testEvalSimpleExpression() {
+ // --template is the Simple expression to evaluate; output contains
the result
+ checkCommandOutputs(
+ "eval expression --language=simple --template='Hello World'",
+ "Hello World");
+ }
+
+ @Test
+ public void testEvalJsonPathExpression() {
+ // for jsonpath, --template is the jsonpath expression; --body
supplies the input as inline JSON
+ checkCommandOutputs(
+ "eval expression --language=jsonpath
--body='{\"name\":\"Camel\"}' --template='$.name'",
+ "Camel");
+ }
+}
diff --git
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/GetEndpointsITCase.java
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/GetEndpointsITCase.java
new file mode 100644
index 000000000000..7951f816614f
--- /dev/null
+++
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/GetEndpointsITCase.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.it;
+
+import java.io.IOException;
+
+import org.apache.camel.dsl.jbang.it.support.JBangTestSupport;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+
+import static org.junit.jupiter.api.condition.OS.WINDOWS;
+
+@DisabledOnOs(WINDOWS)
+public class GetEndpointsITCase extends JBangTestSupport {
+
+ @Test
+ public void testGetEndpoint() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ executeBackground(String.format("run %s/route2.yaml", mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ checkCommandOutputs("get endpoint", "timer");
+ }
+
+ @Test
+ public void testGetConsumer() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ executeBackground(String.format("run %s/route2.yaml", mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ checkCommandOutputs("get consumer", "timer");
+ }
+
+ @Test
+ public void testGetProducer() {
+ // to("log:out") registers an explicit log-component producer endpoint
visible in get producer
+ executeBackground("run
--code='from(\"timer:t?period=500\").to(\"log:out\")'");
+ checkCommandOutputs("get producer", "log://out",
ASSERTION_WAIT_SECONDS);
+ }
+}
diff --git
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/GetErrorITCase.java
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/GetErrorITCase.java
new file mode 100644
index 000000000000..f758a175b2df
--- /dev/null
+++
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/GetErrorITCase.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.it;
+
+import java.io.IOException;
+
+import org.apache.camel.dsl.jbang.it.support.JBangTestSupport;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+
+import static org.junit.jupiter.api.condition.OS.WINDOWS;
+
+@DisabledOnOs(WINDOWS)
+public class GetErrorITCase extends JBangTestSupport {
+
+ @Override
+ protected void assertNoErrors() {
+ // this test intentionally runs a route that throws exceptions
+ }
+
+ @Test
+ public void testGetError() throws IOException {
+ copyResourceInDataFolder(TestResources.ERROR_ROUTE);
+ executeBackground(String.format("run %s/error-route.yaml",
mountPoint()));
+ checkLogContains("simulated test error", ASSERTION_WAIT_SECONDS);
+ checkCommandOutputs("get error", "RuntimeException",
ASSERTION_WAIT_SECONDS);
+ }
+}
diff --git
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/GetHealthITCase.java
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/GetHealthITCase.java
new file mode 100644
index 000000000000..9ca75cf7d5ce
--- /dev/null
+++
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/GetHealthITCase.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.it;
+
+import java.io.IOException;
+
+import org.apache.camel.dsl.jbang.it.support.JBangTestSupport;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+
+import static org.junit.jupiter.api.condition.OS.WINDOWS;
+
+@DisabledOnOs(WINDOWS)
+public class GetHealthITCase extends JBangTestSupport {
+
+ @Test
+ public void testGetHealth() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ executeBackground(String.format("run %s/route2.yaml --health",
mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ checkCommandOutputsPattern("get health", "UP");
+ }
+}
diff --git
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/GetPlatformHttpITCase.java
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/GetPlatformHttpITCase.java
new file mode 100644
index 000000000000..37e031a06cf2
--- /dev/null
+++
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/GetPlatformHttpITCase.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.it;
+
+import java.io.IOException;
+
+import org.apache.camel.dsl.jbang.it.support.JBangTestSupport;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+
+import static org.junit.jupiter.api.condition.OS.WINDOWS;
+
+@DisabledOnOs(WINDOWS)
+public class GetPlatformHttpITCase extends JBangTestSupport {
+
+ @Test
+ public void testGetPlatformHttp() throws IOException {
+ copyResourceInDataFolder(TestResources.SERVER_ROUTE);
+ executeBackground(String.format("run %s/server.yaml", mountPoint()));
+ checkLogContains("Started route1");
+ checkCommandOutputs("get platform-http", "/hello");
+ }
+}
diff --git
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/GetRunningStateITCase.java
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/GetRunningStateITCase.java
new file mode 100644
index 000000000000..081d04574418
--- /dev/null
+++
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/GetRunningStateITCase.java
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.it;
+
+import java.io.IOException;
+
+import org.apache.camel.dsl.jbang.it.support.JBangTestSupport;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+
+import static org.junit.jupiter.api.condition.OS.WINDOWS;
+
+@DisabledOnOs(WINDOWS)
+public class GetRunningStateITCase extends JBangTestSupport {
+
+ @Test
+ public void testGetEvent() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ executeBackground(String.format("run %s/route2.yaml", mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ // route lifecycle events (e.g. RouteStarted) are stored in memory
+ checkCommandOutputs("get event", "route1", ASSERTION_WAIT_SECONDS);
+ }
+
+ @Test
+ public void testGetSource() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ executeBackground(String.format("run %s/route2.yaml", mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ checkCommandOutputs("get source", "route2.yaml");
+ }
+
+ @Test
+ public void testGetProperties() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ // pass a known property on the command line so get properties has
something stable to verify
+ executeBackground(String.format("run %s/route2.yaml
--property=test.jbang.marker=running", mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ checkCommandOutputs("get properties", "test.jbang.marker",
ASSERTION_WAIT_SECONDS);
+ }
+
+ @Test
+ public void testGetActivity() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ executeBackground(String.format("run %s/route2.yaml", mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ // activity shows recently processed exchanges; route1 is the timer
route
+ checkCommandOutputs("get activity", "route1", ASSERTION_WAIT_SECONDS);
+ }
+
+ @Test
+ public void testGetCount() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ executeBackground(String.format("run %s/route2.yaml", mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ // count shows exchange totals per integration; TOTAL column appears
once exchanges have been processed
+ checkCommandOutputs("get count", "TOTAL", ASSERTION_WAIT_SECONDS);
+ }
+
+ @Test
+ public void testGetRouteController() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ executeBackground(String.format("run %s/route2.yaml", mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ checkCommandOutputs("get route-controller", "route1",
ASSERTION_WAIT_SECONDS);
+ }
+
+ @Test
+ public void testGetInflight() {
+ // the 5-second delay keeps exchanges in-flight long enough to observe
them
+ executeBackground("run
--code='from(\"timer:t?period=500\").delay(5000).log(\"inflight\")'");
+ // the EXCHANGE-ID header only appears when there is at least one
in-flight exchange
+ checkCommandOutputs("get inflight", "EXCHANGE-ID",
ASSERTION_WAIT_SECONDS);
+ }
+
+ @Test
+ public void testGetVariable() {
+ // global: prefix stores the variable in the CamelContext scope,
visible via get variable
+ executeBackground(
+ "run
--code='from(\"timer:t?period=500\").setVariable(\"global:myKey\",
constant(\"myValue\")).log(\"${variable:global:myKey}\")'");
+ checkLogContains("myValue");
+ checkCommandOutputs("get variable", "myKey", ASSERTION_WAIT_SECONDS);
+ }
+}
diff --git
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/GetStartupRecorderITCase.java
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/GetStartupRecorderITCase.java
new file mode 100644
index 000000000000..ca64315e3c0e
--- /dev/null
+++
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/GetStartupRecorderITCase.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.it;
+
+import java.io.IOException;
+
+import org.apache.camel.dsl.jbang.it.support.JBangTestSupport;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+
+import static org.junit.jupiter.api.condition.OS.WINDOWS;
+
+@DisabledOnOs(WINDOWS)
+public class GetStartupRecorderITCase extends JBangTestSupport {
+
+ @Test
+ public void testGetStartupRecorder() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ // enable the startup recorder via a Camel property
+ executeBackground(String.format(
+ "run %s/route2.yaml
--prop=camel.main.startup-recorder=backlog", mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ checkCommandOutputs("get startup-recorder", "CamelContext",
ASSERTION_WAIT_SECONDS);
+ }
+}
diff --git
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/InfraAdvancedITCase.java
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/InfraAdvancedITCase.java
new file mode 100644
index 000000000000..48efed823281
--- /dev/null
+++
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/InfraAdvancedITCase.java
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.it;
+
+import java.time.Duration;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.camel.dsl.jbang.it.support.JBangTestSupport;
+import org.assertj.core.api.Assertions;
+import org.awaitility.Awaitility;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Tag;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+
+import static org.junit.jupiter.api.condition.OS.WINDOWS;
+
+@Tag("container-only")
+@DisabledOnOs(WINDOWS)
+@DisabledIfSystemProperty(named = "ci.env.name", matches = ".*",
disabledReason = "Requires too much resources")
+public class InfraAdvancedITCase extends JBangTestSupport {
+
+ private static final String SERVICE = "ftp";
+
+ @AfterEach
+ public void stopInfraService() {
+ execInContainer(getMainCommand() + " infra stop " + SERVICE + " ||
true");
+ }
+
+ private static final Pattern PID_PATTERN =
Pattern.compile("PID:\\s*(\\d+)");
+
+ private String getServicePID(String message) {
+ Assertions.assertThat(message)
+ .as("infra run/restart --background output should contain
'PID:'")
+ .contains("PID:");
+ // Find the last "PID: <digits>" in the output — the new process when
infra restart
+ // prints both a "Stopping (PID: old)" and a "Running ... PID: new"
line.
+ Matcher m = PID_PATTERN.matcher(message);
+ String pid = null;
+ while (m.find()) {
+ pid = m.group(1);
+ }
+ Assertions.assertThat(pid)
+ .as("infra output should contain 'PID: <digits>' but was: %s",
message)
+ .isNotNull();
+ return pid;
+ }
+
+ @Test
+ public void testInfraGet() {
+ String msg = execute("infra run --background " + SERVICE);
+ String pid = getServicePID(msg);
+ Awaitility.await()
+ .atMost(Duration.ofSeconds(ASSERTION_WAIT_SECONDS))
+ .pollInterval(Duration.ofSeconds(1))
+ .untilAsserted(() -> Assertions.assertThat(execute("infra
ps")).contains(pid));
+ checkCommandOutputs("infra get " + SERVICE, SERVICE);
+ }
+
+ @Test
+ public void testInfraLog() {
+ String msg = execute("infra run --background " + SERVICE);
+ String pid = getServicePID(msg);
+ Awaitility.await()
+ .atMost(Duration.ofSeconds(ASSERTION_WAIT_SECONDS))
+ .pollInterval(Duration.ofSeconds(1))
+ .untilAsserted(() -> Assertions.assertThat(execute("infra
ps")).contains(pid));
+ // For embedded (non-container) services the log file exists but is
always empty.
+ // Verify only that the command succeeds without hanging, not that it
has content.
+ execute("infra log --follow=false " + SERVICE);
+ }
+
+ @Test
+ public void testInfraRestart() {
+ String msg = execute("infra run --background " + SERVICE);
+ String oldPID = getServicePID(msg);
+ Awaitility.await()
+ .atMost(Duration.ofSeconds(ASSERTION_WAIT_SECONDS))
+ .pollInterval(Duration.ofSeconds(1))
+ .untilAsserted(() -> Assertions.assertThat(execute("infra
ps")).contains(oldPID));
+ // restart must run --background; without it InfraRun blocks
indefinitely waiting for infra stop
+ String restartMsg = execute("infra restart --background " + SERVICE);
+ Assertions.assertThat(restartMsg).contains(SERVICE);
+ String newPID = getServicePID(restartMsg);
+ Awaitility.await()
+ .atMost(Duration.ofSeconds(ASSERTION_WAIT_SECONDS))
+ .pollInterval(Duration.ofSeconds(1))
+ .untilAsserted(() -> Assertions.assertThat(execute("infra
ps")).contains(newPID));
+ }
+}
diff --git
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/PluginListGetITCase.java
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/PluginListGetITCase.java
new file mode 100644
index 000000000000..081ed8042494
--- /dev/null
+++
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/PluginListGetITCase.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.it;
+
+import org.apache.camel.dsl.jbang.it.support.JBangTestSupport;
+import org.assertj.core.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+
+import static org.junit.jupiter.api.condition.OS.WINDOWS;
+
+@DisabledOnOs(WINDOWS)
+public class PluginListGetITCase extends JBangTestSupport {
+
+ @Test
+ public void testPluginList() {
+ checkCommandOutputs("plugin list", "Bundled plugins");
+ }
+
+ @Test
+ public void testPluginListShowsKnownPlugins() {
+ checkCommandOutputs("plugin list", "kubernetes");
+ }
+
+ @Test
+ public void testPluginGet() {
+ // plugin get is deprecated in favour of plugin list; output is blank
(no plugins) or shows a table
+ Assertions.assertThat(execute("plugin get").trim())
+ .as("plugin get should return blank or a list of installed
plugins")
+ .satisfiesAnyOf(
+ s -> Assertions.assertThat(s).isBlank(),
+ s -> Assertions.assertThat(s).contains("NAME"));
+ }
+}
diff --git
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/ProcessListITCase.java
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/ProcessListITCase.java
new file mode 100644
index 000000000000..9d6ca2f98407
--- /dev/null
+++
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/ProcessListITCase.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.it;
+
+import java.io.IOException;
+
+import org.apache.camel.dsl.jbang.it.support.JBangTestSupport;
+import org.assertj.core.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+
+import static org.junit.jupiter.api.condition.OS.WINDOWS;
+
+@DisabledOnOs(WINDOWS)
+public class ProcessListITCase extends JBangTestSupport {
+
+ @Test
+ public void testPsWithRunningIntegration() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ String pid = executeBackground(String.format("run %s/route2.yaml",
mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ checkCommandOutputs("ps", pid);
+ checkCommandOutputs("ps", "Running");
+ }
+
+ @Test
+ public void testPsEmpty() {
+ // no integration running; ps should produce no output (empty table)
+ execute("stop");
+ Assertions.assertThat(execute("ps").trim())
+ .as("ps should return empty when no integration is running")
+ .isEmpty();
+ }
+}
diff --git
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/RestartITCase.java
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/RestartITCase.java
new file mode 100644
index 000000000000..4f8bd47568d5
--- /dev/null
+++
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/RestartITCase.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.it;
+
+import java.io.IOException;
+import java.time.Duration;
+
+import org.apache.camel.dsl.jbang.it.support.JBangTestSupport;
+import org.assertj.core.api.Assertions;
+import org.awaitility.Awaitility;
+import org.junit.jupiter.api.Tag;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+
+import static org.junit.jupiter.api.condition.OS.WINDOWS;
+
+@Tag("container-only")
+@DisabledOnOs(WINDOWS)
+public class RestartITCase extends JBangTestSupport {
+
+ @Test
+ public void testRestart() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ String pid = executeBackground(String.format("run %s/route2.yaml",
mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ execute("restart " + pid);
+ // after restart a new process starts; verify the old PID is gone and
integration is Running again
+ Awaitility.await()
+ .atMost(Duration.ofSeconds(ASSERTION_WAIT_SECONDS))
+ .pollInterval(Duration.ofSeconds(1))
+ .untilAsserted(() -> {
+ String ps = execute("ps");
+ Assertions.assertThat(ps).as("restarted integration should
be Running").contains("Running");
+ Assertions.assertThat(ps).as("old PID should not be
present after restart")
+ .doesNotContainPattern("(?m)(^|\\s)" + pid +
"(\\s|$)");
+ });
+ checkCommandOutputs("get context", "Running");
+ }
+}
diff --git
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/RunMaxSecondsITCase.java
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/RunMaxSecondsITCase.java
new file mode 100644
index 000000000000..b8bb197baf58
--- /dev/null
+++
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/RunMaxSecondsITCase.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.it;
+
+import java.io.IOException;
+
+import org.apache.camel.dsl.jbang.it.support.JBangTestSupport;
+import org.assertj.core.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+
+import static org.junit.jupiter.api.condition.OS.WINDOWS;
+
+@DisabledOnOs(WINDOWS)
+public class RunMaxSecondsITCase extends JBangTestSupport {
+
+ @Test
+ public void testRunWithMaxSeconds() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ // run blocks until the integration stops; --max-seconds causes it to
stop after N seconds
+ execute(String.format("run %s/route2.yaml --max-seconds=5",
mountPoint()));
+ // after the command returns no integration is running
+ Assertions.assertThat(execute("ps")).as("no process should be running
after --max-seconds").isBlank();
+ }
+
+ @Test
+ public void testRunWithMaxMessages() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ // integration stops after processing the given number of messages
+ execute(String.format("run %s/route2.yaml --max-messages=3",
mountPoint()));
+ Assertions.assertThat(execute("ps")).as("no process should be running
after --max-messages").isBlank();
+ }
+}
diff --git
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/TopSubcommandsITCase.java
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/TopSubcommandsITCase.java
new file mode 100644
index 000000000000..af321dbdba51
--- /dev/null
+++
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/TopSubcommandsITCase.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.it;
+
+import java.io.IOException;
+
+import org.apache.camel.dsl.jbang.it.support.JBangTestSupport;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+
+import static org.junit.jupiter.api.condition.OS.WINDOWS;
+
+@DisabledOnOs(WINDOWS)
+public class TopSubcommandsITCase extends JBangTestSupport {
+
+ @Test
+ public void testTopContext() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ executeBackground(String.format("run %s/route2.yaml", mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ checkCommandOutputs("top context", "Running");
+ }
+
+ @Test
+ public void testTopProcessor() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ executeBackground(String.format("run %s/route2.yaml", mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ checkCommandOutputs("top processor", "route1");
+ }
+
+ @Test
+ public void testTopSource() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ executeBackground(String.format("run %s/route2.yaml", mountPoint()));
+ checkLogContains("Hello Camel from custom integration");
+ checkCommandOutputs("top source", "route2.yaml");
+ }
+
+ @Test
+ public void testTopGroup() throws IOException {
+ copyResourceInDataFolder(TestResources.GROUP_ROUTE);
+ executeBackground(String.format("run %s/GroupRoute.java",
mountPoint()));
+ checkLogContains("Group A message");
+ checkCommandOutputs("top group", "groupA");
+ }
+}
diff --git
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/TransformDataWeaveITCase.java
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/TransformDataWeaveITCase.java
new file mode 100644
index 000000000000..ef4c35fbde65
--- /dev/null
+++
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/TransformDataWeaveITCase.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.it;
+
+import org.apache.camel.dsl.jbang.it.support.JBangTestSupport;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+
+import static org.junit.jupiter.api.condition.OS.WINDOWS;
+
+@DisabledOnOs(WINDOWS)
+public class TransformDataWeaveITCase extends JBangTestSupport {
+
+ @Test
+ public void testTransformDataWeaveExpression() {
+ // convert an inline DataWeave expression to DataSonnet format
+ checkCommandOutputs(
+ "transform dataweave --expression='output application/json ---
{greeting: \"hello\"}'",
+ "greeting");
+ }
+
+ @Test
+ public void testTransformDataWeaveFile() {
+ newFileInDataFolder("hello.dwl", "output
application/json\n---\n{greeting: \"hello\"}\n");
+ checkCommandOutputs(
+ String.format("transform dataweave --input=%s/hello.dwl",
mountPoint()),
+ "greeting");
+ }
+}
diff --git
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/ValidateAdvancedITCase.java
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/ValidateAdvancedITCase.java
new file mode 100644
index 000000000000..f8c39d9e3902
--- /dev/null
+++
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/ValidateAdvancedITCase.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.it;
+
+import java.io.IOException;
+
+import org.apache.camel.dsl.jbang.it.support.JBangTestSupport;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+
+import static org.junit.jupiter.api.condition.OS.WINDOWS;
+
+@DisabledOnOs(WINDOWS)
+public class ValidateAdvancedITCase extends JBangTestSupport {
+
+ @BeforeEach
+ public void installValidatePlugin() {
+ execute("plugin add validate");
+ }
+
+ @Test
+ public void testValidateProperties() {
+ newFileInDataFolder("application.properties",
"camel.main.name=MyApp\n");
+ checkCommandOutputs(
+ String.format("validate properties %s/application.properties",
mountPoint()),
+ "Validation success");
+ }
+
+ @Test
+ public void testValidateSource() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ // validate source accepts any Camel source file including YAML routes
+ checkCommandOutputs(
+ String.format("validate source %s/route2.yaml", mountPoint()),
+ "Validation success");
+ }
+
+ @Test
+ public void testValidateNormalize() throws IOException {
+ copyResourceInDataFolder(TestResources.ROUTE2);
+ // normalize rewrites YAML routes into canonical form; output contains
the normalised route
+ checkCommandOutputs(
+ String.format("validate normalize %s/route2.yaml",
mountPoint()),
+ "timer");
+ }
+}
diff --git
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/WrapperITCase.java
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/WrapperITCase.java
new file mode 100644
index 000000000000..ff02853c0a29
--- /dev/null
+++
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/WrapperITCase.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.it;
+
+import org.apache.camel.dsl.jbang.it.support.JBangTestSupport;
+import org.assertj.core.api.Assertions;
+import org.junit.jupiter.api.Tag;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+
+import static org.junit.jupiter.api.condition.OS.WINDOWS;
+
+@Tag("container-only")
+@DisabledOnOs(WINDOWS)
+public class WrapperITCase extends JBangTestSupport {
+
+ @Test
+ public void testWrapper() {
+ // wrapper installs camelw/camelw.cmd scripts in a directory; use a
temp dir inside the container
+ execInContainer(getMainCommand() + " wrapper --dir=/tmp/wrapper-test");
+ Assertions.assertThat(execInContainer("ls /tmp/wrapper-test"))
+ .as("wrapper should create camelw script")
+ .contains("camelw");
+ }
+}
diff --git
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/support/JBangTestSupport.java
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/support/JBangTestSupport.java
index f8bd6d0c5730..e1ae279715d1 100644
---
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/support/JBangTestSupport.java
+++
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/support/JBangTestSupport.java
@@ -134,6 +134,7 @@ public abstract class JBangTestSupport {
protected enum TestResources {
ROUTE2("route2.yaml", "/jbang/it/route2.yaml"),
+ ROUTE2_ONCE("route2-once.yaml", "/jbang/it/route2-once.yaml"),
TEST_PROFILE_PROP("application-test.properties",
"/jbang/it/application-test.properties"),
HELLO_NAME("helloName.xml", "/jbang/it/helloName.xml"),
MQQT_CONSUMER("mqttConsumer.yaml", "/jbang/it/mqttConsumer.yaml"),
@@ -149,8 +150,9 @@ public abstract class JBangTestSupport {
STUB_ROUTE("StubRoute.java", "/jbang/it/StubRoute.java"),
HISTORY_ROUTE("HistoryRoute.java", "/jbang/it/HistoryRoute.java"),
USER_SOURCE_KAMELET("user-source.kamelet.yaml",
"/jbang/it/user-source.kamelet.yaml"),
- USER_SOURCE_CONSUMER("user-source-consumer.camel.yaml",
"/jbang/it/user-source-consumer.camel.yaml"),
- GROUP_ROUTE("GroupRoute.java", "/jbang/it/GroupRoute.java");
+ GROUP_ROUTE("GroupRoute.java", "/jbang/it/GroupRoute.java"),
+ ERROR_ROUTE("error-route.yaml", "/jbang/it/error-route.yaml"),
+ USER_SOURCE_CONSUMER("user-source-consumer.camel.yaml",
"/jbang/it/user-source-consumer.camel.yaml");
private String name;
private String resPath;
diff --git
a/dsl/camel-jbang/camel-jbang-it/src/test/resources/jbang/it/error-route.yaml
b/dsl/camel-jbang/camel-jbang-it/src/test/resources/jbang/it/error-route.yaml
new file mode 100644
index 000000000000..b7b1e7b2380b
--- /dev/null
+++
b/dsl/camel-jbang/camel-jbang-it/src/test/resources/jbang/it/error-route.yaml
@@ -0,0 +1,23 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+- from:
+ uri: "timer:error?period=2000"
+ steps:
+ - throwException:
+ exceptionType: "java.lang.RuntimeException"
+ message: "simulated test error"
diff --git
a/dsl/camel-jbang/camel-jbang-it/src/test/resources/jbang/it/route2-once.yaml
b/dsl/camel-jbang/camel-jbang-it/src/test/resources/jbang/it/route2-once.yaml
new file mode 100644
index 000000000000..1149d553e81b
--- /dev/null
+++
b/dsl/camel-jbang/camel-jbang-it/src/test/resources/jbang/it/route2-once.yaml
@@ -0,0 +1,26 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+- from:
+ uri: "timer:yaml"
+ parameters:
+ period: "1000"
+ repeatCount: "3"
+ steps:
+ - setBody:
+ constant: "Hello Camel from custom integration"
+ - log: "${body}"