cln-plugin: Populate the options when we get an init call

This commit is contained in:
Christian Decker
2022-01-21 18:09:16 +01:00
committed by Rusty Russell
parent 249fa8675a
commit fbcb4c33ad
3 changed files with 27 additions and 8 deletions

View File

@@ -24,7 +24,7 @@ def test_plugin_start(node_factory):
"""Start a minimal plugin and ensure it is well-behaved
"""
bin_path = Path.cwd() / "target" / "debug" / "examples" / "cln-plugin-startup"
l1 = node_factory.get_node(options={"plugin": str(bin_path)})
l1 = node_factory.get_node(options={"plugin": str(bin_path), 'test-option': 31337})
cfg = l1.rpc.listconfigs()
p = cfg['plugins'][0]
@@ -32,9 +32,8 @@ def test_plugin_start(node_factory):
expected = {
'name': 'cln-plugin-startup',
'options': {
'test-option': 42
'test-option': 31337
},
'path': None
}
assert expected == p