From cbd1d1d0f2d0c9c631c5459967759724b9f4f696 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 24 Sep 2018 11:10:56 +0930 Subject: [PATCH] pytest: test that we reannounce node after restart. Signed-off-by: Rusty Russell --- tests/test_gossip.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/test_gossip.py b/tests/test_gossip.py index d3e534cc0..f47480c5a 100644 --- a/tests/test_gossip.py +++ b/tests/test_gossip.py @@ -842,6 +842,22 @@ def test_gossip_store_load(node_factory): assert not l1.daemon.is_in_log('gossip_store.*truncating') +@pytest.mark.xfail(strict=True) +def test_node_reannounce(node_factory, bitcoind): + "Test that we reannounce a node when parameters change" + l1, l2, l3 = node_factory.line_graph(3, opts={'may_reconnect': True}) + + bitcoind.generate_block(5) + + wait_for(lambda: l3.rpc.listnodes(l1.info['id'])['nodes'] != []) + assert only_one(l3.rpc.listnodes(l1.info['id'])['nodes'])['alias'].startswith('JUNIORBEAM') + + l1.stop() + l1.daemon.opts['alias'] = 'SENIORBEAM' + l1.start() + wait_for(lambda: only_one(l3.rpc.listnodes(l1.info['id'])['nodes'])['alias'] == 'SENIORBEAM') + + def test_gossipwith(node_factory): l1, l2 = node_factory.line_graph(2, announce=True)