davsclaus commented on code in PR #26665:
URL: https://github.com/apache/camel/pull/26665#discussion_r4060689984
##########
dsl/camel-kamelet-main/src/test/java/org/apache/camel/main/download/DependencyDownloaderResourceLoaderTest.java:
##########
@@ -61,6 +61,20 @@ void aResourceThatIsNowhereKeepsItsName() {
assertEquals("classpath:missing.groovy", resource.getLocation(), "the
error names the resource as written");
}
+ /** CAMEL-24865: under --source-dir a resource that exists nowhere keeps
its original (not found) answer. */
+ @Test
+ void aMissingResourceUnderSourceDirIsStillMissing() throws Exception {
+ Path sourceDir = Files.createDirectory(routes.resolve("src"));
+ SimpleCamelContext context = new SimpleCamelContext();
+ DependencyDownloaderResourceLoader loader
+ = new DependencyDownloaderResourceLoader(context,
sourceDir.toString(), List.of());
+
+ Resource resource =
loader.resolveResource("classpath:camel-joor.properties");
Review Comment:
Added as suggested: the test now also resolves
`classpath:camel-joor.properties?optional=true` and checks it stays the
original, non-existing classpath resource.
--
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]