forked from TrueCloudLab/frostfs-testcases
[#218] Object Size defined in int
Signed-off-by: Elizaveta Chichindaeva <elizaveta@nspcc.ru>
This commit is contained in:
parent
0799e15526
commit
6de6af81c7
3 changed files with 6 additions and 6 deletions
|
@ -16,16 +16,15 @@ from robot.libraries.BuiltIn import BuiltIn
|
|||
ROBOT_AUTO_KEYWORDS = False
|
||||
|
||||
@keyword('Generate file')
|
||||
def generate_file_and_file_hash(size: str) -> str:
|
||||
def generate_file_and_file_hash(size: int) -> str:
|
||||
"""
|
||||
Function generates a big binary file with the specified size in bytes and its hash.
|
||||
Args:
|
||||
size (str): the size in bytes, can be declared as 6e+6 for example
|
||||
size (int): the size in bytes, can be declared as 6e+6 for example
|
||||
Returns:
|
||||
(str): the path to the generated file
|
||||
(str): the hash of the generated file
|
||||
"""
|
||||
size = int(float(size))
|
||||
filename = f"{os.getcwd()}/{ASSETS_DIR}/{str(uuid.uuid4())}"
|
||||
with open(filename, 'wb') as fout:
|
||||
fout.write(os.urandom(size))
|
||||
|
|
|
@ -5,6 +5,7 @@ Library Collections
|
|||
Library OperatingSystem
|
||||
|
||||
Library neofs.py
|
||||
Library container.py
|
||||
Library s3_gate.py
|
||||
Library contract_keywords.py
|
||||
Library utility_keywords.py
|
||||
|
@ -33,7 +34,7 @@ Buckets in NeoFS S3 Gateway
|
|||
... ${SEC_ACCESS_KEY}
|
||||
... ${OWNER_PRIV_KEY} = Init S3 Credentials ${WALLET}
|
||||
|
||||
${CONTEINERS_LIST} = Container List ${WIF}
|
||||
@{CONTEINERS_LIST} = List Containers ${WALLET}
|
||||
List Should Contain Value ${CONTEINERS_LIST} ${CID}
|
||||
|
||||
${S3_CLIENT} = Config S3 client ${ACCESS_KEY_ID} ${SEC_ACCESS_KEY}
|
||||
|
|
|
@ -11,8 +11,8 @@ CONTAINER_WAIT_INTERVAL = "1m"
|
|||
NEOFS_EPOCH_TIMEOUT = (os.getenv("NEOFS_EPOCH_TIMEOUT") if os.getenv("NEOFS_EPOCH_TIMEOUT")
|
||||
else os.getenv("NEOFS_IR_TIMERS_EPOCH", "300s"))
|
||||
|
||||
SIMPLE_OBJ_SIZE = "1000"
|
||||
COMPLEX_OBJ_SIZE = "2000"
|
||||
SIMPLE_OBJ_SIZE = 1000
|
||||
COMPLEX_OBJ_SIZE = 2000
|
||||
|
||||
MAINNET_BLOCK_TIME = os.getenv('MAINNET_BLOCK_TIME', "1s")
|
||||
MAINNET_TIMEOUT = os.getenv('MAINNET_TIMEOUT', "1min")
|
||||
|
|
Loading…
Reference in a new issue