test(mqtt-bridge): do not assert map key order
starting from otp 26, small maps (less than 32 fields), the atom key orders are no longer deterministic
This commit is contained in:
parent
077412fccd
commit
9487635957
|
@ -230,19 +230,18 @@ t_conf_bridge_authn_passfile(Config) ->
|
||||||
?assertReceive(
|
?assertReceive(
|
||||||
{authenticate, #{username := Username2, password := Password2}}
|
{authenticate, #{username := Username2, password := Password2}}
|
||||||
),
|
),
|
||||||
?assertMatch(
|
{ok, 201, #{
|
||||||
{ok, 201, #{
|
<<"status">> := <<"disconnected">>,
|
||||||
<<"status">> := <<"disconnected">>,
|
<<"status_reason">> := Reason
|
||||||
<<"status_reason">> := <<"#{msg => failed_to_read_secret_file", _/bytes>>
|
}} =
|
||||||
}},
|
|
||||||
request_json(
|
request_json(
|
||||||
post,
|
post,
|
||||||
uri(["bridges"]),
|
uri(["bridges"]),
|
||||||
?SERVER_CONF(<<>>, <<"file://im/pretty/sure/theres/no/such/file">>)#{
|
?SERVER_CONF(<<>>, <<"file://im/pretty/sure/theres/no/such/file">>)#{
|
||||||
<<"name">> => <<"t_conf_bridge_authn_no_passfile">>
|
<<"name">> => <<"t_conf_bridge_authn_no_passfile">>
|
||||||
}
|
}
|
||||||
)
|
),
|
||||||
).
|
?assertMatch({match, _}, re:run(Reason, <<"failed_to_read_secret_file">>)).
|
||||||
|
|
||||||
hook_authenticate() ->
|
hook_authenticate() ->
|
||||||
emqx_hooks:add('client.authenticate', {?MODULE, authenticate, [self()]}, ?HP_HIGHEST).
|
emqx_hooks:add('client.authenticate', {?MODULE, authenticate, [self()]}, ?HP_HIGHEST).
|
||||||
|
|
Loading…
Reference in New Issue