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.
This commit is contained in:
JianBo He 2022-04-08 10:46:47 +08:00
parent bf1a3fe1eb
commit 1ff371bdea
1 changed files with 8 additions and 0 deletions

View File

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