From 1ff371bdea100c6716741630ce323495df52b138 Mon Sep 17 00:00:00 2001 From: JianBo He Date: Fri, 8 Apr 2022 10:46:47 +0800 Subject: [PATCH] test(dashboard): avoid to start useless plugins The #7520 causes the default load_{plugins,modules} file to be used when starting the slave node. In this case, the slave will automatically start the emqx-dashbord plugin with the default configuration when it re-join cluster, which will cause the applications to fail to start. --- lib-ce/emqx_dashboard/test/emqx_dashboard_SUITE.erl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib-ce/emqx_dashboard/test/emqx_dashboard_SUITE.erl b/lib-ce/emqx_dashboard/test/emqx_dashboard_SUITE.erl index 556fb8371..3e70a3b6d 100644 --- a/lib-ce/emqx_dashboard/test/emqx_dashboard_SUITE.erl +++ b/lib-ce/emqx_dashboard/test/emqx_dashboard_SUITE.erl @@ -309,8 +309,16 @@ is_lib(Path) -> string:prefix(Path, code:lib_dir()) =:= nomatch. setup_node(Node, Apps) -> + LoadedPlugins = emqx_ct_helpers:deps_path( + emqx, + filename:join(["test", "emqx_SUITE_data", "loaded_plugins"])), + LoadedModules = emqx_ct_helpers:deps_path( + emqx, + filename:join(["test", "emqx_SUITE_data", "loaded_modules"])), EnvHandler = fun(emqx) -> + application:set_env(emqx, plugins_loaded_file, LoadedPlugins), + application:set_env(emqx, modules_loaded_file, LoadedModules), application:set_env(emqx, listeners, []), application:set_env(gen_rpc, port_discovery, manual), ok;