change feature to execute sync from rpc to test-rpc

This commit is contained in:
Riccardo Casatta 2021-06-01 14:18:40 +02:00
parent 9b7ed08891
commit e1b037a921
No known key found for this signature in database
GPG Key ID: FD986A969E450397
4 changed files with 4 additions and 3 deletions

View File

@ -124,7 +124,7 @@ jobs:
- name: start ${{ matrix.blockchain.name }}
run: nohup ${{ matrix.blockchain.start }} & sleep 5
- name: Test
run: $HOME/.cargo/bin/cargo test --features ${{ matrix.blockchain.name }},test-blockchains --no-default-features ${{ matrix.blockchain.name }}::bdk_blockchain_tests
run: $HOME/.cargo/bin/cargo test --features test-${{ matrix.blockchain.name }},test-blockchains --no-default-features ${{ matrix.blockchain.name }}::bdk_blockchain_tests
check-wasm:
name: Check WASM

View File

@ -63,6 +63,7 @@ rpc = ["bitcoincore-rpc"]
test-blockchains = ["bitcoincore-rpc", "electrum-client"]
test-electrum = ["electrum"]
test-rpc = ["rpc"]
test-esplora = ["esplora"]
test-md-docs = ["electrum"]
[dev-dependencies]

View File

@ -65,4 +65,4 @@ while ! cli getwalletinfo >/dev/null; do sleep 1; done
# sleep again for good measure!
sleep 1;
cargo test --features "test-blockchains,$blockchain" --no-default-features "$blockchain::bdk_blockchain_tests::$test_name"
cargo test --features "test-blockchains,test-$blockchain" --no-default-features "$blockchain::bdk_blockchain_tests::$test_name"

View File

@ -370,7 +370,7 @@ macro_rules! bdk_blockchain_tests {
let wallet = get_wallet_from_descriptors(&descriptors);
// rpc need to call import_multi before receiving any tx, otherwise will not see tx in the mempool
#[cfg(feature = "rpc")]
#[cfg(feature = "test-rpc")]
wallet.sync(noop_progress(), None).unwrap();
(wallet, descriptors, test_client)