Skip to content

Commit

Permalink
Exclude ipv6 from websocket address check
Browse files Browse the repository at this point in the history
  • Loading branch information
devrandom committed Mar 28, 2022
1 parent 2383742 commit 321ef87
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -3764,8 +3764,12 @@ def recv(self, maxlen):
if int.from_bytes(msg[0:2], 'big') == 19:
break

# Check node_announcement has websocket
assert (only_one(l2.rpc.listnodes(l1.info['id'])['nodes'])['addresses']
# First, remove ipv6 address, since it is dependent on CI host configuration
addresses = only_one(l2.rpc.listnodes(l1.info['id'])['nodes'])['addresses']
addresses = [a for a in addresses if a['type'] != 'ipv6']

# Check node_announcement has websocket and ipv4 localhost
assert (addresses
== [{'type': 'ipv4', 'address': '127.0.0.1', 'port': port2}, {'type': 'websocket', 'port': ws_port}])


Expand Down

0 comments on commit 321ef87

Please sign in to comment.