diff --git a/apps/emqx_rule_engine/test/emqx_rule_engine_SUITE.erl b/apps/emqx_rule_engine/test/emqx_rule_engine_SUITE.erl index d9675cc6b..d8244c018 100644 --- a/apps/emqx_rule_engine/test/emqx_rule_engine_SUITE.erl +++ b/apps/emqx_rule_engine/test/emqx_rule_engine_SUITE.erl @@ -2553,25 +2553,20 @@ stop_apps() -> start_apps() -> [start_apps(App, SchemaFile, ConfigFile) || {App, SchemaFile, ConfigFile} - <- [{emqx, deps_path(emqx, "priv/emqx.schema"), - deps_path(emqx, "etc/emqx.conf.rendered")}, + <- [{emqx, emqx_schema, deps_path(emqx, "etc/emqx.conf")}, {emqx_rule_engine, local_path("priv/emqx_rule_engine.schema"), local_path("etc/emqx_rule_engine.conf")}]]. -start_apps(App, SchemaFile, ConfigFile) -> - emqx_ct_helpers:read_schema_configs(SchemaFile, ConfigFile), - set_special_configs(App), - {ok, _} = application:ensure_all_started(App). +start_apps(App, Schema, ConfigFile) -> + emqx_ct_helpers:start_app(App, Schema, ConfigFile, fun set_special_configs/1). deps_path(App, RelativePath) -> - %% Note: not lib_dir because etc dir is not sym-link-ed to _build dir - %% but priv dir is - Path0 = code:priv_dir(App), + Path0 = code:lib_dir(App), Path = case file:read_link(Path0) of {ok, Resolved} -> Resolved; {error, _} -> Path0 end, - filename:join([Path, "..", RelativePath]). + filename:join([Path, RelativePath]). local_path(RelativePath) -> deps_path(emqx_rule_engine, RelativePath). diff --git a/rebar.config.erl b/rebar.config.erl index c3dbd16c0..df943cc42 100644 --- a/rebar.config.erl +++ b/rebar.config.erl @@ -106,7 +106,7 @@ test_plugins() -> test_deps() -> [ {bbmustache, "1.10.0"} - , {emqx_ct_helpers, {git, "https://github.com/emqx/emqx-ct-helpers", {branch, "hocon"}}} + , {emqx_ct_helpers, {git, "https://github.com/emqx/emqx-ct-helpers", {tag, "2.0.0"}}} , meck ].