-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a Demo for WireMock as a proxy in front of another service #81
Comments
I have started working on the same. |
Hello, @oleg-nenashev, @kapishmalik - is this still needed? I wouldn't mind working on a little demo/tutorial |
Yes, this item is still relevant |
Hello @oleg-nenashev, I started looking into this :) If I understood well, we want to test the interaction between a simple "client" app and the service it depends on. This "server" will expose a REST API and it will be provisioned for testing via Testconatienrs and docker compose. Then, we'll use a WireMock to proxy the "server" app running in the testcontainer. We can showcase tests for the happy flow, as well as inject errors or delays to test the corner cases. I have prepared a small demo trying to keep things very simple, here is a link: etrandafir93/wiremock-testcontainers-practice. As you'll see in the example, I have tried to keep things simple by:
Finally, I wanted to mention that everything here is very raw. But if you think the direction is good, I can write a Baeldung-style article describing how to set up everything. Let me know what you think, |
Hi @etrandafir93 . Any documentation is always welcome. If you do not use the testcontainers module for this use case, maybe it is better to target the WireMock blog or another resource. @leeturner can probably support you, please reach out to him on slack |
Hey @oleg-nenashev - I have joined slack and got in contact with Lee. I have created this PR for the wiremock-exampels repo, thanks! |
Proposal
One can use Testcontainers for Java to deploy multiple instances in Docker Compose, and we have a concept for that but not existing demo. It would be nice to have an API service provisioned in Testcontainers, and a WireMock mocking a particular request (e,g, injecting a fault) just for one request. The service suggestions are welcome!
References
No response
The text was updated successfully, but these errors were encountered: