testcontainers / testcontainers-java

Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.
https://testcontainers.org
MIT License
7.99k stars 1.64k forks source link

[Enhancement]: Upgrade mockserver-client-java and fix MockServerContainerRuleTest #5975

Closed eddumelendez closed 2 years ago

eddumelendez commented 2 years ago

Module

MockServer

Proposal

Context:

MockServerContainerRuleTest fails when upgrading to 5.14.0. It is recommended to use the same server and client version. Currently, MockServerContainerTest uses MockServerClient.class.getPackage().getImplementationVersion() to get the version and use it as a tag in the docker image. This approach is different from MockServerContainerRuleTest and that’s why it fails.

Proposal:

Read MockServerClient.class.getPackage().getImplementationVersion() and use it as a part of the tag in MockServerContainerRuleTest. Use image mockserver/mockserver

sivaprasadreddy commented 2 years ago

Hi @eddumelendez With 'org.mock-server:mockserver-client-java:5.14.0' dependency the MockServerClient.class.getPackage().getImplementationVersion() returns 5.14.0 but there is no jamesdbloom/mockserver docker image published with 5.14.0 tag yet (https://hub.docker.com/r/jamesdbloom/mockserver/tags).

Do you mean we keep testImplementation 'org.mock-server:mockserver-client-java:5.13.2' dependency and update the image in MockServerContainerRuleTest to use jamesdbloom/mockserver:mockserver-5.14.0 and dynamically fetch the actualVersion and use it?

eddumelendez commented 2 years ago

@sivaprasadreddy thanks! I've updated the description in order to use mockserver/mockserver

sivaprasadreddy commented 2 years ago

@eddumelendez Created a PR https://github.com/testcontainers/testcontainers-java/pull/5977