Skip to content

test: Add integration harness for the node binary - #78

Merged
rustaceanrob merged 1 commit into
kernel-node:masterfrom
pzafonte:integration-test-harness
Jul 20, 2026
Merged

test: Add integration harness for the node binary#78
rustaceanrob merged 1 commit into
kernel-node:masterfrom
pzafonte:integration-test-harness

Conversation

@pzafonte

@pzafonte pzafonte commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Add a fixture that starts the node on regtest in a temporary datadir, drives it through the cli over the control socket, and stops it on drop.

Adds two tests that use the fixture. One checks that the node echoes over the control socket and stops on request. The other points the node at a regtest bitcoind started through corepc-node and waits for the daemon to report the incoming connection.

corepc-node is pinned to the v30 client to match the Bitcoin Core daemon it talks to and uses its download feature so bitcoind is fetched automatically when it isn't already on PATH / BITCOIND_EXE

Followups:
#85
#86

@rustaceanrob

Copy link
Copy Markdown
Contributor

Why are these in draft? Direction looks fine to me.

@pzafonte

pzafonte commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Why are these in draft? Direction looks fine to me.

Thanks! I still have it in draft because the tests don't follow the chain yet. I'm working on the next commit which will add getTip plus a sync test that mines on Core and polls until they match... which I'm almost done with.

@pzafonte pzafonte changed the title [WIP] test: Add integration harness for the node binary test: Add integration harness for the node binary Jul 14, 2026
@pzafonte pzafonte changed the title test: Add integration harness for the node binary test: Integration-test the node against Bitcoin Core Jul 14, 2026
@pzafonte
pzafonte marked this pull request as ready for review July 14, 2026 13:59
Comment thread src/bin/cli.rs Outdated
Comment thread tests/common/mod.rs
@rustaceanrob rustaceanrob mentioned this pull request Jul 18, 2026
@pzafonte
pzafonte force-pushed the integration-test-harness branch from 24a7393 to 3d2045e Compare July 19, 2026 12:46
@pzafonte pzafonte changed the title test: Integration-test the node against Bitcoin Core test: Add integration harness for the node binary Jul 19, 2026
Comment thread tests/common/mod.rs Outdated
Comment thread tests/common/mod.rs
@rustaceanrob
rustaceanrob force-pushed the integration-test-harness branch from 3d2045e to a4c9c81 Compare July 20, 2026 12:22
Add a fixture that starts the node on regtest in a temporary datadir,
drives it through the cli over the control socket, and stops it on
drop.

Add two tests that use the fixture. One checks that the node echoes
over the control socket and stops on request. The other points the
node at a regtest bitcoind started through corepc-node and waits for
the daemon to report the incoming connection.

corepc-node is pinned to the v30 client to match the Bitcoin Core
daemon it talks to.
@rustaceanrob
rustaceanrob force-pushed the integration-test-harness branch from a4c9c81 to 5f1bc48 Compare July 20, 2026 12:35
@rustaceanrob

Copy link
Copy Markdown
Contributor

I want to help get these changes in so I force pushed with a few changes:

  • made the CI to also run the integration tests
  • reduced the loop time on the feeler connections so the thread exits faster. The feeler interval is still the same.
  • migrated expect to unwrap in most cases

@rustaceanrob
rustaceanrob merged commit eae1d8a into kernel-node:master Jul 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants