test: Implement integration tests #289
Draft
tvpeter wants to merge 28 commits into
Draft
Conversation
- move all blockchain clients code into the backend subdirectory - move commands.rs content into commands subdirectory
- split util fns into `descriptors` and `common`
- move persister into wallet subdirectory - update imports in payjoin module
- split handlers into top level commands config, key and descriptors
- move handler fns into offline, online, wallets modules
- split handler fns into repl - add entry point to the handlers subdir - add wallet subdir entry point
- add trait for formatting outputs - add types for presenting data to the output - refactor offline mod to use types
- add types for descriptor, key and wallets mods
- add simple table helper fn for creating tables - refactor types to use simple table helper - add type defs for key, wallets and descriptors
- rebase master for bip322 feature - update types to use simple table helper
- move wallet subdir into the persister module to simplify the structure as wallet was confusing
- remove --pretty flag - move types to utils - update commands
- add run fn in main to handle routing
- move execution logic into config, desc and key modules
- fix execution logic for subcommands under offline and online wallet subcommands
- Define Init state for when an execution does not need either the wallet or client for execution - Define the Offline wallet operations state for app context when an execution envt needs a wallet - Define the online wallet operations state for appcontext when an execution needs both the wallet and client - make app context generic over the state - make the app command and async app command generic over the execution context - deleted shorten fn as it was applicable to the pretty flag - removed tests for pretty flag
- apply app context with state to all the modules - cover case for commands when db is not required
- add wallet runtime module to serve as context manager - fix clippy errors
- rebase silent payment feature
- add BdkCli helper struct and impl methods - add integration tests for the key subcommand operations
- Add integration tests for wallets, descriptor, compile and config modules
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #289 +/- ##
===========================================
+ Coverage 10.22% 27.51% +17.28%
===========================================
Files 8 19 +11
Lines 2709 2497 -212
===========================================
+ Hits 277 687 +410
+ Misses 2432 1810 -622
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
- add integration tests for offline wallet operations
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.
Description
This PR builds on #278 and introduces integration tests for bdk-cli. It replaces manual
std::process::Commandboilerplate with theassert_cmdlibrary, allowing us to perform black-box testing against the compiled binary.Features covered so far include:
Notes to the reviewers
Changelog notice
Checklists
All Submissions:
cargo fmtandcargo clippybefore committing