pytest: don't use command_success_str in test_libplugin.c

result should *always* be an object.  This allows it to add fields
without breaking the API.  A command which returns "result" as a
string is living in sin.

This changes one of the two callers of "command_success_str".

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2021-05-26 15:12:01 +09:30
parent ebe8f37400
commit 129d3f65e7
2 changed files with 6 additions and 6 deletions

View File

@@ -22,7 +22,7 @@ static struct command_result *json_helloworld(struct command *cmd,
if (!name)
name = name_option ? name_option : tal_strdup(tmpctx, "world");
return command_success_str(cmd, tal_fmt(tmpctx, "hello %s", name));
return command_success(cmd, json_out_obj(cmd, "hello", name));
}
static struct command_result *