diff --git a/robot/resources/lib/python/utility_keywords.py b/robot/resources/lib/python/utility_keywords.py index 1602e1a7..e6a3ccc0 100644 --- a/robot/resources/lib/python/utility_keywords.py +++ b/robot/resources/lib/python/utility_keywords.py @@ -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)) diff --git a/robot/testsuites/integration/services/s3_gate_bucket.robot b/robot/testsuites/integration/services/s3_gate_bucket.robot index 78bb753d..030fd6cd 100644 --- a/robot/testsuites/integration/services/s3_gate_bucket.robot +++ b/robot/testsuites/integration/services/s3_gate_bucket.robot @@ -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} diff --git a/robot/variables/common.py b/robot/variables/common.py index d350d587..3f079e5f 100644 --- a/robot/variables/common.py +++ b/robot/variables/common.py @@ -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")