Skip to content

Commit 653dc4c

Browse files
committed
lsps: Add test for Lsps0
Signed-off-by: Peter Neuroth <[email protected]>
1 parent 764974c commit 653dc4c

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

tests/test_cln_lsps.py

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
from fixtures import * # noqa: F401,F403
2+
import os
3+
from pathlib import Path
4+
5+
RUST_PROFILE = os.environ.get("RUST_PROFILE", "debug")
6+
7+
def test_lsps_service_disabled(node_factory):
8+
"""By default we disable the LSPS service plugin.
9+
10+
It should only be enabled if we explicitly set the config option
11+
`lsps-service=True`.
12+
"""
13+
14+
l1 = node_factory.get_node(1)
15+
l1.daemon.is_in_log("`lsps-service` not enabled")
16+
17+
18+
def test_lsps0_listprotocols(node_factory):
19+
l1, l2 = node_factory.get_nodes(2, opts=[
20+
{}, {"lsps-service": True}
21+
])
22+
23+
# We don't need a channel to query for lsps services
24+
node_factory.join_nodes([l1, l2], fundchannel=False)
25+
26+
res = l1.rpc.lsps_listprotocols(peer=l2.info['id'])
27+
assert res

0 commit comments

Comments
 (0)