Run the vanilla tests using both the flashblocks builder and the vanilla builder #143
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.
📝 Summary
This PR closes:
and builds on top of:
Automatic unit tests generation for both standard and flashblocks builders.
When writing unit or integration tests instead of using
#[tokio::test] async test_name()
use therb_test
macro and let theLocalInstance
be injected by the macro by the test infrastructure. In this mode a sample unit test would look as follows:then when you run
cargo test
it will automatically generate both variants of this test:This macro can be configured to either run in only flashbots mode, only standard mode, use custom
RBuilderArgs
use customNodeConfig
, etc. Examples of using this macro are in thetests
directory.There is also a new macro called
if_flashblocks!
that allows you to specify a block of code that runs only under the flashblocks variant of a test. Example:Use this macro if the differences between variants are minimal and don't merit writing two versions of the test, otherwise use
#[rb_test(standard)]
and#[rb_test(flashbots)]
to narrow down the generation to one builder.✅ I have completed the following steps:
make lint
make test