Browse Source

chore: refine test cases

JianBo He 3 năm trước cách đây
mục cha
commit
c7054886b1

+ 5 - 5
apps/emqx_gateway/test/emqx_gateway_test_utils.erl

@@ -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

+ 1 - 1
apps/emqx_gateway_coap/test/emqx_coap_SUITE.erl

@@ -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]),

+ 1 - 1
apps/emqx_gateway_coap/test/emqx_coap_api_SUITE.erl

@@ -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.

+ 1 - 1
apps/emqx_gateway_exproto/test/emqx_exproto_SUITE.erl

@@ -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),

+ 2 - 2
apps/emqx_gateway_lwm2m/test/emqx_lwm2m_SUITE.erl

@@ -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"
         ]
     ),

+ 1 - 1
apps/emqx_gateway_lwm2m/test/emqx_lwm2m_api_SUITE.erl

@@ -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]),

+ 1 - 1
apps/emqx_gateway_mqttsn/test/emqx_sn_protocol_SUITE.erl

@@ -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.

+ 1 - 1
apps/emqx_gateway_stomp/test/emqx_stomp_SUITE.erl

@@ -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.