Skip to content

Make MockServer compatible with newer (5.11.x) versions#3437

Merged
bsideup merged 8 commits intotestcontainers:masterfrom
lanwen:mockserver
Dec 11, 2020
Merged

Make MockServer compatible with newer (5.11.x) versions#3437
bsideup merged 8 commits intotestcontainers:masterfrom
lanwen:mockserver

Conversation

@lanwen
Copy link
Copy Markdown
Contributor

@lanwen lanwen commented Nov 7, 2020

fixes #2984, #2710

in mock-server/mockserver@9f27af0 mockserver introduced a GET http healthcheck (what was released in 5.9.0) and since 5.11.0 uses distroless image, because of what with the default wait strategy, we hit into #3317

As the 5.11.0+ is actually a smaller image, more secure lots of people should definitely update. However old versions should be supported as well and thanks to #3533 its possible now to use a PUT request to check liveness.

In the test I also explicitly use 5.9.0+ status env variable to emphasize the ping endpoint works fine

This PR also brings two small changes to be complete - mockserver official image now is mockserver/mockserver (I added it as a compatible).
And added a small note to the docs regarding matched version of a client, as anyway had to change docs after test adjustments (wasn't able to test properly with rule in the same class a new version with an old version at the same time).

fixes testcontainers#2984, testcontainers#2710

in mock-server/mockserver@9f27af0 mockserver introduced a GET http healthcheck (what was released in 5.9.0) and since 5.11.0 uses distroless image, with the default wait strategy, we hit into testcontainers#3317

As the 5.11.0+ is actually a smaller image, more secure and 5.9.0 was released almost a year ago (which means users with 5.9.0+ versions would be able to update testcontainers without changes), I think worth bumping the base version.

For the users on old versions the old behaviour could be set with the default waiting strategy back
`.waitingFor(Wait.defaultWaitStrategy())`.

This PR also brings two small changes to be complete - mockserver official image now is `mockserver/mockserver` (but I added previous as a compatible).
And added small note to the docs regarding matched version of a client, as anyway had to change docs after test adjustments (wasn't able to test properly with rule in the same class as old version).
@lanwen lanwen changed the title MAIN update mockserver to 5.11.1 with a new http wait strategy MAIN update mockserver to 5.11.2 with a new http wait strategy Nov 9, 2020
@lanwen lanwen changed the title MAIN update mockserver to 5.11.2 with a new http wait strategy Update mockserver to 5.11.2 with a new http wait strategy Dec 10, 2020
@lanwen
Copy link
Copy Markdown
Contributor Author

lanwen commented Dec 10, 2020

with #3533 we can support old images as well, will update the PR

@bsideup bsideup added this to the 1.15.1 milestone Dec 10, 2020
@lanwen lanwen changed the title Update mockserver to 5.11.2 with a new http wait strategy Update mockserver to use a http wait strategy with PUT method Dec 10, 2020
@lanwen
Copy link
Copy Markdown
Contributor Author

lanwen commented Dec 10, 2020

@bsideup I updated the PR as well as the PR description

@bsideup bsideup merged commit 16c82a4 into testcontainers:master Dec 11, 2020
@bsideup bsideup changed the title Update mockserver to use a http wait strategy with PUT method Make MockServer compatible with newer (5.11.x) versions Dec 11, 2020
@lanwen lanwen deleted the mockserver branch December 11, 2020 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mock Server doesn't start after updating to 5.11.0

2 participants