Рефакторинг обработчиков. Финальное тестирование #21

This commit is contained in:
2026-05-18 14:37:59 +03:00
parent 40806df62a
commit 3abf5c94ee
21 changed files with 630 additions and 89 deletions

View File

@@ -46,6 +46,13 @@ init_per_suite(Config) ->
case os:getenv("CT_MODE", "local") of
"remote" ->
ct:pal("Remote mode: assuming application is already running"),
inets:start(),
ssl:start(),
% Отключаем авто-редирект и проверку сертификатов
httpc:set_options([
{autoredirect, false},
{ssl, [{verify, verify_none}]}
]),
wait_for_remote(),
[{started_by_us, false} | Config];
_ ->
@@ -135,7 +142,7 @@ wait_for_remote() ->
wait_for_health(_URL, 0) ->
ct:fail("Remote API did not start within 30 seconds");
wait_for_health(URL, Retries) ->
case httpc:request(get, {URL, []}, [], []) of
case httpc:request(get, {URL, []}, [{timeout, 5000}, {ssl, [{verify, verify_none}]}], []) of
{ok, {{_, 200, _}, _, _}} -> ok;
_ ->
timer:sleep(1000),