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
+8 -5
View File
@@ -43,7 +43,9 @@ test_create_single_event(Token, CalId) ->
%% @doc GET /v1/calendars/:calendar_id/events?from=...&to=... список с фильтром.
test_list_events_with_dates(Token, CalId) ->
ct:pal(" TEST: List events with date range"),
Path = <<"/v1/calendars/", CalId/binary, "/events?from=2026-05-01T00:00:00Z&to=2026-07-01T00:00:00Z">>,
{From, To} = api_test_runner:future_month_range_iso8601(),
Path = <<"/v1/calendars/", CalId/binary, "/events?from=", From/binary,
"&to=", To/binary>>,
Events = api_test_runner:client_get(Path, Token),
?assert(is_list(Events)),
?assert(length(Events) >= 1),
@@ -58,7 +60,7 @@ test_create_recurring_event(Token, CalId) ->
Path = <<"/v1/calendars/", CalId/binary, "/events">>,
Body = jsx:encode(#{
title => <<"Weekly Meeting">>,
start_time => api_test_runner:future_date_iso8601(),
start_time => api_test_runner:next_month_start_iso8601(),
duration => 60,
recurrence => #{
freq => <<"WEEKLY">>,
@@ -70,11 +72,12 @@ test_create_recurring_event(Token, CalId) ->
#{<<"id">> := RecurringId} = jsx:decode(list_to_binary(RespBody), [return_maps]),
ct:pal(" Created recurring event ~s", [RecurringId]),
% Запрашиваем вхождения на месяц
OccPath = <<"/v1/events/", RecurringId/binary, "/occurrences?from=2026-06-01T00:00:00Z&to=2026-06-30T00:00:00Z">>,
{From, To} = api_test_runner:next_month_range_iso8601(),
OccPath = <<"/v1/events/", RecurringId/binary, "/occurrences?from=", From/binary,
"&to=", To/binary>>,
Occs = api_test_runner:client_get(OccPath, Token),
?assert(is_list(Occs)),
?assert(length(Occs) >= 4), % минимум 4 недели в июне
?assert(length(Occs) >= 4), % минимум 4 недели в полном месяце
FirstOcc = hd(Occs),
?assert(maps:is_key(<<"start_time">>, FirstOcc)),
ct:pal(" OK: ~p occurrences found", [length(Occs)]).