test: unique ticket messages per run to avoid IFT dedupe collisions
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
get_support_token/0,
|
||||
get_user_token/0,
|
||||
unique_email/1,
|
||||
unique_ticket_message/1,
|
||||
future_date/0,
|
||||
register_and_login/2,
|
||||
create_calendar/2,
|
||||
@@ -335,6 +336,13 @@ unique_email(Prefix) ->
|
||||
Unique = integer_to_binary(erlang:system_time()),
|
||||
<<Prefix/binary, "_", Unique/binary, "@test.local">>.
|
||||
|
||||
%% Уникальное сообщение тикета на прогон (IFT: иначе дедуп по error_hash
|
||||
%% возвращает чужой reporter_id и list/get своих тикетов падает).
|
||||
-spec unique_ticket_message(binary()) -> binary().
|
||||
unique_ticket_message(Prefix) ->
|
||||
Unique = integer_to_binary(erlang:unique_integer([positive, monotonic])),
|
||||
<<Prefix/binary, " ", Unique/binary>>.
|
||||
|
||||
-spec future_date() -> calendar:datetime().
|
||||
future_date() ->
|
||||
Seconds = calendar:datetime_to_gregorian_seconds(calendar:universal_time()) + 86400,
|
||||
|
||||
Reference in New Issue
Block a user