chore: refine test cases

This commit is contained in:
JianBo He 2023-04-13 17:44:02 +08:00
parent 0a62d6c556
commit c7054886b1
8 changed files with 13 additions and 13 deletions

View File

@ -102,11 +102,11 @@ assert_fields_exist(Ks, Map) ->
Ks
).
load_all_gateway_apps() ->
application:load(emqx_stomp),
application:load(emqx_mqttsn),
application:load(emqx_coap),
application:load(emqx_lwm2m),
application:load(emqx_exproto).
application:load(emqx_gateway_stomp),
application:load(emqx_gateway_mqttsn),
application:load(emqx_gateway_coap),
application:load(emqx_gateway_lwm2m),
application:load(emqx_gateway_exproto).
%%--------------------------------------------------------------------
%% http

View File

@ -56,7 +56,7 @@
all() -> emqx_common_test_helpers:all(?MODULE).
init_per_suite(Config) ->
application:load(emqx_coap),
application:load(emqx_gateway_coap),
ok = emqx_common_test_helpers:load_config(emqx_gateway_schema, ?CONF_DEFAULT),
emqx_mgmt_api_test_util:init_suite([emqx_authn, emqx_gateway]),
ok = meck:new(emqx_access_control, [passthrough, no_history, no_link]),

View File

@ -56,7 +56,7 @@ all() ->
emqx_common_test_helpers:all(?MODULE).
init_per_suite(Config) ->
application:load(emqx_coap),
application:load(emqx_gateway_coap),
ok = emqx_common_test_helpers:load_config(emqx_gateway_schema, ?CONF_DEFAULT),
emqx_mgmt_api_test_util:init_suite([emqx_authn, emqx_gateway]),
Config.

View File

@ -76,7 +76,7 @@ metrics() ->
[tcp, ssl, udp, dtls].
init_per_group(GrpName, Cfg) ->
application:load(emqx_exproto),
application:load(emqx_gateway_exproto),
put(grpname, GrpName),
Svrs = emqx_exproto_echo_svr:start(),
emqx_common_test_helpers:start_apps([emqx_authn, emqx_gateway], fun set_special_cfg/1),

View File

@ -134,7 +134,7 @@ groups() ->
init_per_suite(Config) ->
%% load application first for minirest api searching
application:load(emqx_gateway),
application:load(emqx_lwm2m),
application:load(emqx_gateway_lwm2m),
emqx_mgmt_api_test_util:init_suite([emqx_conf, emqx_authn]),
Config.
@ -181,7 +181,7 @@ default_config(Overrides) ->
[
emqx_common_test_helpers:proj_root(),
"apps",
"emqx_lwm2m",
"emqx_gateway_lwm2m",
"lwm2m_xml"
]
),

View File

@ -59,7 +59,7 @@ all() ->
init_per_suite(Config) ->
application:load(emqx_gateway),
application:load(emqx_lwm2m),
application:load(emqx_gateway_lwm2m),
DefaultConfig = emqx_lwm2m_SUITE:default_config(),
ok = emqx_common_test_helpers:load_config(emqx_gateway_schema, DefaultConfig),
emqx_mgmt_api_test_util:init_suite([emqx_conf, emqx_authn]),

View File

@ -97,7 +97,7 @@ all() ->
emqx_common_test_helpers:all(?MODULE).
init_per_suite(Config) ->
application:load(emqx_mqttsn),
application:load(emqx_gateway_mqttsn),
ok = emqx_common_test_helpers:load_config(emqx_gateway_schema, ?CONF_DEFAULT),
emqx_mgmt_api_test_util:init_suite([emqx_conf, emqx_authn, emqx_gateway]),
Config.

View File

@ -53,7 +53,7 @@ all() -> emqx_common_test_helpers:all(?MODULE).
%%--------------------------------------------------------------------
init_per_suite(Cfg) ->
application:load(emqx_stomp),
application:load(emqx_gateway_stomp),
ok = emqx_common_test_helpers:load_config(emqx_gateway_schema, ?CONF_DEFAULT),
emqx_mgmt_api_test_util:init_suite([emqx_authn, emqx_gateway]),
Cfg.