From a1425b94daea53d4a4f83668b71862c78e454f15 Mon Sep 17 00:00:00 2001 From: Quantum Explorer Date: Tue, 13 Oct 2026 17:19:36 +0300 Subject: [PATCH] test(platform-wallet-storage): move the Core transaction rows test into the integration binary #5392 added tests/persisted_core_transactions.rs as its own test crate, loading the shared helpers with `mod common;`. #5397, merged after it, moved those helpers to tests/integration/common and built the integration tests as one binary, so the file's `mod common;` no longer resolves: `cargo fmt --check --all` fails on v5.0-dev and the test does not compile. Move the file into tests/integration as a module of that binary, declared in main.rs, using `crate::common` like the other modules, with its fixture read from ../fixtures. Co-Authored-By: Claude Opus 5.5 --- .../rs-platform-wallet-storage/tests/integration/main.rs | 1 + .../tests/{ => integration}/persisted_core_transactions.rs | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) rename packages/rs-platform-wallet-storage/tests/{ => integration}/persisted_core_transactions.rs (97%) diff --git a/packages/rs-platform-wallet-storage/tests/integration/main.rs b/packages/rs-platform-wallet-storage/tests/integration/main.rs index ec0587bd006..918d0c6bac2 100644 --- a/packages/rs-platform-wallet-storage/tests/integration/main.rs +++ b/packages/rs-platform-wallet-storage/tests/integration/main.rs @@ -9,6 +9,7 @@ mod common; mod fixture_gen; +mod persisted_core_transactions; mod persistence_error_kind_mapping; mod review_4651_concurrent_payment; mod secrets_api; diff --git a/packages/rs-platform-wallet-storage/tests/persisted_core_transactions.rs b/packages/rs-platform-wallet-storage/tests/integration/persisted_core_transactions.rs similarity index 97% rename from packages/rs-platform-wallet-storage/tests/persisted_core_transactions.rs rename to packages/rs-platform-wallet-storage/tests/integration/persisted_core_transactions.rs index 4ce3a1ab97f..178f443e2fc 100644 --- a/packages/rs-platform-wallet-storage/tests/persisted_core_transactions.rs +++ b/packages/rs-platform-wallet-storage/tests/integration/persisted_core_transactions.rs @@ -1,7 +1,7 @@ //! Wallet rows that embed a Dash Core transaction keep decoding across //! rust-dashcore upgrades. //! -//! `fixtures/core_transaction_rows.txt` holds one row per line: a name and a +//! `tests/fixtures/core_transaction_rows.txt` holds one row per line: a name and a //! blob in hex. `asset_lock_lifecycle` is an `asset_locks.lifecycle_blob`; //! every other row is a `core_transactions.record_blob` (a key-wallet //! `TransactionRecord`). Both embed a `dashcore::Transaction` through @@ -45,7 +45,7 @@ //! println!("asset_lock_lifecycle {}", hex::encode(asset_locks::encode_entry_for_test(&entry)?)); //! ``` -mod common; +use crate::common; use common::{ensure_wallet_meta, fresh_persister, wid}; use dashcore::transaction::special_transaction::TransactionPayload; @@ -56,7 +56,7 @@ use platform_wallet_storage::sqlite::schema::{asset_locks, blob}; use platform_wallet_storage::LoadCtx; use rusqlite::params; -const ROWS: &str = include_str!("fixtures/core_transaction_rows.txt"); +const ROWS: &str = include_str!("../fixtures/core_transaction_rows.txt"); /// Each row and the transaction it must decode to. const EXPECTED: [(&str, &str); 19] = [