-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Sub-events and V2 extensions #2238
Merged
Merged
Conversation
This file contains 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
… ServeEvent as a method param) extension point and migrated templating to use this
…precated the original one
…enters don't need loads of redundant methods
…menters don't need loads of redundant methods
…y can later be attached to the ServeEvent. Modified the core matchers so that they add errors/warnings as sub events (in addition to logging them via notifier()).
…ment) to allow generic listeners to be written then bound to specific request phases + parameters
…n be triggered after the client has returned thus causing a race condition with a straight assertion
… service is created at startup time from which extensions are loaded. This will allow dependency injection to be added in a single place.
…ssible to inject core WireMock service classes.
…factory classes with a WireMockServices parameter
…e serving asyncronicity
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.
This introduces some architectural changes which add the concept of sub-events to
ServeEvent
, while making the currentServeEvent
visible throughout the request processing code.SubEvents can be used to report information of interest created during request processing e.g. errors thrown by matchers. Adding sub-events in this manner means that this information can be surfaced via the request log part of WireMock's API, whereas currently it is necessary to have access to the log.
The diff report generated by WireMock is now appended as a sub-event so this is visible in the log in addition to the HTTP response.
All of the extension points that affect request processing have been deprecated and replaced with V2 versions that take
ServeEvent
as a parameter.References
See discussion in #1512
Submitter checklist