test: use versioned MongoDB Testcontainers image#2336
Conversation
Signed-off-by: Vinod Kumar <vinodkumar@192.168.1.6>
There was a problem hiding this comment.
Code Review
This pull request updates the ContainerConfig test configuration to use a specific MongoDB Docker image version (mongo:8.0) instead of the latest tag, improving build reproducibility. It also introduces a DockerImageName constant for the image definition. I have no feedback to provide.
|
Thanks! I kept this PR intentionally small and limited to the test container image configuration. |
|
@codingkiddo , Can you please add the same fix to all modules ? |
|
Sure, I’ll apply the same versioned MongoDB Testcontainers image update to the other relevant modules and push the changes to this PR. Thanks for pointing that out. |
Signed-off-by: Vinod Kumar <vinodkumar@10.145.106.30>
|
@rajadilipkolli Thanks! I’ve now applied the same versioned MongoDB Testcontainers image update to the other relevant modules that were still using I left the existing |
ef58279 to
ee71841
Compare
|
@codingkiddo The codes in this PR is conflict. And most of the time, I would like to use the Spring Boot generated TestContainers config which should alwasy considered the newest versions, unless there are some specific features in the newest version, such as Elasticsearch, which enabled tls connecction by default since v8. |
Thanks for the clarification. I see that the module has moved to the Spring Boot generated TestcontainersConfiguration setup, and I understand your preference to keep the generated Testcontainers config and use the newest image unless there is a specific compatibility reason to pin a version. Closing this PR will avoid unnecessary churn. Thanks for reviewing. |
Summary
Use a versioned MongoDB Docker image for the
boot-exception-handlerTestcontainers configuration.Why
The test configuration currently uses
mongo:latest, which is a moving target and can change unexpectedly over time. Using a versioned image makes the integration test setup more reproducible and predictable.Future MongoDB upgrades can still be done intentionally by updating the image tag and running the test suite.
Testing