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 committed Sep 17, 2024
1 parent c71a4c9 commit 025bfc4
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 @@ -118,6 +118,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 025bfc4

Please sign in to comment.