From cf40e585c3b7dcbb144f20cd94c36aad500ab8cd Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 2 Dec 2021 15:05:20 +1030 Subject: [PATCH] pytest: test to show conflict between websocket and wildcard addresses. Signed-off-by: Rusty Russell --- tests/test_connection.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/test_connection.py b/tests/test_connection.py index 7740bf85b..93c4ce3c2 100644 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -3746,11 +3746,17 @@ def test_old_feerate(node_factory): l1.pay(l2, 1000) +@pytest.mark.skip('Broken') @pytest.mark.developer("needs --dev-allow-localhost") def test_websocket(node_factory): ws_port = reserve() + port1, port2 = reserve(), reserve() + # We need a wildcard to show the websocket bug, but we need a real + # address to give us something to announce. l1, l2 = node_factory.line_graph(2, opts=[{'experimental-websocket-port': ws_port, + 'addr': [':' + str(port1), + '127.0.0.1: ' + str(port2)], 'dev-allow-localhost': None}, {'dev-allow-localhost': None}], wait_for_announce=True) @@ -3804,7 +3810,7 @@ def test_websocket(node_factory): # Check node_announcement has websocket assert (only_one(l2.rpc.listnodes(l1.info['id'])['nodes'])['addresses'] - == [{'type': 'ipv4', 'address': '127.0.0.1', 'port': l1.port}, {'type': 'websocket', 'port': ws_port}]) + == [{'type': 'ipv4', 'address': '127.0.0.1', 'port': port2}, {'type': 'websocket', 'port': ws_port}]) @pytest.mark.developer("dev-disconnect required")