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 f9dbcf4603e fix(jbang): parameterized export test (#15701) f9dbcf4603e is described below commit f9dbcf4603e12532f68291a9af743bf75d8b5366 Author: Pasquale Congiusti <pasquale.congiu...@gmail.com> AuthorDate: Wed Sep 25 19:27:32 2024 +0200 fix(jbang): parameterized export test (#15701) The test is now creating the generic exporting class which is initialized correctly with its runtime --- .../org/apache/camel/dsl/jbang/core/commands/ExportMainJibTest.java | 2 +- .../apache/camel/dsl/jbang/core/commands/ExportMainJkubeTest.java | 2 +- .../java/org/apache/camel/dsl/jbang/core/commands/ExportTest.java | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ExportMainJibTest.java b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ExportMainJibTest.java index 7737b4dc4e8..3379b302eae 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ExportMainJibTest.java +++ b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ExportMainJibTest.java @@ -66,7 +66,7 @@ class ExportMainJibTest { Files.copy(new File("src/test/resources/application-jib.properties").toPath(), profile.toPath(), StandardCopyOption.REPLACE_EXISTING); - Export command = new ExportCamelMain(new CamelJBangMain()); + Export command = new Export(new CamelJBangMain()); CommandLine.populateCommand(command, "--gav=examples:route:1.0.0", "--dir=" + workingDir, "--runtime=%s".formatted(rt.runtime()), "target/test-classes/route.yaml"); int exit = command.doCall(); diff --git a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ExportMainJkubeTest.java b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ExportMainJkubeTest.java index b809c68c11c..ec9add50836 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ExportMainJkubeTest.java +++ b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ExportMainJkubeTest.java @@ -66,7 +66,7 @@ class ExportMainJkubeTest { Files.copy(new File("src/test/resources/application-jkube.properties").toPath(), profile.toPath(), StandardCopyOption.REPLACE_EXISTING); - Export command = new ExportCamelMain(new CamelJBangMain()); + Export command = new Export(new CamelJBangMain()); CommandLine.populateCommand(command, "--gav=examples:route:1.0.0", "--dir=" + workingDir, "--runtime=%s".formatted(rt.runtime()), "target/test-classes/route.yaml"); int exit = command.doCall(); diff --git a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ExportTest.java b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ExportTest.java index 5f5305974b0..a30db16dcc7 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ExportTest.java +++ b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ExportTest.java @@ -77,7 +77,7 @@ class ExportTest { @ParameterizedTest @MethodSource("runtimeProvider") public void shouldGenerateProjectWithBuildProperties(RuntimeType rt) throws Exception { - Export command = new ExportSpringBoot(new CamelJBangMain()); + Export command = new Export(new CamelJBangMain()); CommandLine.populateCommand(command, "--gav=examples:route:1.0.0", "--dir=" + workingDir, "--runtime=%s".formatted(rt.runtime()), "--build-property=foo=bar", "target/test-classes/route.yaml"); int exit = command.doCall(); @@ -94,7 +94,7 @@ class ExportTest { @ParameterizedTest @MethodSource("runtimeProvider") public void testShouldGenerateProjectMultivalue(RuntimeType rt) throws Exception { - Export command = new ExportSpringBoot(new CamelJBangMain()); + Export command = new Export(new CamelJBangMain()); CommandLine.populateCommand(command, "--gav=examples:route:1.0.0", "--dir=" + workingDir, "--runtime=%s".formatted(rt.runtime()), "--dep=foo:bar:1.0,jupiter:rocks:2.0", // it's important for the --build-property to be the last parameter to test a previous @@ -117,7 +117,7 @@ class ExportTest { } private Export createCommand(RuntimeType rt, String[] files, String... args) { - Export command = new ExportSpringBoot(new CamelJBangMain()); + Export command = new Export(new CamelJBangMain()); CommandLine.populateCommand(command, "--gav=examples:route:1.0.0", "--dir=" + workingDir, "--quiet", "--runtime=%s".formatted(rt.runtime())); if (args != null) {