Browse Source

tests: don't enforce daemon name on opening logline

ppa
niftynei 4 years ago
committed by Christian Decker
parent
commit
f4b7904ce5
  1. 2
      contrib/pyln-testing/pyln/testing/utils.py
  2. 2
      tests/test_closing.py
  3. 12
      tests/test_connection.py
  4. 2
      tests/test_gossip.py
  5. 16
      tests/test_pay.py
  6. 2
      tests/test_plugin.py

2
contrib/pyln-testing/pyln/testing/utils.py

@ -1234,7 +1234,7 @@ class NodeFactory(object):
# getpeers.
if not fundchannel:
for src, dst in connections:
dst.daemon.wait_for_log(r'{}-.*openingd-chan#[0-9]*: Handed peer, entering loop'.format(src.info['id']))
dst.daemon.wait_for_log(r'{}-.*-chan#[0-9]*: Handed peer, entering loop'.format(src.info['id']))
return
bitcoind = nodes[0].bitcoin

2
tests/test_closing.py

@ -2367,7 +2367,7 @@ def test_permfail_htlc_out(node_factory, bitcoind, executor):
feerates=(7500, 7500, 7500, 7500))
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
l2.daemon.wait_for_log('openingd-chan#1: Handed peer, entering loop'.format(l1.info['id']))
l2.daemon.wait_for_log('Handed peer, entering loop')
l2.fundchannel(l1, 10**6)
# This will fail at l2's end.

12
tests/test_connection.py

@ -154,8 +154,8 @@ def test_bad_opening(node_factory):
assert ret['id'] == l2.info['id']
l1.daemon.wait_for_log('openingd-.*: Handed peer, entering loop')
l2.daemon.wait_for_log('openingd-.*: Handed peer, entering loop')
l1.daemon.wait_for_log('Handed peer, entering loop')
l2.daemon.wait_for_log('Handed peer, entering loop')
l1.fundwallet(10**6 + 1000000)
with pytest.raises(RpcError):
@ -381,7 +381,7 @@ def test_reconnect_openingd(node_factory):
# We should get a message about reconnecting.
l2.daemon.wait_for_log('Killing opening daemon: Reconnected')
l2.daemon.wait_for_log('openingd.*Handed peer, entering loop')
l2.daemon.wait_for_log('Handed peer, entering loop')
# Should work fine.
l1.rpc.fundchannel(l2.info['id'], 25000)
@ -818,7 +818,7 @@ def test_funding_fail(node_factory, bitcoind):
# Should still be connected.
assert only_one(l1.rpc.listpeers()['peers'])['connected']
l2.daemon.wait_for_log('openingd-.*: Handed peer, entering loop')
l2.daemon.wait_for_log('Handed peer, entering loop')
assert only_one(l2.rpc.listpeers()['peers'])['connected']
# This works.
@ -1952,8 +1952,8 @@ def test_multiple_channels(node_factory):
ret = l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
assert ret['id'] == l2.info['id']
l1.daemon.wait_for_log('openingd-.*: Handed peer, entering loop')
l2.daemon.wait_for_log('openingd-.*: Handed peer, entering loop')
l1.daemon.wait_for_log('Handed peer, entering loop')
l2.daemon.wait_for_log('Handed peer, entering loop')
chan, _ = l1.fundchannel(l2, 10**6)
l1.rpc.close(chan)

2
tests/test_gossip.py

@ -361,7 +361,7 @@ def test_gossip_weirdalias(node_factory, bitcoind):
.format(normal_name))
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
l2.daemon.wait_for_log('openingd-chan#1: Handed peer, entering loop')
l2.daemon.wait_for_log('Handed peer, entering loop')
l2.fundchannel(l1, 10**6)
bitcoind.generate_block(6)

16
tests/test_pay.py

@ -1100,14 +1100,14 @@ def test_forward_different_fees_and_cltv(node_factory, bitcoind):
ret = l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
assert ret['id'] == l2.info['id']
l1.daemon.wait_for_log('openingd-.*: Handed peer, entering loop')
l2.daemon.wait_for_log('openingd-.*: Handed peer, entering loop')
l1.daemon.wait_for_log('Handed peer, entering loop')
l2.daemon.wait_for_log('Handed peer, entering loop')
ret = l2.rpc.connect(l3.info['id'], 'localhost', l3.port)
assert ret['id'] == l3.info['id']
l2.daemon.wait_for_log('openingd-.*: Handed peer, entering loop')
l3.daemon.wait_for_log('openingd-.*: Handed peer, entering loop')
l2.daemon.wait_for_log('Handed peer, entering loop')
l3.daemon.wait_for_log('Handed peer, entering loop')
c1, _ = l1.fundchannel(l2, 10**6)
c2, _ = l2.fundchannel(l3, 10**6)
@ -1206,14 +1206,14 @@ def test_forward_pad_fees_and_cltv(node_factory, bitcoind):
ret = l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
assert ret['id'] == l2.info['id']
l1.daemon.wait_for_log('openingd-.*: Handed peer, entering loop')
l2.daemon.wait_for_log('openingd-.*: Handed peer, entering loop')
l1.daemon.wait_for_log('Handed peer, entering loop')
l2.daemon.wait_for_log('Handed peer, entering loop')
ret = l2.rpc.connect(l3.info['id'], 'localhost', l3.port)
assert ret['id'] == l3.info['id']
l2.daemon.wait_for_log('openingd-.*: Handed peer, entering loop')
l3.daemon.wait_for_log('openingd-.*: Handed peer, entering loop')
l2.daemon.wait_for_log('Handed peer, entering loop')
l3.daemon.wait_for_log('Handed peer, entering loop')
c1, _ = l1.fundchannel(l2, 10**6)
c2, _ = l2.fundchannel(l3, 10**6)

2
tests/test_plugin.py

@ -411,7 +411,7 @@ def test_plugin_connected_hook(node_factory):
l1.daemon.wait_for_log(r"{} is in reject list".format(l3.info['id']))
# FIXME: this error occurs *after* connection, so we connect then drop.
l3.daemon.wait_for_log(r"openingd-chan#1: peer_in WIRE_ERROR")
l3.daemon.wait_for_log(r"chan#1: peer_in WIRE_ERROR")
l3.daemon.wait_for_log(r"You are in reject list")
def check_disconnect():

Loading…
Cancel
Save