From e1b037a921472b57e397aac7014869c4d315e98c Mon Sep 17 00:00:00 2001 From: Riccardo Casatta Date: Tue, 1 Jun 2021 14:18:40 +0200 Subject: [PATCH] change feature to execute sync from rpc to test-rpc --- .github/workflows/cont_integration.yml | 2 +- Cargo.toml | 1 + run_blockchain_tests.sh | 2 +- src/testutils/blockchain_tests.rs | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cont_integration.yml b/.github/workflows/cont_integration.yml index d9d25094..f45d00b6 100644 --- a/.github/workflows/cont_integration.yml +++ b/.github/workflows/cont_integration.yml @@ -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 diff --git a/Cargo.toml b/Cargo.toml index 8c79559b..446f6d3e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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] diff --git a/run_blockchain_tests.sh b/run_blockchain_tests.sh index 0ee3eb76..cd094f5c 100755 --- a/run_blockchain_tests.sh +++ b/run_blockchain_tests.sh @@ -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" diff --git a/src/testutils/blockchain_tests.rs b/src/testutils/blockchain_tests.rs index cd40e560..0b2b559e 100644 --- a/src/testutils/blockchain_tests.rs +++ b/src/testutils/blockchain_tests.rs @@ -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)