Skip to content

Commit

Permalink
Test grpc-plugin refuses non-loopback port on http
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikDeSmedt authored and ShahanaFarooqui committed Nov 13, 2024
1 parent 91f2f33 commit 2821c3d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_cln_rs.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,18 @@ def test_grpc_connect_http(node_factory):
print(response)


def test_grpc_connection_refuses_non_loopback_address(node_factory):
grpc_port = node_factory.get_unused_port()
options = {
"grpc-port": str(grpc_port),
"grpc-scheme": "http",
"grpc-ip-address": "0.0.0.0"
}

l1 = node_factory.get_node(options=options)
assert l1.daemon.is_in_log(r'Scheme \'http\' is only allowed on a loopback address')


def test_grpc_connect(node_factory):
"""Attempts to connect to the grpc interface and call getinfo"""
# These only exist if we have rust!
Expand Down

0 comments on commit 2821c3d

Please sign in to comment.