test(gw): ensure emqx_authn starting state

This commit is contained in:
JianBo He 2021-10-15 09:58:14 +08:00
parent 7b211d35b8
commit 1cf833e1c0
2 changed files with 4 additions and 2 deletions

View File

@ -40,11 +40,11 @@ init_per_suite(Conf) ->
%% Start emqx-authn separately, due to emqx_authn_schema %% Start emqx-authn separately, due to emqx_authn_schema
%% not implementing the roots/0 method, it cannot be started with %% not implementing the roots/0 method, it cannot be started with
%% emqx-ct-helpers at the moment. %% emqx-ct-helpers at the moment.
application:ensure_all_started([emqx_authn]), {ok, _} = application:ensure_all_started(emqx_authn),
Conf. Conf.
end_per_suite(Conf) -> end_per_suite(Conf) ->
application:stop([emqx_authn]), application:stop(emqx_authn),
emqx_mgmt_api_test_util:end_suite([emqx_gateway]), emqx_mgmt_api_test_util:end_suite([emqx_gateway]),
Conf. Conf.

View File

@ -37,9 +37,11 @@ init_per_suite(Conf) ->
%% FIXME: Magic line. for saving gateway schema name for emqx_config %% FIXME: Magic line. for saving gateway schema name for emqx_config
emqx_config:init_load(emqx_gateway_schema, <<"gateway {}">>), emqx_config:init_load(emqx_gateway_schema, <<"gateway {}">>),
emqx_common_test_helpers:start_apps([emqx_gateway]), emqx_common_test_helpers:start_apps([emqx_gateway]),
{ok, _} = application:ensure_all_started(emqx_authn),
Conf. Conf.
end_per_suite(_Conf) -> end_per_suite(_Conf) ->
application:stop(emqx_authn),
emqx_common_test_helpers:stop_apps([emqx_gateway]). emqx_common_test_helpers:stop_apps([emqx_gateway]).
init_per_testcase(_CaseName, Conf) -> init_per_testcase(_CaseName, Conf) ->