Skip to content

Commit 88b5e6a

Browse files
committed
Merge #1230: Removes test_full_coinjoin
3b3bd39 Replaces test_full_coinjoin with test_e2e_coinjoin (Adam Gibson)
2 parents 68c8d4a + 3b3bd39 commit 88b5e6a

File tree

5 files changed

+11
-165
lines changed

5 files changed

+11
-165
lines changed

docs/TESTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Then copy the `regtest_joinmarket.cfg` file from the `test/` directory to the `j
2525

2626
Run the test suite via pytest:
2727

28-
(jmvenv)$ pytest --btcconf=/path/to/bitcoin.conf --btcroot=/path/to/bitcoin/bin/ --btcpwd=123456abcdef --nirc=2 --ignore test/test_full_coinjoin.py -p no:warnings
28+
(jmvenv)$ pytest --btcconf=/path/to/bitcoin.conf --btcroot=/path/to/bitcoin/bin/ --btcpwd=123456abcdef --nirc=2 -p no:warnings
2929

3030
#### Running tests of sendpayment and tumbler (including with malicious makers)
3131

test/run_tests.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,7 @@ run_jm_tests ()
222222
--btcroot=$btcroot \
223223
--btcuser=$btcuser \
224224
--nirc=$nirc \
225-
-p no:warnings \
226-
--ignore test/test_full_coinjoin.py
225+
-p no:warnings
227226
local success="$?"
228227
[[ -f ./joinmarket.cfg ]] && unlink ./joinmarket.cfg
229228
if [ -f "${jm_test_datadir}/bitcoind.pid" ] && read bitcoind_pid <"${jm_test_datadir}/bitcoind.pid"; then

test/e2e-coinjoin-test.py renamed to test/test_e2e_coinjoin.py

+8-13
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,11 @@
2424
from jmclient import (YieldGeneratorBasic, load_test_config, jm_single,
2525
JMClientProtocolFactory, start_reactor, SegwitWallet, get_mchannels,
2626
SegwitLegacyWallet, JMWalletDaemon)
27+
import jmclient
2728
from jmclient.wallet_rpc import api_version_string
2829

2930
log = get_log()
3031

31-
# For quicker testing, restrict the range of timelock
32-
# addresses to avoid slow load of multiple bots.
33-
# Note: no need to revert this change as test runs
34-
# in isolation.
35-
from jmclient import FidelityBondMixin
36-
FidelityBondMixin.TIMELOCK_ERA_YEARS = 2
37-
FidelityBondMixin.TIMELOCK_EPOCH_YEAR = datetime.now().year
38-
FidelityBondMixin.TIMENUMBERS_PER_PUBKEY = 12
39-
4032
wallet_name = "test-onion-yg-runner.jmdat"
4133

4234
mean_amt = 2.0
@@ -196,8 +188,7 @@ def test_start_yg_and_taker_setup(setup_onion_ygrunner):
196188
wallet_service = wallet_services[end_bot_num - 1]['wallet']
197189
jmprint("\n\nTaker wallet seed : " + wallet_services[end_bot_num - 1]['seed'])
198190
# for manual audit if necessary, show the maker's wallet seeds
199-
# also (note this audit should be automated in future, see
200-
# test_full_coinjoin.py in this directory)
191+
# also (note this audit should be automated in future)
201192
jmprint("\n\nMaker wallet seeds: ")
202193
for i in range(start_bot_num, end_bot_num):
203194
jmprint("Maker seed: " + wallet_services[i - 1]['seed'])
@@ -331,8 +322,12 @@ def process_coinjoin_response(response):
331322
json_body = json.loads(response.decode("utf-8"))
332323
print("coinjoin response: {}".format(json_body))
333324

334-
@pytest.fixture(scope="module")
335-
def setup_onion_ygrunner():
325+
@pytest.fixture
326+
def setup_onion_ygrunner(monkeypatch):
327+
# For quicker testing, restrict the range of timelock
328+
# addresses to avoid slow load of multiple bots.
329+
monkeypatch.setattr(jmclient.FidelityBondMixin, 'TIMELOCK_ERA_YEARS', 2)
330+
monkeypatch.setattr(jmclient.FidelityBondMixin, 'TIMELOCK_EPOCH_YEAR', datetime.now().year)
336331
load_test_config()
337332
jm_single().bc_interface.tick_forward_chain_interval = 10
338333
jm_single().bc_interface.simulate_blocks()

test/test_full_coinjoin.py

-147
This file was deleted.

test/ygrunner.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,7 @@ def test_start_ygs(setup_ygrunner, num_ygs, wallet_structures, fb_indices,
123123
wallet_service = wallet_services[num_ygs]['wallet']
124124
jmprint("\n\nTaker wallet seed : " + wallet_services[num_ygs]['seed'])
125125
# for manual audit if necessary, show the maker's wallet seeds
126-
# also (note this audit should be automated in future, see
127-
# test_full_coinjoin.py in this directory)
126+
# also (note this audit should be automated in future)
128127
jmprint("\n\nMaker wallet seeds: ")
129128
for i in range(num_ygs):
130129
jmprint("Maker seed: " + wallet_services[i]['seed'])

0 commit comments

Comments
 (0)