diff --git a/apps/emqx/test/emqx_common_test_helpers.erl b/apps/emqx/test/emqx_common_test_helpers.erl index f440dfc5a..f53c2702d 100644 --- a/apps/emqx/test/emqx_common_test_helpers.erl +++ b/apps/emqx/test/emqx_common_test_helpers.erl @@ -408,7 +408,9 @@ catch_call(F) -> C:E:S -> {crashed, {C, E, S}} end. -force_set_config_file_paths(emqx_conf, Paths) -> +force_set_config_file_paths(emqx_conf, [Path] = Paths) -> + Bin = iolist_to_binary(io_lib:format("node.config_files = [~p]", [Path])), + ok = file:write_file(Path, Bin, [append]), application:set_env(emqx, config_files, Paths); force_set_config_file_paths(emqx, Paths) -> application:set_env(emqx, config_files, Paths); diff --git a/apps/emqx_conf/src/emqx_conf_schema.erl b/apps/emqx_conf/src/emqx_conf_schema.erl index 90af47aca..7a20a88dc 100644 --- a/apps/emqx_conf/src/emqx_conf_schema.erl +++ b/apps/emqx_conf/src/emqx_conf_schema.erl @@ -463,7 +463,7 @@ fields("node") -> )}, {"config_files", sc( - list(string()), + hoconsc:array(string()), #{ mapping => "emqx.config_files", default => undefined,