Conversation
smatting
approved these changes
Jan 25, 2023
mdimjasevic
reviewed
Jan 25, 2023
elland
reviewed
Jan 25, 2023
mdimjasevic
approved these changes
Jan 25, 2023
Contributor
There was a problem hiding this comment.
Given that withTempMockFederator is gone, how about renaming the remaining withTempMockFederator' to withTempMockFederator?
Contributor
Author
There was a problem hiding this comment.
It's not gone, it's the low-level function that is used by withTempMockFederator'. We could consider condensing all of these into a single function that takes a Mock parameter, but I would leave it for another PR.
8ca5fd6 to
0739f2b
Compare
0739f2b to
ccfc113
Compare
ccfc113 to
beead90
Compare
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.
This PR introduces a very simple system for specifying federation mocks in a composable way. This replaces previous attempts (in Galley) that were only adopted in a few tests. All instances of mocked federator are now using the new system.
The system itself is a super-minimalistic "web framework" of sorts, based on a
ReaderT FederatedRequest MaybeTmonad transformer. You useguardto expect a certain request, and theAlternativecombinators to specify multiple responses based on various criteria.Checklist
changelog.d