Просмотр исходного кода

fix(bridge): load emqx_conf in testcases

Shawn 4 лет назад
Родитель
Сommit
c4668b4047

+ 1 - 1
apps/emqx/test/emqx_common_test_helpers.erl

@@ -132,7 +132,7 @@ start_apps(Apps) ->
 start_apps(Apps, Handler) when is_function(Handler) ->
     %% Load all application code to beam vm first
     %% Because, minirest, ekka etc.. application will scan these modules
-    lists:foreach(fun load/1, [emqx_conf, emqx | Apps]),
+    lists:foreach(fun load/1, [emqx | Apps]),
     ekka:start(),
     lists:foreach(fun(App) -> start_app(App, Handler) end, [emqx | Apps]).
 

+ 1 - 0
apps/emqx_bridge/test/emqx_bridge_api_SUITE.erl

@@ -40,6 +40,7 @@ init_per_suite(Config) ->
             port => 18083
         }]
     }),
+    ok = application:load(emqx_conf),
     ok = emqx_common_test_helpers:start_apps([emqx_bridge, emqx_dashboard]),
     ok = emqx_config:init_load(emqx_bridge_schema, ?CONF_DEFAULT),
     Config.