From 9ead5c8cfd968d5f114c535668919eab8709191a Mon Sep 17 00:00:00 2001 From: k32 <10274441+k32@users.noreply.github.com> Date: Tue, 13 Apr 2021 12:38:51 +0200 Subject: [PATCH] chore(test): fix shutting down of applications in web hooks suite --- .../test/emqx_auth_mnesia_migration_SUITE.erl | 6 +++--- apps/emqx_web_hook/test/emqx_web_hook_SUITE.erl | 17 ++++++++--------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/apps/emqx_management/test/emqx_auth_mnesia_migration_SUITE.erl b/apps/emqx_management/test/emqx_auth_mnesia_migration_SUITE.erl index 563dd33ae..c1e217d2a 100644 --- a/apps/emqx_management/test/emqx_auth_mnesia_migration_SUITE.erl +++ b/apps/emqx_management/test/emqx_auth_mnesia_migration_SUITE.erl @@ -60,15 +60,15 @@ init_per_suite(Config) -> 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(). init_per_testcase(_, Config) -> Config. end_per_testcase(_, _Config) -> - mnesia:clear_table(emqx_acl), - mnesia:clear_table(emqx_user), + ok = mnesia:clear_table(emqx_acl), + ok = mnesia:clear_table(emqx_user), ok. t_matrix(Config) -> diff --git a/apps/emqx_web_hook/test/emqx_web_hook_SUITE.erl b/apps/emqx_web_hook/test/emqx_web_hook_SUITE.erl index 6c010de9d..4d1d3d39a 100644 --- a/apps/emqx_web_hook/test/emqx_web_hook_SUITE.erl +++ b/apps/emqx_web_hook/test/emqx_web_hook_SUITE.erl @@ -48,22 +48,18 @@ init_per_group(Name, Config) -> set_special_cfgs(), case Name of http -> - emqx_ct_helpers:start_apps([emqx_web_hook, emqx_modules, emqx_management, - emqx_rule_engine], fun set_special_configs_http/1); + emqx_ct_helpers:start_apps(apps(), fun set_special_configs_http/1); https -> - emqx_ct_helpers:start_apps([emqx_web_hook, emqx_modules, emqx_management, - emqx_rule_engine], fun set_special_configs_https/1); + emqx_ct_helpers:start_apps(apps(), fun set_special_configs_https/1); ipv6http -> - emqx_ct_helpers:start_apps([emqx_web_hook, emqx_management, - emqx_rule_engine], fun set_special_configs_ipv6_http/1); + emqx_ct_helpers:start_apps(apps(), fun set_special_configs_ipv6_http/1); ipv6https -> - emqx_ct_helpers:start_apps([emqx_web_hook, emqx_management, - emqx_rule_engine], fun set_special_configs_ipv6_https/1) + emqx_ct_helpers:start_apps(apps(), fun set_special_configs_ipv6_https/1) end, Config. end_per_group(_Name, Config) -> - emqx_ct_helpers:stop_apps([emqx_web_hook]), + emqx_ct_helpers:stop_apps(apps()), Config. set_special_configs_http(_) -> @@ -220,3 +216,6 @@ assert_messages_attrs(#{ <<"ts">> := _ , <<"from_client_id">> := _ }) -> ok. + +apps() -> + [emqx_web_hook, emqx_modules, emqx_management, emqx_rule_engine].