From fc1d78134adb5ece829f7426aba8344434a7c5b6 Mon Sep 17 00:00:00 2001 From: zhongwencool Date: Thu, 15 Jun 2023 19:13:51 +0800 Subject: [PATCH] test: replace 'to' with 'path' --- apps/emqx_management/test/emqx_mgmt_api_configs_SUITE.erl | 4 ++-- apps/emqx_management/test/emqx_mgmt_api_nodes_SUITE.erl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/emqx_management/test/emqx_mgmt_api_configs_SUITE.erl b/apps/emqx_management/test/emqx_mgmt_api_configs_SUITE.erl index 8c2be7c9a..7993197ba 100644 --- a/apps/emqx_management/test/emqx_mgmt_api_configs_SUITE.erl +++ b/apps/emqx_management/test/emqx_mgmt_api_configs_SUITE.erl @@ -100,7 +100,7 @@ t_log(_Config) -> File = "log/emqx-test.log", %% update handler Log1 = emqx_utils_maps:deep_put([<<"file">>, <<"default">>, <<"enable">>], Log, true), - Log2 = emqx_utils_maps:deep_put([<<"file">>, <<"default">>, <<"to">>], Log1, File), + Log2 = emqx_utils_maps:deep_put([<<"file">>, <<"default">>, <<"path">>], Log1, File), {ok, #{}} = update_config(<<"log">>, Log2), {ok, Log3} = logger:get_handler_config(default), ?assertMatch(#{config := #{file := File}}, Log3), @@ -116,7 +116,7 @@ t_log(_Config) -> Handler = emqx_utils_maps:deep_get([<<"file">>, <<"default">>], Log2), NewLog1 = emqx_utils_maps:deep_put([<<"file">>, <<"new">>], Log2, Handler), NewLog2 = emqx_utils_maps:deep_put( - [<<"file">>, <<"new">>, <<"to">>], NewLog1, File1 + [<<"file">>, <<"new">>, <<"path">>], NewLog1, File1 ), {ok, #{}} = update_config(<<"log">>, NewLog2), {ok, Log4} = logger:get_handler_config(new), diff --git a/apps/emqx_management/test/emqx_mgmt_api_nodes_SUITE.erl b/apps/emqx_management/test/emqx_mgmt_api_nodes_SUITE.erl index efabe32c8..4154752ab 100644 --- a/apps/emqx_management/test/emqx_mgmt_api_nodes_SUITE.erl +++ b/apps/emqx_management/test/emqx_mgmt_api_nodes_SUITE.erl @@ -35,7 +35,7 @@ init_per_testcase(t_log_path, Config) -> Log = emqx_conf:get_raw([log], #{}), File = "log/emqx-test.log", Log1 = emqx_utils_maps:deep_put([<<"file">>, <<"default">>, <<"enable">>], Log, true), - Log2 = emqx_utils_maps:deep_put([<<"file">>, <<"default">>, <<"to">>], Log1, File), + Log2 = emqx_utils_maps:deep_put([<<"file">>, <<"default">>, <<"path">>], Log1, File), {ok, #{}} = emqx_conf:update([log], Log2, #{rawconf_with_defaults => true}), Config; init_per_testcase(_, Config) ->