Skip to content

Commit

Permalink
dualopen: update test to handle ABORT
Browse files Browse the repository at this point in the history
In he case of initiating an RBF, ABORT is used instead of ERROR.
  • Loading branch information
ddustin committed Feb 10, 2024
1 parent 4f6a6ce commit 966aa4a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,18 +396,18 @@ def test_opening_tiny_channel(node_factory, anchors):
l1.rpc.connect(l3.info['id'], 'localhost', l3.port)
l1.rpc.connect(l4.info['id'], 'localhost', l4.port)

with pytest.raises(RpcError, match=r'They sent (ERROR|WARNING).*channel capacity is .*, which is below .*sat'):
with pytest.raises(RpcError, match=r'They sent (ERROR|WARNING|ABORT).*channel capacity is .*, which is below .*sat'):
l1.fundchannel(l2, l2_min_capacity + overhead - 1)
assert only_one(l1.rpc.listpeers(l2.info['id'])['peers'])['connected']

l1.fundchannel(l2, l2_min_capacity + overhead)

with pytest.raises(RpcError, match=r'They sent (ERROR|WARNING).*channel capacity is .*, which is below .*sat'):
with pytest.raises(RpcError, match=r'They sent (ERROR|WARNING|ABORT).*channel capacity is .*, which is below .*sat'):
l1.fundchannel(l3, l3_min_capacity + overhead - 1)
assert only_one(l1.rpc.listpeers(l3.info['id'])['peers'])['connected']
l1.fundchannel(l3, l3_min_capacity + overhead)

with pytest.raises(RpcError, match=r'They sent (ERROR|WARNING).*channel capacity is .*, which is below .*sat'):
with pytest.raises(RpcError, match=r'They sent (ERROR|WARNING|ABORT).*channel capacity is .*, which is below .*sat'):
l1.fundchannel(l4, l4_min_capacity + overhead - 1)
assert only_one(l1.rpc.listpeers(l4.info['id'])['peers'])['connected']
l1.fundchannel(l4, l4_min_capacity + overhead)
Expand Down

0 comments on commit 966aa4a

Please sign in to comment.