fix(emqx_rule_engine_SUITE): use emqx_ct_helpers:read_schema_configs
This commit is contained in:
parent
e12a629498
commit
a9efdaeacd
|
@ -2559,18 +2559,10 @@ start_apps() ->
|
|||
local_path("etc/emqx_rule_engine.conf")}]].
|
||||
|
||||
start_apps(App, SchemaFile, ConfigFile) ->
|
||||
read_schema_configs(App, SchemaFile, ConfigFile),
|
||||
emqx_ct_helpers:read_schema_configs(SchemaFile, ConfigFile),
|
||||
set_special_configs(App),
|
||||
{ok, _} = application:ensure_all_started(App).
|
||||
|
||||
read_schema_configs(App, SchemaFile, ConfigFile) ->
|
||||
ct:pal("Read configs - SchemaFile: ~p, ConfigFile: ~p", [SchemaFile, ConfigFile]),
|
||||
Schema = cuttlefish_schema:files([SchemaFile]),
|
||||
{ok, Conf} = hocon:load(ConfigFile, #{format => proplists}),
|
||||
NewConfig = cuttlefish_generator:map(Schema, Conf),
|
||||
Vals = proplists:get_value(App, NewConfig, []),
|
||||
[application:set_env(App, Par, Value) || {Par, Value} <- Vals].
|
||||
|
||||
deps_path(App, RelativePath) ->
|
||||
%% Note: not lib_dir because etc dir is not sym-link-ed to _build dir
|
||||
%% but priv dir is
|
||||
|
|
Loading…
Reference in New Issue