chore: fix common tests

This commit is contained in:
JianBo He 2023-04-07 15:34:16 +08:00
parent 702ecbcb6e
commit 502cc2b8b8
6 changed files with 6 additions and 0 deletions

View File

@ -46,6 +46,7 @@ all() -> emqx_common_test_helpers:all(?MODULE).
init_per_suite(Conf) ->
application:load(emqx),
emqx_gateway_test_utils:load_all_gateway_apps(),
emqx_config:delete_override_conf_files(),
emqx_config:erase(gateway),
emqx_common_test_helpers:load_config(emqx_gateway_schema, ?CONF_DEFAULT),

View File

@ -34,6 +34,7 @@ all() -> emqx_common_test_helpers:all(?MODULE).
init_per_suite(Conf) ->
emqx_config:erase(gateway),
emqx_gateway_test_utils:load_all_gateway_apps(),
emqx_common_test_helpers:load_config(emqx_gateway_schema, ?CONF_DEFAULT),
emqx_common_test_helpers:start_apps([]),

View File

@ -34,6 +34,7 @@ all() -> emqx_common_test_helpers:all(?MODULE).
init_per_suite(Conf) ->
emqx_config:erase(gateway),
emqx_gateway_test_utils:load_all_gateway_apps(),
emqx_common_test_helpers:load_config(emqx_gateway_schema, ?CONF_DEFAULT),
emqx_common_test_helpers:start_apps([]),
Conf.

View File

@ -28,6 +28,7 @@
all() -> emqx_common_test_helpers:all(?MODULE).
init_per_suite(Conf) ->
emqx_gateway_test_utils:load_all_gateway_apps(),
ok = meck:new(emqx_access_control, [passthrough, no_history, no_link]),
ok = meck:expect(
emqx_access_control,

View File

@ -33,6 +33,7 @@ all() -> emqx_common_test_helpers:all(?MODULE).
init_per_suite(Conf) ->
emqx_config:erase(gateway),
emqx_gateway_test_utils:load_all_gateway_apps(),
emqx_common_test_helpers:load_config(emqx_gateway_schema, ?CONF_DEFAULT),
emqx_common_test_helpers:start_apps([]),
Conf.

View File

@ -37,6 +37,7 @@ all() -> emqx_common_test_helpers:all(?MODULE).
%%--------------------------------------------------------------------
init_per_suite(Cfg) ->
emqx_gateway_test_utils:load_all_gateway_apps(),
ok = emqx_common_test_helpers:load_config(emqx_gateway_schema, ?CONF_DEFAULT),
emqx_common_test_helpers:start_apps([emqx_authn, emqx_gateway]),
Cfg.