feat(signet-orders): add integration tests #180
Merged
+550
−4
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 adds mocks and integration tests for the
Fillerand theFeePolicySubmitterstructs.I used the
ProviderBuilder::connect_mocked_clientto construct theMockTxBuilder, and initially includedwith_gas_estimationandwith_simple_nonce_management. However, the internal implementation of the resulting provider means that concurrent calls are made to the mocked client (there are a couple of uses oftry_join!) hence making it impossible to reliably prepare the asserter (as it needs a deterministic order of expected RPC calls).To work around this, I made the
MockTxBuilder::fillmodify the provided txs to set their nonce and gas fields if not already set, meaning client RPC calls for these are now avoided. I'm not a fan of this, so if there's a better approach I'd be happy to change to that!