fix(test): avoid unnecessary cleanups

This might make some noise in the logs, depending on the testsuite
configuration, because some test setup might be missing required
applications.
This commit is contained in:
Andrew Mayorov 2023-03-23 13:23:56 +03:00
parent 11b5b7b638
commit d942a531e6
No known key found for this signature in database
GPG Key ID: 2837C62ACFBFED5D
1 changed files with 8 additions and 1 deletions

View File

@ -174,7 +174,6 @@ end_per_group(cluster, Config) ->
);
end_per_group(_, _Config) ->
emqx_mgmt_api_test_util:end_suite(?SUITE_APPS),
mria:clear_table(emqx_authn_mnesia),
ok.
init_per_testcase(t_broken_bpapi_vsn, Config) ->
@ -1070,6 +1069,10 @@ t_bridges_probe(Config) ->
Config
),
emqx_common_test_helpers:on_exit(fun() ->
delete_user_auth(Chain, AuthenticatorID, User, Config)
end),
?assertMatch(
{ok, 400, #{
<<"code">> := <<"TEST_FAILED">>,
@ -1290,6 +1293,10 @@ add_user_auth(Chain, AuthenticatorID, User, Config) ->
Node = ?config(api_node, Config),
erpc:call(Node, emqx_authentication, add_user, [Chain, AuthenticatorID, User]).
delete_user_auth(Chain, AuthenticatorID, User, Config) ->
Node = ?config(api_node, Config),
erpc:call(Node, emqx_authentication, delete_user, [Chain, AuthenticatorID, User]).
str(S) when is_list(S) -> S;
str(S) when is_binary(S) -> binary_to_list(S).