gnodet-bot commented on code in PR #28526:
URL: https://github.com/apache/camel/pull/28526#discussion_r4378242023
##########
dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/RunCommandITCase.java:
##########
@@ -132,13 +133,15 @@ public void runRouteFromGistTest() {
}
@Test
- @Tag("container-only")
public void runDownloadedFromGithubTest() {
- execute("init
https://github.com/apache/camel-kamelets-examples/tree/main/jbang/dependency-injection");
-
Assertions.assertThat(containerService.listDirectory(DEFAULT_ROUTE_FOLDER))
+ execute("init
https://github.com/apache/camel-kamelets-examples/tree/main/jbang/dependency-injection
--directory="
+ + mountPoint());
+ Assertions
+ .assertThat(Paths.get(getDataFolder()).toFile().listFiles())
.as("default route directory")
+ .extracting("name")
.contains("Echo.java", "Hello.java", "README.adoc",
"application.properties");
- executeBackground("run *");
+ executeBackground(String.format("run %s/*", mountPoint()));
checkLogContains("JackJack!! from Echo");
}
Review Comment:
⚠️ **Near-duplicate test:** after this change, `runDownloadedFromGithubTest`
is almost identical to `runDownloadedInDirectoryFromGithubTest` (lines 149–159
in the new file). Both use `--directory=mountPoint()`, assert files via
`Paths.get(getDataFolder()).toFile().listFiles().extracting("name")`, run
`mountPoint()/*`, and check the same log. The only differences are the
assertion description and `contains` vs `containsExactlyInAnyOrder`.
The original test's purpose was to verify the *default* (no `--directory`
flag) download location — that is now lost. Consider either:
- Restoring the original intent (omit `--directory`, verify the default
working dir)
- Or merging the two into one parameterised test to remove the duplication
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]