Skip to content

test: use versioned MongoDB Testcontainers image#2336

Closed
codingkiddo wants to merge 2 commits into
hantsy:masterfrom
codingkiddo:test/pin-mongodb-testcontainer-image
Closed

test: use versioned MongoDB Testcontainers image#2336
codingkiddo wants to merge 2 commits into
hantsy:masterfrom
codingkiddo:test/pin-mongodb-testcontainer-image

Conversation

@codingkiddo

Copy link
Copy Markdown

Summary

Use a versioned MongoDB Docker image for the boot-exception-handler Testcontainers 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

cd boot-exception-handler
./mvnw clean test

Signed-off-by: Vinod Kumar <vinodkumar@192.168.1.6>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@codingkiddo

Copy link
Copy Markdown
Author

Thanks! I kept this PR intentionally small and limited to the test container image configuration.

@rajadilipkolli

Copy link
Copy Markdown
Contributor

@codingkiddo , Can you please add the same fix to all modules ?

@codingkiddo

Copy link
Copy Markdown
Author

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>
@codingkiddo

Copy link
Copy Markdown
Author

@rajadilipkolli Thanks! I’ve now applied the same versioned MongoDB Testcontainers image update to the other relevant modules that were still using mongo or mongo:latest, and pushed the follow-up changes to this PR.

I left the existing mongo:4 usages unchanged since those are already pinned to a specific version.

@hantsy hantsy force-pushed the master branch 2 times, most recently from ef58279 to ee71841 Compare June 3, 2026 03:37
Repository owner deleted a comment from qodo-code-review Bot Jun 3, 2026
@hantsy

hantsy commented Jun 3, 2026

Copy link
Copy Markdown
Owner

@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.

@hantsy hantsy closed this Jun 3, 2026
@codingkiddo

Copy link
Copy Markdown
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants