Propagate testing platform updates to 0.40 #314

Merged
abereziny merged 3 commits from abereziny/frostfs-testlib:feature-marks-for-platform into support/v0.40 2024-11-20 15:44:00 +00:00
Showing only changes of commit 59a0a7f883 - Show all commits

View file

@ -1,3 +1,4 @@
import itertools
import random
import re
import string
@ -7,6 +8,8 @@ ONLY_ASCII_LETTERS = string.ascii_letters
DIGITS_AND_ASCII_LETTERS = string.ascii_letters + string.digits
NON_DIGITS_AND_LETTERS = string.punctuation
FUSE = itertools.cycle(range(5))
def unique_name(prefix: str = "", postfix: str = ""):
"""
@ -18,7 +21,7 @@ def unique_name(prefix: str = "", postfix: str = ""):
Returns:
unique name string
"""
return f"{prefix}{hex(int(datetime.now().timestamp() * 1000000))}{postfix}"
return f"{prefix}{hex(int(datetime.now().timestamp() * 1000000))}{next(FUSE)}{postfix}"
def random_string(length: int = 5, source: str = ONLY_ASCII_LETTERS):