Skip to content

Commit a6e873f

Browse files
devrandomksedgwic
authored andcommitted
Exclude ipv6 from websocket address check
1 parent b3a2df0 commit a6e873f

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
@@ -3821,8 +3821,12 @@ def recv(self, maxlen):
38213821
if int.from_bytes(msg[0:2], 'big') == 19:
38223822
break
38233823

3824-
# Check node_announcement has websocket
3825-
assert (only_one(l2.rpc.listnodes(l1.info['id'])['nodes'])['addresses']
3824+
# First, remove ipv6 address, since it is dependent on CI host configuration
3825+
addresses = only_one(l2.rpc.listnodes(l1.info['id'])['nodes'])['addresses']
3826+
addresses = [a for a in addresses if a['type'] != 'ipv6']
3827+
3828+
# Check node_announcement has websocket and ipv4 localhost
3829+
assert (addresses
38263830
== [{'type': 'ipv4', 'address': '127.0.0.1', 'port': port2}, {'type': 'websocket', 'port': ws_port}])
38273831

38283832

0 commit comments

Comments
 (0)