Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration test framework #79

Closed

Conversation

rajarshimaitra
Copy link
Contributor

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:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

tests/integration.rs Outdated Show resolved Hide resolved
@rajarshimaitra
Copy link
Contributor Author

License updated..

@rajarshimaitra
Copy link
Contributor Author

rajarshimaitra commented Mar 25, 2022

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

  • One way is to manually download and deploy a bitcoind binary in test env using shell commands..
  • Another way is to do it using the bitcoind crate.

Will figure which one fits better, and update..

@rajarshimaitra
Copy link
Contributor Author

rajarshimaitra commented Mar 29, 2022

I feel the best way to go about this is merging #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

@notmandatory notmandatory removed this from the Release 0.5.x milestone Apr 5, 2022
@rajarshimaitra
Copy link
Contributor Author

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
Copy link
Contributor Author

This is now superseded by #92

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Create Integration tests for bdk-cli
2 participants