chore: update changes && test cases
This commit is contained in:
parent
b0c5b447a4
commit
e20b804e6b
|
@ -102,7 +102,7 @@ t_will_message_connection_denied(Config) when is_list(Config) ->
|
|||
{error, _} = emqtt:connect(Publisher),
|
||||
receive
|
||||
{'DOWN', Ref, process, Publisher, Reason} ->
|
||||
?assertEqual({shutdown, unauthorized_client}, Reason)
|
||||
?assertEqual({shutdown, malformed_username_or_password}, Reason)
|
||||
after 2000 ->
|
||||
error(timeout)
|
||||
end,
|
||||
|
@ -151,7 +151,7 @@ t_password_undefined(Config) when is_list(Config) ->
|
|||
header = #mqtt_packet_header{type = ?CONNACK},
|
||||
variable = #mqtt_packet_connack{
|
||||
ack_flags = 0,
|
||||
reason_code = ?CONNACK_AUTH
|
||||
reason_code = ?CONNACK_CREDENTIALS
|
||||
},
|
||||
payload = undefined
|
||||
},
|
||||
|
|
|
@ -359,7 +359,7 @@ test_authenticator_users(PathPrefix) ->
|
|||
<<"metrics">> := #{
|
||||
<<"total">> := 1,
|
||||
<<"success">> := 0,
|
||||
<<"nomatch">> := 1
|
||||
<<"failed">> := 1
|
||||
}
|
||||
} = emqx_utils_json:decode(PageData0, [return_maps]);
|
||||
["listeners", 'tcp:default'] ->
|
||||
|
@ -417,7 +417,7 @@ test_authenticator_users(PathPrefix) ->
|
|||
<<"metrics">> := #{
|
||||
<<"total">> := 2,
|
||||
<<"success">> := 1,
|
||||
<<"nomatch">> := 1
|
||||
<<"failed">> := 1
|
||||
}
|
||||
} = emqx_utils_json:decode(PageData01, [return_maps]);
|
||||
["listeners", 'tcp:default'] ->
|
||||
|
|
|
@ -102,7 +102,7 @@ t_enable_authn(_Config) ->
|
|||
%% enable_authn set to true, we go to the set up authn and fail
|
||||
{ok, ConnPid1} = emqtt:start_link([{port, 18830}, {clientid, <<"clientid">>}]),
|
||||
?assertMatch(
|
||||
{error, {unauthorized_client, _}},
|
||||
{error, {malformed_username_or_password, _}},
|
||||
emqtt:connect(ConnPid1)
|
||||
),
|
||||
ok.
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Quickly return the result when the password is absent in password-based authentication.
|
Loading…
Reference in New Issue