atiaomar1978-hub opened a new pull request, #25284:
URL: https://github.com/apache/camel/pull/25284

   ## Summary
   
   Fixes [CAMEL-24323](https://issues.apache.org/jira/browse/CAMEL-24323): 
`MongoDbSslConnectionIT` fails to start the TLS MongoDB Testcontainer with:
   
   `Could not find the file / in container`
   
   **Root cause:** `MongoDBLocalContainerTLSService` mapped an entire classpath 
**directory** via `withClasspathResourceMapping`. Testcontainers 2.x uses a 
copy strategy for read-only classpath mappings that breaks on directory mounts 
in CI.
   
   **Fix:** Copy TLS cert files individually with 
`MountableFile.forClasspathResource` + `withCopyFileToContainer` (same approach 
as other Camel test-infra services, e.g. Kafka JAAS config).
   
   ## Changes
   
   - `MongoDBLocalContainerTLSService` — per-file cert copy for `server.pem` 
and `ca.pem`
   - `MongoDBLocalContainerTLSServiceTest` — classpath resource + MountableFile 
+ TLS command config coverage (3 tests)
   - `MongoDbSslConnectionIT` — added `testInsertAndCountOverTls` round-trip 
assertion
   
   ## Test plan
   
   - [x] `mvn test -pl test-infra/camel-test-infra-mongodb 
-Dtest=MongoDBLocalContainerTLSServiceTest`
   - [x] `mvn test -pl components/camel-mongodb -am 
-Dtest=MongoDbSslConnectionIT` (Docker)
   
   _AI-generated PR description on behalf of 
[atiaomar1978-hub](https://github.com/atiaomar1978-hub)_
   
   Made with [Cursor](https://cursor.com)


-- 
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]

Reply via email to