Skip to content

Commit

Permalink
plugin_control: more descriptive key for 'plugin stop' result
Browse files Browse the repository at this point in the history
  • Loading branch information
darosior committed Dec 24, 2019
1 parent 689dd28 commit d61bf7c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lightningd/plugin_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ plugin_dynamic_stop(struct command *cmd, const char *plugin_name)
plugin_kill(p, "%s stopped by lightningd via RPC", plugin_name);
tal_free(p);
response = json_stream_success(cmd);
json_add_string(response, "",
json_add_string(response, "result",
take(tal_fmt(NULL, "Successfully stopped %s.",
plugin_name)));
return command_success(cmd, response);
Expand Down
3 changes: 2 additions & 1 deletion tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ def test_plugin_command(node_factory):
n.rpc.plugin_list()

# Make sure the plugin behaves normally after stop and restart
assert("Successfully stopped helloworld.py." == n.rpc.plugin_stop(plugin="helloworld.py")[''])
assert("Successfully stopped helloworld.py." ==
n.rpc.plugin_stop(plugin="helloworld.py")["result"])
n.daemon.wait_for_log(r"Killing plugin: helloworld.py")
n.rpc.plugin_start(plugin=os.path.join(os.getcwd(), "contrib/plugins/helloworld.py"))
n.daemon.wait_for_log(r"Plugin helloworld.py initialized")
Expand Down

0 comments on commit d61bf7c

Please sign in to comment.