test: shared Tiny drop-clean fixtures (X-06) - #411
Merged
Conversation
added 2 commits
September 10, 2026 08:09
X-06: store tests still roll their own temp_dir + create. The contract is one helper that opens Tiny heads (64 header slots) on a unique path that is gone after drop.
X-06: rbitcoin_store::testutil::{TempDir, tiny_store} and
rbitcoin_query::testutil::tiny_query own unique-path Tiny opens.
Named tmp_dir / temp_query / tmp_hub copies use them. rbitcoin-test
TempDir re-exports the store helper.
core_script_spot_* and core_tx_spot_first_valid_accepts only restaged
rows already covered by *_all_rows.
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.
Summary
X-06: one drop-cleaning Tiny fixture below
rbitcoin-testso store/query tests do not depend on node.rbitcoin_store::testutil::{TempDir, tiny_store}— unique path, Tiny heads (64 header slots), directory gone after drop. Production default stays Mainnet.rbitcoin_query::testutil::tiny_query— same forQuery::open_or_create_tiny.tmp_dir/temp_query/tmp_hub/tmp_storecopies in store, query, consensus, mempool, net, electrum, esplora now use those helpers.rbitcoin-test::TempDirre-exports the store helper.core_script_spot_valid_depth_equal,core_script_spot_invalid_false,core_tx_spot_first_valid_accepts). Surviving pin:core_script_tests_all_rows/core_tx_valid_all_rows. FillFlags subset/superset tests stay.Test plan
shared_tiny_store_fixture_is_tiny_unique_and_drop_cleans(red then green)cargo test -p rbitcoin-store --libcargo test -p rbitcoin-query --libcargo test -p rbitcoin-consensus --lib(incl. Core*_all_rows)TESTING.mdnames the shared fixtureDo not merge unless asked. Coverage ≥90% is the required
coveragejob.