test: move dashboard specific cleanup call from emqx_common_test_helpers to the relevant test suite
This commit is contained in:
parent
50bbf4f231
commit
e3541d8947
|
@ -202,7 +202,6 @@ start_apps(Apps, SpecAppConfig, Opts) when is_function(SpecAppConfig) ->
|
|||
%% Because, minirest, ekka etc.. application will scan these modules
|
||||
lists:foreach(fun load/1, [emqx | Apps]),
|
||||
ok = start_ekka(),
|
||||
mnesia:clear_table(emqx_admin),
|
||||
ok = emqx_ratelimiter_SUITE:load_conf(),
|
||||
lists:foreach(fun(App) -> start_app(App, SpecAppConfig, Opts) end, [emqx | Apps]).
|
||||
|
||||
|
|
|
@ -56,14 +56,6 @@
|
|||
all() ->
|
||||
emqx_common_test_helpers:all(?MODULE).
|
||||
|
||||
end_suite() ->
|
||||
end_suite([]).
|
||||
|
||||
end_suite(Apps) ->
|
||||
application:unload(emqx_management),
|
||||
mnesia:clear_table(?ADMIN),
|
||||
emqx_common_test_helpers:stop_apps(Apps ++ [emqx_dashboard]).
|
||||
|
||||
init_per_suite(Config) ->
|
||||
emqx_common_test_helpers:start_apps(
|
||||
[emqx_management, emqx_dashboard],
|
||||
|
@ -72,6 +64,7 @@ init_per_suite(Config) ->
|
|||
Config.
|
||||
|
||||
end_per_suite(_Config) ->
|
||||
mnesia:clear_table(?ADMIN),
|
||||
emqx_common_test_helpers:stop_apps([emqx_dashboard, emqx_management]),
|
||||
mria:stop().
|
||||
|
||||
|
|
|
@ -33,10 +33,12 @@ all() ->
|
|||
init_per_suite(Config) ->
|
||||
application:load(emqx_dashboard),
|
||||
mria:start(),
|
||||
mnesia:clear_table(?ADMIN),
|
||||
emqx_common_test_helpers:start_apps([emqx_dashboard], fun set_special_configs/1),
|
||||
Config.
|
||||
|
||||
end_per_suite(Config) ->
|
||||
mnesia:clear_table(?ADMIN),
|
||||
emqx_common_test_helpers:stop_apps([emqx_dashboard]),
|
||||
Config.
|
||||
|
||||
|
|
Loading…
Reference in New Issue