This is an automated email from the ASF dual-hosted git repository. jan pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 88fcdce98ecbbe2dd54b409ef5d773ed040a1b53 Author: Jan Lehnardt <[email protected]> AuthorDate: Thu Dec 4 15:11:29 2025 +0100 chore: lint --- src/couch/src/test_util.erl | 18 ++++++++++-------- src/fabric/test/eunit/fabric_tests.erl | 9 +++++---- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/couch/src/test_util.erl b/src/couch/src/test_util.erl index eb2221728..4b3e63ad3 100644 --- a/src/couch/src/test_util.erl +++ b/src/couch/src/test_util.erl @@ -108,12 +108,15 @@ start_couch(IniFiles, ExtraApps) -> ok = filelib:ensure_path(RandomDataDir), ok = filelib:ensure_dir(RandomLogFile), - RandomIniFiles = lists:map(fun(SourceFile) -> - TargetFileName = lists:last(filename:split(SourceFile)), - TargetFile = filename:join([RandomEtcDir, TargetFileName]), - {ok, _} = file:copy(SourceFile, TargetFile), - ?b2l(TargetFile) - end, IniFiles), + RandomIniFiles = lists:map( + fun(SourceFile) -> + TargetFileName = lists:last(filename:split(SourceFile)), + TargetFile = filename:join([RandomEtcDir, TargetFileName]), + {ok, _} = file:copy(SourceFile, TargetFile), + ?b2l(TargetFile) + end, + IniFiles + ), load_applications_with_stats(), ok = application:set_env(config, ini_files, RandomIniFiles), Apps = start_applications(?DEFAULT_APPS ++ ExtraApps), @@ -127,10 +130,9 @@ start_couch(IniFiles, ExtraApps) -> stop_couch() -> ok = stop_applications(?DEFAULT_APPS). -stop_couch(#test_context{started = Apps, dir = RandomDir }) -> +stop_couch(#test_context{started = Apps, dir = RandomDir}) -> file:del_dir_r(RandomDir), stop_applications(Apps); - stop_couch(_) -> stop_couch(). with_couch_server_restart(Fun) -> diff --git a/src/fabric/test/eunit/fabric_tests.erl b/src/fabric/test/eunit/fabric_tests.erl index 63a55ff9a..c092f4473 100644 --- a/src/fabric/test/eunit/fabric_tests.erl +++ b/src/fabric/test/eunit/fabric_tests.erl @@ -386,10 +386,11 @@ delete_dbs(DbList) -> setup_fabric() -> Ctx = test_util:start_couch([fabric]), - ok = case clear_shards_db() of - ok -> ok; - not_found -> ok - end, + ok = + case clear_shards_db() of + ok -> ok; + not_found -> ok + end, Ctx. teardown_fabric(Ctx) ->
