bitcoindevkit / bdk-cli

A CLI wallet library and REPL tool to demo and test the BDK library
Other
111 stars 65 forks source link

Integration test framework #79

Closed rajarshimaitra closed 2 years ago

rajarshimaitra commented 2 years ago

Description

Fixes #62

This PR adds a rough integration test framework that can be used to programmatically test bdk-cli with a regtest backend for different scenarios. It uses std::process::Command to execute system commands with custom arguments..

Currently it only includes build with all features, perform a basic wallet op. More tests can be added later.

The tests can be run via cargo test and it will run them in the integration test section https://doc.rust-lang.org/rust-by-example/testing/integration_testing.html

Checklists

All Submissions:

rajarshimaitra commented 2 years ago

License updated..

rajarshimaitra commented 2 years ago

The tests are failing because there is no bitcoind running in the test environment.. This needs to be fixed..

rajarshimaitra commented 2 years ago

I feel the best way to go about this is merging https://github.com/bitcoindevkit/bdk-cli/pull/65. In that way we will get a automatic regtest node with bdk-cli. And we don't need to replay bitcoind actions again in the integration test..

cc @notmandatory

rajarshimaitra commented 2 years ago

This one is awaited on the 2nd part of #65, where RPC controls are to be exposed from bdk-cli itself. That will be the easiest way to have a fully featured test framework with backend included.. And we won't need a wrapper over bitcoin-cli anymore..

rajarshimaitra commented 2 years ago

This is now superseded by https://github.com/bitcoindevkit/bdk-cli/pull/92