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:
Zaiming (Stone) Shi 2023-12-12 16:45:34 +01:00
parent 077412fccd
commit 9487635957
1 changed files with 6 additions and 7 deletions

View File

@ -230,19 +230,18 @@ t_conf_bridge_authn_passfile(Config) ->
?assertReceive(
{authenticate, #{username := Username2, password := Password2}}
),
?assertMatch(
{ok, 201, #{
<<"status">> := <<"disconnected">>,
<<"status_reason">> := <<"#{msg => failed_to_read_secret_file", _/bytes>>
}},
{ok, 201, #{
<<"status">> := <<"disconnected">>,
<<"status_reason">> := Reason
}} =
request_json(
post,
uri(["bridges"]),
?SERVER_CONF(<<>>, <<"file://im/pretty/sure/theres/no/such/file">>)#{
<<"name">> => <<"t_conf_bridge_authn_no_passfile">>
}
)
).
),
?assertMatch({match, _}, re:run(Reason, <<"failed_to_read_secret_file">>)).
hook_authenticate() ->
emqx_hooks:add('client.authenticate', {?MODULE, authenticate, [self()]}, ?HP_HIGHEST).