You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
zcash_client_sqlite::testing contains a TestBuilder that can be used to produce a TestState, on which a test can operate. The test framework is generic over a block cache, that can optionally be provided with a TestCache implementation for tests that require block scanning. However, it currently hard-codes zcash_client_sqlite::WalletDb as the wallet that is tested.
In order to make the tests reusable with other wallet backends, we should rework TestBuilder etc to be generic over a TestWallet trait, that exposes the necessary operations that we currently depend on concrete WalletDb methods for. The new generic TestBuilder parameter should also be bound on WalletRead, WalletWrite, etc. as appropriate (i.e. only when the test framework requires a given bound).
Once that refactor is done, we can then move the test framework to zcash_client_backend behind the test-dependencies feature flag, and depend on it from zcash_client_sqlite. This will then free us up to subsequently genericise and migrate individual tests from zcash_client_sqlite to zcash_client_backend as we wish.
The text was updated successfully, but these errors were encountered:
FYI: I made some progress on this yesterday after discussing with @nuttycom that this is a good time. I will keep working on it and submit a PR soon (today or in the next few days). For easier review my current plan is to push 2 PRs, one with the all the refactoring needed inside zcash_client_sqlite and after we are happy with it, make another one with the actual move.
zcash_client_sqlite::testing
contains aTestBuilder
that can be used to produce aTestState
, on which a test can operate. The test framework is generic over a block cache, that can optionally be provided with aTestCache
implementation for tests that require block scanning. However, it currently hard-codeszcash_client_sqlite::WalletDb
as the wallet that is tested.In order to make the tests reusable with other wallet backends, we should rework
TestBuilder
etc to be generic over aTestWallet
trait, that exposes the necessary operations that we currently depend on concreteWalletDb
methods for. The new genericTestBuilder
parameter should also be bound onWalletRead
,WalletWrite
, etc. as appropriate (i.e. only when the test framework requires a given bound).Once that refactor is done, we can then move the test framework to
zcash_client_backend
behind thetest-dependencies
feature flag, and depend on it fromzcash_client_sqlite
. This will then free us up to subsequently genericise and migrate individual tests fromzcash_client_sqlite
tozcash_client_backend
as we wish.The text was updated successfully, but these errors were encountered: