Skip to content

Commit

Permalink
Fix node2 RPC port & add missing elm mark (#2438)
Browse files Browse the repository at this point in the history
- Set second test bitcoin node RPC port to 18545 (i/o 18544) to avoid P2P port conflict with first node
- Add missing "elm" mark to test_node_controller.py::test_node_running_elements

Signed-off-by: Simon Castano <[email protected]>
Co-authored-by: k9ert <[email protected]>
  • Loading branch information
roshii and k9ert authored May 16, 2024
1 parent 0ba9de2 commit 0229bb7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def bitcoin_regtest(request) -> BitcoindPlainController:
def bitcoin_regtest2(request) -> BitcoindPlainController:
"""If a test needs two nodes ..."""
bitcoind_regtest = instantiate_bitcoind_controller(
request, rpcport=18544, extra_args=None
request, rpcport=18545, extra_args=None
)
try:
assert bitcoind_regtest.get_rpc().test_connection()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_managers_wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def test_WalletManager_2_nodes(
assert list(wm.rpcs.keys()) == [
"regtest",
] # wm.rpcs looks like this: {'regtest': <BitcoinRpc http://localhost:18543>, 'regtest2': <BitcoinRpc http://localhost:18544>}
assert wm.rpc.port == 18544
assert wm.rpc.port == 18545
assert wm.wallets_names == ["wallet_for_test_with_two_nodes"]
assert wm.chain == "regtest"
assert wm.working_folder.endswith("test")
Expand Down
1 change: 1 addition & 0 deletions tests/test_node_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def test_fetch_wallet_addresses_for_mining(caplog, wallets_filled_data_folder):
assert "bcrt1q4h86vfanswhsle63hw2muv9h5a45cg2878uez5" in addresses


@pytest.mark.elm
@pytest.mark.slow
def test_node_running_elements(caplog, request):
# TODO: Refactor this to use conftest.instantiate_bitcoind_controller
Expand Down

0 comments on commit 0229bb7

Please sign in to comment.