Revamp mock testing artifacts in the ibc-testkit
#677
Labels
O: testing
Objective: aims to improve testing coverage
ibc-testkit
#677
Summary
We need a new, more flexible mock testing artifacts exposed by
ibc-testkit
so can cover a wider range of testing scenarios and achieve a better coverage of recent updates to IBC-rs (Instead of constantly tweaking the existing abstractions). That being said, we may be able to repurpose certain components and abstraction from the existing one.Proposal
Some points might worth to consider:
Abstract real-life interactions between components
A proposal is to break down the elements within the current
MockContext
and abstract each chain's component separately (including a synthetic block generator as our consensus engine simulator, an in-memory storage, a minimal app with a single IBC module, and some functions to mimic a relayer). With these individual components, we can shape a minimal mock chain struct that closely resemble a real one, easier to understand how the system behaves, more extensible which enables us to define mock chains with different characteristics and test scenarios may require multiple chains.Incorporate an AVL store
Enables us to better cover Tendermint-specific and proof verification parts. This could be achieved by importing needed types from Basecoin repo (Though some adjustments possibly needed there), which supersedes existing
MockIbcStore
Remove unnecessary
HostType
enumLooking at the functionality both
Mock
andSyntheticTendermint
serve, we can merge both and leave with a single mock host.Tracked in #1109
Remarks
This issue can be seen part of a broader theme surfaced in Define testing strategy #433. Here, we should eventually clarify which tests can be covered by the new mock artifacts and which will remain out of the scope to be dealt with in other locations like
basecoin-rs
. However, for the new mock development, some preliminary work may be needed around defining testing strategyAdditionally, the outcome of this work would facilitate the resolution of concerns raised in Refactor unit tests #429
The text was updated successfully, but these errors were encountered: