Webhook test and Testcontainers networking#40
Merged
Conversation
9b6d861 to
152f442
Compare
oleg-nenashev
approved these changes
May 23, 2023
Member
oleg-nenashev
left a comment
There was a problem hiding this comment.
Fine with me though I would have just used two WireMock Rule instances, It might be reasonable to not do so to avoid some false positive correlation, but could reduce the code size considerably
| public static final String APPLICATION_PATH = "/application/callback-receiver"; | ||
|
|
||
|
|
||
| public TestHttpServer applicationServer = TestHttpServer.newInstance(); |
Member
There was a problem hiding this comment.
Could be another WireMock instance though
Contributor
Author
There was a problem hiding this comment.
Let me play with that to see witch approach looks better (Wiremock vs Custom Server)
Member
|
@bitxon I will merge this one for now, we can always improve on the top of it. And thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When we work with Webhook callbacks, Testcontainers(Docker) brings additional complexity related to networking, because wiremock that inside docker needs to make request to host machine. This requires additional configuration
That is why i decided to add Tests that verify it and could be used as an example in documentation (in future)
Links
https://www.testcontainers.org/features/networking/
References
N/A
Submitter checklist