fix(plugins_api): fix response types and test
This commit is contained in:
parent
02c3d6a0a7
commit
2cfe5ba057
|
@ -166,7 +166,10 @@ schema("/plugins/:name/move") ->
|
||||||
tags => ?TAGS,
|
tags => ?TAGS,
|
||||||
parameters => [hoconsc:ref(name)],
|
parameters => [hoconsc:ref(name)],
|
||||||
'requestBody' => move_request_body(),
|
'requestBody' => move_request_body(),
|
||||||
responses => #{200 => <<"OK">>}
|
responses => #{
|
||||||
|
200 => <<"OK">>,
|
||||||
|
400 => emqx_dashboard_swagger:error_codes(['MOVE_FAILED'], <<"Move failed">>)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}.
|
}.
|
||||||
|
|
||||||
|
|
|
@ -297,7 +297,8 @@ update_plugin(Config, Name, Action) when is_list(Config) ->
|
||||||
update_boot_order(Name, MoveBody, Config) ->
|
update_boot_order(Name, MoveBody, Config) ->
|
||||||
#{host := Host, auth := Auth} = get_host_and_auth(Config),
|
#{host := Host, auth := Auth} = get_host_and_auth(Config),
|
||||||
Path = emqx_mgmt_api_test_util:api_path(Host, ["plugins", Name, "move"]),
|
Path = emqx_mgmt_api_test_util:api_path(Host, ["plugins", Name, "move"]),
|
||||||
case emqx_mgmt_api_test_util:request_api(post, Path, "", Auth, MoveBody) of
|
Opts = #{return_all => true},
|
||||||
|
case emqx_mgmt_api_test_util:request_api(post, Path, "", Auth, MoveBody, Opts) of
|
||||||
{ok, Res} ->
|
{ok, Res} ->
|
||||||
Resp =
|
Resp =
|
||||||
case emqx_utils_json:safe_decode(Res, [return_maps]) of
|
case emqx_utils_json:safe_decode(Res, [return_maps]) of
|
||||||
|
@ -362,8 +363,8 @@ cluster(TestCase, Config) ->
|
||||||
|
|
||||||
app_specs(_Config) ->
|
app_specs(_Config) ->
|
||||||
[
|
[
|
||||||
emqx_conf,
|
|
||||||
emqx,
|
emqx,
|
||||||
|
emqx_conf,
|
||||||
emqx_management,
|
emqx_management,
|
||||||
emqx_plugins
|
emqx_plugins
|
||||||
].
|
].
|
||||||
|
|
Loading…
Reference in New Issue