Integration Test DSL - #214
Merged
Merged
Conversation
clj -X:broker-caps
- take in requirements directly instead of the broker - allows for storing requirements as metadata in the specific test namespace itself
- fixture function objects for redis and rmq - a commented out test broker-utils for exps
14 tasks
Contributor
Author
|
experimental def-integration-test macro for abstracting out further boilerplate logged here : proceeding with more minimal and decisive refactors towards closing this PR for now:
|
ashutoshgngwr
approved these changes
Apr 29, 2026
This was referenced Apr 29, 2026
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.
Currently, goose devs need to write similar integration tests per broker implementation (see #202)
This PR targets this problem of having to repeat yourself by abstracting out the boilerplate and providing a minimal integration test DSL to test goose, without having to deal with the leaks of what broker implementation is being used underneath.
Coverage across brokers might vary and all implementations may not qualify for certain tests. Capability computations (static reflection (unimplemented methods would be abstract)) based on methods implemented (of the broker protocol) help kick off a generic test loop that only tests a particular broker when it satisfies the requirements for that scenario.
testing a new broker implementation only involves registering fixtures, (client and worker) opts and the static implementation as data (in a broker utilities map and a vector that capability computer picks up), that the engine later picks up and executes upon.
The final def-integration-test anaphoric macro enables concisely communicating domain specific intent by only demanding what is needed (test scenario, requirements, distilled body), while exposing templatized anaphoras (broker and test-name).
the plumbing of checking side effects of an execution, picking up broker utilities are neatly abstracted away as well.