chore: fix typos in code and suite

This commit is contained in:
JimMoen 2023-12-27 11:22:50 +08:00
parent a35ed4dacb
commit a3f33cc8bc
No known key found for this signature in database
GPG Key ID: 87A520B4F76BA86D
6 changed files with 12 additions and 12 deletions

View File

@ -585,7 +585,7 @@ t_connack_max_qos_allowed(Config) ->
process_flag(trap_exit, false).
t_connack_assigned_clienid(Config) ->
t_connack_assigned_clientid(Config) ->
ConnFun = ?config(conn_fun, Config),
{ok, Client1} = emqtt:start_link([{proto_ver, v5} | Config]),
{ok, _} = emqtt:ConnFun(Client1),

View File

@ -509,7 +509,7 @@ codestr(400) -> 'BAD_REQUEST';
codestr(404) -> 'RESOURCE_NOT_FOUND';
codestr(405) -> 'METHOD_NOT_ALLOWED';
codestr(409) -> 'NOT_SUPPORT';
codestr(500) -> 'UNKNOW_ERROR';
codestr(500) -> 'UNKNOWN_ERROR';
codestr(501) -> 'NOT_IMPLEMENTED'.
fmtstr(Fmt, Args) ->

View File

@ -797,7 +797,7 @@ test_frame_error(Frame, AssertFun) ->
AssertFun(Sock)
end).
t_rest_clienit_info(_) ->
t_rest_clientid_info(_) ->
with_connection(fun(Sock) ->
send_connection_frame(Sock, <<"guest">>, <<"guest">>),
?assertMatch({ok, #stomp_frame{command = <<"CONNECTED">>}}, recv_a_frame(Sock)),

View File

@ -221,7 +221,7 @@ schema("/clients/kickout/bulk") ->
tags => ?TAGS,
'requestBody' => emqx_dashboard_swagger:schema_with_example(
hoconsc:array(binary()),
["emqx_clienid_985bb09d", "emqx_clientid_211cc01c"]
["emqx_clientid_985bb09d", "emqx_clientid_211cc01c"]
),
responses => #{
204 => <<"Kick out clients successfully">>
@ -605,7 +605,7 @@ kickout_clients(post, #{body := ClientIDs}) ->
{204};
{error, Reason} ->
Message = list_to_binary(io_lib:format("~p", [Reason])),
{500, #{code => <<"UNKNOW_ERROR">>, message => Message}}
{500, #{code => <<"UNKNOWN_ERROR">>, message => Message}}
end.
client(get, #{bindings := Bindings}) ->
@ -660,7 +660,7 @@ set_keepalive(put, #{bindings := #{clientid := ClientID}, body := Body}) ->
case emqx_mgmt:set_keepalive(ClientID, Interval) of
ok -> lookup(#{clientid => ClientID});
{error, not_found} -> {404, ?CLIENTID_NOT_FOUND};
{error, Reason} -> {400, #{code => 'PARAMS_ERROR', message => Reason}}
{error, Reason} -> {400, #{code => 'PARAM_ERROR', message => Reason}}
end
end.
@ -728,7 +728,7 @@ get_authz_cache(#{clientid := ClientID}) ->
{404, ?CLIENTID_NOT_FOUND};
{error, Reason} ->
Message = list_to_binary(io_lib:format("~p", [Reason])),
{500, #{code => <<"UNKNOW_ERROR">>, message => Message}};
{500, #{code => <<"UNKNOWN_ERROR">>, message => Message}};
Caches ->
Response = [format_authz_cache(Cache) || Cache <- Caches],
{200, Response}
@ -742,7 +742,7 @@ clean_authz_cache(#{clientid := ClientID}) ->
{404, ?CLIENTID_NOT_FOUND};
{error, Reason} ->
Message = list_to_binary(io_lib:format("~p", [Reason])),
{500, #{code => <<"UNKNOW_ERROR">>, message => Message}}
{500, #{code => <<"UNKNOWN_ERROR">>, message => Message}}
end.
subscribe(#{clientid := ClientID, topic := Topic} = Sub) ->
@ -752,7 +752,7 @@ subscribe(#{clientid := ClientID, topic := Topic} = Sub) ->
{404, ?CLIENTID_NOT_FOUND};
{error, Reason} ->
Message = list_to_binary(io_lib:format("~p", [Reason])),
{500, #{code => <<"UNKNOW_ERROR">>, message => Message}};
{500, #{code => <<"UNKNOWN_ERROR">>, message => Message}};
{ok, SubInfo} ->
{200, SubInfo}
end.

View File

@ -419,7 +419,7 @@ do_publish(Key = {Ts, _Id}, Now, Acc) when Ts =< Now ->
ignore_delayed_message_publish,
#{
reason => "client is banned",
clienid => Msg#message.from
clientid => Msg#message.from
}
),
ok

View File

@ -1,7 +1,7 @@
%% -*- mode: erlang -*-
{application, emqx_modules, [
{description, "EMQX Modules"},
{vsn, "5.0.24"},
{vsn, "5.0.25"},
{modules, []},
{applications, [kernel, stdlib, emqx, emqx_ctl, observer_cli]},
{mod, {emqx_modules_app, []}},