chore(test): fix shutting down of applications in web hooks suite

This commit is contained in:
k32 2021-04-13 12:38:51 +02:00 committed by turtleDeng
parent 8304a96e1d
commit 9ead5c8cfd
2 changed files with 11 additions and 12 deletions

View File

@ -60,15 +60,15 @@ init_per_suite(Config) ->
Config. Config.
end_per_suite(_Config) -> end_per_suite(_Config) ->
emqx_ct_helpers:stop_apps([emqx_modules, emqx_management, emqx_dashboard, emqx_management, emqx_auth_mnesia]), emqx_ct_helpers:stop_apps([emqx_modules, emqx_management, emqx_dashboard, emqx_auth_mnesia]),
ekka_mnesia:ensure_stopped(). ekka_mnesia:ensure_stopped().
init_per_testcase(_, Config) -> init_per_testcase(_, Config) ->
Config. Config.
end_per_testcase(_, _Config) -> end_per_testcase(_, _Config) ->
mnesia:clear_table(emqx_acl), ok = mnesia:clear_table(emqx_acl),
mnesia:clear_table(emqx_user), ok = mnesia:clear_table(emqx_user),
ok. ok.
t_matrix(Config) -> t_matrix(Config) ->

View File

@ -48,22 +48,18 @@ init_per_group(Name, Config) ->
set_special_cfgs(), set_special_cfgs(),
case Name of case Name of
http -> http ->
emqx_ct_helpers:start_apps([emqx_web_hook, emqx_modules, emqx_management, emqx_ct_helpers:start_apps(apps(), fun set_special_configs_http/1);
emqx_rule_engine], fun set_special_configs_http/1);
https -> https ->
emqx_ct_helpers:start_apps([emqx_web_hook, emqx_modules, emqx_management, emqx_ct_helpers:start_apps(apps(), fun set_special_configs_https/1);
emqx_rule_engine], fun set_special_configs_https/1);
ipv6http -> ipv6http ->
emqx_ct_helpers:start_apps([emqx_web_hook, emqx_management, emqx_ct_helpers:start_apps(apps(), fun set_special_configs_ipv6_http/1);
emqx_rule_engine], fun set_special_configs_ipv6_http/1);
ipv6https -> ipv6https ->
emqx_ct_helpers:start_apps([emqx_web_hook, emqx_management, emqx_ct_helpers:start_apps(apps(), fun set_special_configs_ipv6_https/1)
emqx_rule_engine], fun set_special_configs_ipv6_https/1)
end, end,
Config. Config.
end_per_group(_Name, Config) -> end_per_group(_Name, Config) ->
emqx_ct_helpers:stop_apps([emqx_web_hook]), emqx_ct_helpers:stop_apps(apps()),
Config. Config.
set_special_configs_http(_) -> set_special_configs_http(_) ->
@ -220,3 +216,6 @@ assert_messages_attrs(#{ <<"ts">> := _
, <<"from_client_id">> := _ , <<"from_client_id">> := _
}) -> }) ->
ok. ok.
apps() ->
[emqx_web_hook, emqx_modules, emqx_management, emqx_rule_engine].