test(emqx_rule_engine_SUITE): delegate app start to ct-helper (2.0.0)
This commit is contained in:
parent
b92a6837d7
commit
4ee6c82714
|
@ -2553,25 +2553,20 @@ stop_apps() ->
|
||||||
start_apps() ->
|
start_apps() ->
|
||||||
[start_apps(App, SchemaFile, ConfigFile) ||
|
[start_apps(App, SchemaFile, ConfigFile) ||
|
||||||
{App, SchemaFile, ConfigFile}
|
{App, SchemaFile, ConfigFile}
|
||||||
<- [{emqx, deps_path(emqx, "priv/emqx.schema"),
|
<- [{emqx, emqx_schema, deps_path(emqx, "etc/emqx.conf")},
|
||||||
deps_path(emqx, "etc/emqx.conf.rendered")},
|
|
||||||
{emqx_rule_engine, local_path("priv/emqx_rule_engine.schema"),
|
{emqx_rule_engine, local_path("priv/emqx_rule_engine.schema"),
|
||||||
local_path("etc/emqx_rule_engine.conf")}]].
|
local_path("etc/emqx_rule_engine.conf")}]].
|
||||||
|
|
||||||
start_apps(App, SchemaFile, ConfigFile) ->
|
start_apps(App, Schema, ConfigFile) ->
|
||||||
emqx_ct_helpers:read_schema_configs(SchemaFile, ConfigFile),
|
emqx_ct_helpers:start_app(App, Schema, ConfigFile, fun set_special_configs/1).
|
||||||
set_special_configs(App),
|
|
||||||
{ok, _} = application:ensure_all_started(App).
|
|
||||||
|
|
||||||
deps_path(App, RelativePath) ->
|
deps_path(App, RelativePath) ->
|
||||||
%% Note: not lib_dir because etc dir is not sym-link-ed to _build dir
|
Path0 = code:lib_dir(App),
|
||||||
%% but priv dir is
|
|
||||||
Path0 = code:priv_dir(App),
|
|
||||||
Path = case file:read_link(Path0) of
|
Path = case file:read_link(Path0) of
|
||||||
{ok, Resolved} -> Resolved;
|
{ok, Resolved} -> Resolved;
|
||||||
{error, _} -> Path0
|
{error, _} -> Path0
|
||||||
end,
|
end,
|
||||||
filename:join([Path, "..", RelativePath]).
|
filename:join([Path, RelativePath]).
|
||||||
|
|
||||||
local_path(RelativePath) ->
|
local_path(RelativePath) ->
|
||||||
deps_path(emqx_rule_engine, RelativePath).
|
deps_path(emqx_rule_engine, RelativePath).
|
||||||
|
|
|
@ -106,7 +106,7 @@ test_plugins() ->
|
||||||
|
|
||||||
test_deps() ->
|
test_deps() ->
|
||||||
[ {bbmustache, "1.10.0"}
|
[ {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
|
, meck
|
||||||
].
|
].
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue