mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-01 17:47:30 +01:00
df-tests: make bad tests a bit better, maybe
We updated the "UNKNOWN TYPE channel_id" -> the actual channel id; the reason for why the error fails shouldn't be restrictive (we just know that it fails)
This commit is contained in:
parent
de52abbcde
commit
66a2826976
1 changed files with 8 additions and 8 deletions
|
@ -124,13 +124,13 @@ def test_v2_open_sigs_restart(node_factory, bitcoind):
|
|||
|
||||
# Fund the channel, should appear to finish ok even though the
|
||||
# peer fails
|
||||
with pytest.raises(RpcError, match=r'Peer not connected'):
|
||||
with pytest.raises(RpcError):
|
||||
l1.rpc.fundchannel(l2.info['id'], chan_amount)
|
||||
|
||||
log = l1.daemon.is_in_log('UNKNOWN TYPE channel_id psbt')
|
||||
psbt = re.search("channel_id psbt (.*)", log).group(1)
|
||||
|
||||
chan_id = first_channel_id(l1, l2)
|
||||
log = l1.daemon.is_in_log('{} psbt'.format(chan_id))
|
||||
psbt = re.search("psbt (.*)", log).group(1)
|
||||
|
||||
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
|
||||
l1.daemon.wait_for_log('Peer has reconnected, state DUALOPEND_OPEN_INIT')
|
||||
with pytest.raises(RpcError):
|
||||
|
@ -170,13 +170,13 @@ def test_v2_open_sigs_restart_while_dead(node_factory, bitcoind):
|
|||
|
||||
# Fund the channel, should appear to finish ok even though the
|
||||
# peer fails
|
||||
with pytest.raises(RpcError, match=r'Peer not connected'):
|
||||
with pytest.raises(RpcError):
|
||||
l1.rpc.fundchannel(l2.info['id'], chan_amount)
|
||||
|
||||
log = l1.daemon.is_in_log('UNKNOWN TYPE channel_id psbt')
|
||||
psbt = re.search("channel_id psbt (.*)", log).group(1)
|
||||
|
||||
chan_id = first_channel_id(l1, l2)
|
||||
log = l1.daemon.is_in_log('{} psbt'.format(chan_id))
|
||||
psbt = re.search("psbt (.*)", log).group(1)
|
||||
|
||||
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
|
||||
l1.daemon.wait_for_log('Peer has reconnected, state DUALOPEND_OPEN_INIT')
|
||||
with pytest.raises(RpcError):
|
||||
|
|
Loading…
Add table
Reference in a new issue