Skip to content

Set up a new test infrastructure with bdk_testenv#267

Closed
j-kon wants to merge 1 commit intobitcoindevkit:masterfrom
j-kon:codex/issue-120-pr1-testenv-harness
Closed

Set up a new test infrastructure with bdk_testenv#267
j-kon wants to merge 1 commit intobitcoindevkit:masterfrom
j-kon:codex/issue-120-pr1-testenv-harness

Conversation

@j-kon
Copy link
Copy Markdown

@j-kon j-kon commented Apr 3, 2026

Summary

This PR sets up a new integration test infrastructure for bdk-cli using bdk_testenv.

It replaces the dead shell-based integration test setup with a working direct-handler-based harness and adds a first funded-wallet flow test to prove the new path end to end.

What changed

  • add bdk_testenv as a dev-dependency
  • add a library target so integration tests can import CLI types and handlers directly
  • expose the handler/backend pieces needed by the integration test harness
  • replace the dead shell-based integration test setup in tests/integration.rs
  • add a funded-wallet integration test that:
    • derives a receive address
    • funds it on regtest
    • syncs the wallet
    • verifies that balance updates

Why

The previous integration test setup was commented out and relied on an outdated shell-based approach. This PR establishes a minimal working foundation for direct handler-based integration testing, which matches the direction discussed in #120.

This is PR 1 of the work around #120. The OP_RETURN follow-up has already been prepared locally on top of this branch and will be opened as a separate PR after this one lands, to keep review focused and avoid restacking the PR 1 changes.

Validation

  • cargo fmt --all --check
  • BITCOIND_EXE=/usr/local/bin/bitcoind cargo clippy --all-features --all-targets -- -D warnings
  • cargo test --all-features --test integration
  • cargo test --no-run
  • cargo test --no-default-features --no-run

Refs #120.

cc @tvpeter @va-an

@j-kon j-kon marked this pull request as ready for review April 3, 2026 18:01
@j-kon j-kon marked this pull request as draft April 3, 2026 18:01
@j-kon j-kon marked this pull request as ready for review April 4, 2026 11:29
@j-kon j-kon marked this pull request as draft April 4, 2026 11:29
@j-kon j-kon marked this pull request as ready for review April 7, 2026 12:24
@j-kon j-kon marked this pull request as draft April 7, 2026 12:24
@tvpeter
Copy link
Copy Markdown
Collaborator

tvpeter commented Apr 7, 2026

Hi @j-kon, I will be closing this PR because it doesn't demonstrate a clear understanding of the project or the issue. I encourage you to take some time to familiarize yourself with the project better, which will help you make more meaningful contributions in the future.

Thank you.

@tvpeter tvpeter closed this Apr 7, 2026
@github-project-automation github-project-automation bot moved this to Done in BDK-CLI Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants