From 976f6ef51ad32dac45e9e9b730dd9b3e0d7d4ad3 Mon Sep 17 00:00:00 2001 From: niftynei Date: Wed, 19 Oct 2022 11:26:21 -0500 Subject: [PATCH] df tests: use the amount from the logs to check for! --- tests/test_opening.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_opening.py b/tests/test_opening.py index e14afc961..d1a1b23eb 100644 --- a/tests/test_opening.py +++ b/tests/test_opening.py @@ -1144,8 +1144,12 @@ def test_funder_options(node_factory, bitcoind): l3.rpc.connect(l1.info['id'], 'localhost', l1.port) l3.fundchannel(l1, 10**6) chan_info = only_one(l3.rpc.listpeerchannels(l1.info['id'])['channels']) + log = l1.daemon.wait_for_log(r'Policy available \(100%\) returned funding amount of') + match = re.search(r'Policy available \(100%\) returned funding amount of (\d*sat)', log) + assert match and len(match.groups()) == 1 + # l1 contributed all its funds! - assert chan_info['funding']['remote_funds_msat'] == Millisatoshi('9994945000msat') + assert chan_info['funding']['remote_funds_msat'] == Millisatoshi(match.groups()[0]) assert chan_info['funding']['local_funds_msat'] == Millisatoshi('1000000000msat')