mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-28 18:24:20 +01:00
plugins: support concatenation of multiple args.
"multi" means that specifying a parameter twice will append, not override. Multi args are always given as a JSON array, even if only one. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Added: Plugins: new "multi" field allows an option to be specified multiple times.
This commit is contained in:
@@ -120,6 +120,16 @@ def test_option_types(node_factory):
|
||||
assert not n.daemon.running
|
||||
assert n.daemon.is_in_stderr("--flag_opt: doesn't allow an argument")
|
||||
|
||||
n = node_factory.get_node(options={
|
||||
'plugin': plugin_path,
|
||||
'str_optm': ['ok', 'ok2'],
|
||||
'int_optm': [11, 12, 13],
|
||||
})
|
||||
|
||||
assert n.daemon.is_in_log(r"option str_optm \['ok', 'ok2'\] <class 'list'>")
|
||||
assert n.daemon.is_in_log(r"option int_optm \[11, 12, 13\] <class 'list'>")
|
||||
n.stop()
|
||||
|
||||
|
||||
def test_millisatoshi_passthrough(node_factory):
|
||||
""" Ensure that Millisatoshi arguments and return work.
|
||||
|
||||
Reference in New Issue
Block a user