Skip to content

Commit 19669c8

Browse files
pytest: test reckless listconfig via rpc
1 parent 535ac53 commit 19669c8

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

tests/test_reckless.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def test_basic_help():
171171
assert r.search_stdout("options:") or r.search_stdout("optional arguments:")
172172

173173

174-
def test_reckless_version(node_factory):
174+
def test_reckless_version_listconfig(node_factory):
175175
'''Version should be reported without loading config and should advance
176176
with lightningd.'''
177177
node = get_reckless_node(node_factory)
@@ -196,6 +196,16 @@ def test_reckless_version(node_factory):
196196
assert result['lightning_conf'] == str(node.lightning_dir / NETWORK / 'config')
197197
assert result['version'] == version
198198

199+
# Now test via reckless-rpc plugin
200+
node.start()
201+
# FIXME: the plugin finds the installed reckless utility rather than the build directory reckless
202+
listconfig = node.rpc.reckless('listconfig')
203+
print(listconfig)
204+
assert listconfig['result']['lightning_dir'] == str(node.lightning_dir)
205+
assert listconfig['result']['lightning_conf'] == str(node.lightning_dir / NETWORK / 'config')
206+
assert listconfig['result']['network'] == NETWORK
207+
assert listconfig['result']['version'] == version
208+
199209

200210
def test_contextual_help(node_factory):
201211
n = get_reckless_node(node_factory)

0 commit comments

Comments
 (0)