CI/CD: ci, deploy-ift и deploy-stage через EventHubDevOps; фиксы calendar view, archive, API-тесты, traefik-coraza
Deploy IFT (core) / deploy-ift-core (push) Failing after 22m58s
CI / test (push) Failing after 22m59s

This commit is contained in:
2026-07-08 14:50:59 +03:00
parent 4cb6056917
commit f4746df4a2
15 changed files with 247 additions and 53 deletions
+32 -3
View File
@@ -41,7 +41,8 @@
client_delete/2,
admin_patch/3]).
-export([verify_user/2]).
-export([future_date_iso8601/0]).
-export([future_date_iso8601/0, iso8601_utc/1, future_month_range_iso8601/0,
next_month_start_iso8601/0, next_month_range_iso8601/0]).
%%%===================================================================
%%% Конфигурация окружения (CT_MODE, ...)
@@ -283,11 +284,39 @@ future_date() ->
-spec future_date_iso8601() -> binary().
future_date_iso8601() ->
Seconds = calendar:datetime_to_gregorian_seconds(calendar:universal_time()) + 86400,
{{Y,M,D},{H,Min,S}} = calendar:gregorian_seconds_to_datetime(Seconds),
iso8601_utc(future_date()).
-spec iso8601_utc(calendar:datetime()) -> binary().
iso8601_utc({{Y, M, D}, {H, Min, S}}) ->
iolist_to_binary(io_lib:format("~4..0B-~2..0B-~2..0BT~2..0B:~2..0B:~2..0BZ",
[Y, M, D, H, Min, S])).
-spec future_month_range_iso8601() -> {binary(), binary()}.
future_month_range_iso8601() ->
{{Y, M, _D}, _} = future_date(),
month_range_iso8601(Y, M).
-spec next_month_start_iso8601() -> binary().
next_month_start_iso8601() ->
{{Y, M, _}, _} = future_date(),
{NY, NM} = next_month(Y, M),
iso8601_utc({{NY, NM, 1}, {10, 0, 0}}).
-spec next_month_range_iso8601() -> {binary(), binary()}.
next_month_range_iso8601() ->
{{Y, M, _}, _} = future_date(),
{NY, NM} = next_month(Y, M),
month_range_iso8601(NY, NM).
month_range_iso8601(Y, M) ->
From = iso8601_utc({{Y, M, 1}, {0, 0, 0}}),
LastDay = calendar:last_day_of_the_month(Y, M),
To = iso8601_utc({{Y, M, LastDay}, {23, 59, 59}}),
{From, To}.
next_month(Y, 12) -> {Y + 1, 1};
next_month(Y, M) -> {Y, M + 1}.
-spec register_and_login(binary(), binary()) -> binary().
register_and_login(Email, Password) ->
% 1. Регистрируем пользователя