Просмотр исходного кода

chore: fix typos in code and suite

JimMoen 2 лет назад
Родитель
Сommit
a3f33cc8bc

+ 1 - 1
apps/emqx/test/emqx_mqtt_protocol_v5_SUITE.erl

@@ -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),

+ 1 - 1
apps/emqx_gateway/src/emqx_gateway_http.erl

@@ -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) ->

+ 1 - 1
apps/emqx_gateway_stomp/test/emqx_stomp_SUITE.erl

@@ -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)),

+ 7 - 7
apps/emqx_management/src/emqx_mgmt_api_clients.erl

@@ -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">>
@@ -452,7 +452,7 @@ fields(client) ->
         {is_bridge,
             hoconsc:mk(boolean(), #{
                 desc =>
-                    <<"Indicates whether the client is connectedvia bridge">>
+                    <<"Indicates whether the client is connected via bridge">>
             })},
         {keepalive,
             hoconsc:mk(integer(), #{
@@ -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.

+ 1 - 1
apps/emqx_modules/src/emqx_delayed.erl

@@ -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

+ 1 - 1
apps/emqx_modules/src/emqx_modules.app.src

@@ -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, []}},