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 ae1dc48542f1 CAMEL-27770,CAMEL-27768: fix broken camel-jbang IT tests 
(VersionCommandITCase and WrapperITCase) (#31124)
ae1dc48542f1 is described below

commit ae1dc48542f1fd978ab5149188c48ef85aa931c4
Author: Guillaume Nodet <[email protected]>
AuthorDate: Mon Nov 30 14:00:33 2026 +0100

    CAMEL-27770,CAMEL-27768: fix broken camel-jbang IT tests 
(VersionCommandITCase and WrapperITCase) (#31124)
    
    VersionCommandITCase used Camel 3.20.2 in two tests, but VersionSet now
    rejects all Camel 3.x versions with 'is not supported: the Camel CLI runs
    Camel 4.0 or newer'. Fix: use 4.0.0 (the first supported GA release).
    
    WrapperITCase asserted that wrapper creates a 'camelw' script, but
    WrapperCommand defaults commandName to 'camel' since CAMEL-23438, so it
    generates 'camel' and 'camel.cmd' instead. Fix: assert for the actual
    generated script names.
    
    This change was created by an AI coding agent on behalf of gnodet.
---
 .../java/org/apache/camel/dsl/jbang/it/VersionCommandITCase.java  | 8 ++++----
 .../test/java/org/apache/camel/dsl/jbang/it/WrapperITCase.java    | 7 ++++---
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git 
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/VersionCommandITCase.java
 
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/VersionCommandITCase.java
index e3975d1dd141..65ec08ddd446 100644
--- 
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/VersionCommandITCase.java
+++ 
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/VersionCommandITCase.java
@@ -31,11 +31,11 @@ public class VersionCommandITCase extends JBangTestSupport {
     public void versionCommandTest() {
         Assertions.assertThat(execute("version").trim())
                 .contains("Camel CLI version: " + version());
-        execute("version set 3.20.2");
+        execute("version set 4.0.0");
         Assertions.assertThat(execute("version").trim())
                 .contains("Camel CLI version: " + version())
                 .contains("User configuration:")
-                .contains("camel-version = 3.20.2");
+                .contains("camel-version = 4.0.0");
     }
 
     @Test
@@ -48,9 +48,9 @@ public class VersionCommandITCase extends JBangTestSupport {
 
     @Test
     public void executeAfterVersionSetTest() {
-        execute("version set 3.20.2");
+        execute("version set 4.0.0");
         initAndRunInBackground("foo.java");
-        checkLogContains("Apache Camel (JBang) 3.20.2 is starting");
+        checkLogContains("Apache Camel (JBang) 4.0.0 is starting");
     }
 
     @Test
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
index ff02853c0a29..1a77350786ae 100644
--- 
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
@@ -30,10 +30,11 @@ 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
+        // wrapper installs camel/camel.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");
+                .as("wrapper should create camel and camel.cmd scripts")
+                .contains("camel")
+                .contains("camel.cmd");
     }
 }

Reply via email to