Skip to content

Commit 331f50d

Browse files
committed
Exclude ipv6 from websocket address check
1 parent 89c8868 commit 331f50d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/test_connection.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3764,8 +3764,12 @@ def recv(self, maxlen):
37643764
if int.from_bytes(msg[0:2], 'big') == 19:
37653765
break
37663766

3767-
# Check node_announcement has websocket
3768-
assert (only_one(l2.rpc.listnodes(l1.info['id'])['nodes'])['addresses']
3767+
# First, remove ipv6 address, since it is dependent on CI host configuration
3768+
addresses = only_one(l2.rpc.listnodes(l1.info['id'])['nodes'])['addresses']
3769+
addresses = [a for a in addresses if a['type'] != 'ipv6']
3770+
3771+
# Check node_announcement has websocket and ipv4 localhost
3772+
assert (addresses
37693773
== [{'type': 'ipv4', 'address': '127.0.0.1', 'port': port2}, {'type': 'websocket', 'port': ws_port}])
37703774

37713775

0 commit comments

Comments
 (0)