From 4ac2f11300af59a86241b8eabb0eee3ba0d0b1a4 Mon Sep 17 00:00:00 2001 From: anatoly-bogatyrev <45566606+anatoly-bogatyrev@users.noreply.github.com> Date: Fri, 2 Apr 2021 17:29:41 +0300 Subject: [PATCH] Update to work with the latest NeoFS build and ACL cases decomposition (#45) * Update to work with the latest NeoFS build * ACL cases decomposition * Sleep has been added to correct work with ACL cache --- robot/resources/lib/neofs.py | 107 ++++---- robot/resources/lib/neofs_int_vars.py | 7 +- .../acl/acl_basic_private_container.robot | 49 +--- ...basic_private_container_storagegroup.robot | 87 +++++++ .../acl/acl_basic_public_container.robot | 97 +++---- ..._basic_public_container_storagegroup.robot | 54 ++++ .../acl/acl_basic_readonly_container.robot | 22 +- ...asic_readonly_container_storagegroup.robot | 73 ++++++ .../integration/acl/acl_bearer_allow.robot | 34 +-- .../acl/acl_bearer_allow_storagegroup.robot | 85 ++++++ .../integration/acl/acl_bearer_compound.robot | 13 +- .../acl/acl_bearer_filter_oid_equal.robot | 7 +- .../acl/acl_bearer_filter_oid_not_equal.robot | 7 +- .../acl_bearer_filter_userheader_equal.robot | 6 +- ...l_bearer_filter_userheader_not_equal.robot | 6 +- .../acl/acl_bearer_inaccessible.robot | 4 +- ...l_bearer_request_filter_xheader_deny.robot | 4 +- ..._bearer_request_filter_xheader_equal.robot | 7 +- ...rer_request_filter_xheader_not_equal.robot | 7 +- .../acl/acl_extended_actions.robot | 243 ------------------ .../acl/acl_extended_actions_other.robot | 37 +++ .../acl/acl_extended_actions_pubkey.robot | 80 ++++++ .../acl/acl_extended_actions_system.robot | 138 ++++++++++ .../acl/acl_extended_actions_user.robot | 37 +++ .../acl/acl_extended_compound.robot | 13 +- .../acl/acl_extended_filters.robot | 35 ++- .../acl/common_steps_acl_basic.robot | 8 +- .../acl/common_steps_acl_bearer.robot | 6 +- .../acl/common_steps_acl_extended.robot | 70 ++++- .../integration/network/netmap_simple.robot | 4 +- .../integration/network/replication.robot | 15 +- .../integration/object/object_complex.robot | 6 +- .../integration/object/object_simple.robot | 6 +- .../object/object_storagegroup_complex.robot | 27 +- .../object/object_storagegroup_simple.robot | 27 +- .../integration/payment/withdraw.robot | 15 +- .../integration/services/http_gate.robot | 6 +- .../integration/services/s3_gate.robot | 4 +- .../testsuites/smoke/selectelcdn_smoke.robot | 7 +- robot/variables/common.py | 15 +- wallets/wallet.json | 31 +-- 41 files changed, 941 insertions(+), 565 deletions(-) create mode 100644 robot/testsuites/integration/acl/acl_basic_private_container_storagegroup.robot create mode 100644 robot/testsuites/integration/acl/acl_basic_public_container_storagegroup.robot create mode 100644 robot/testsuites/integration/acl/acl_basic_readonly_container_storagegroup.robot create mode 100644 robot/testsuites/integration/acl/acl_bearer_allow_storagegroup.robot delete mode 100644 robot/testsuites/integration/acl/acl_extended_actions.robot create mode 100644 robot/testsuites/integration/acl/acl_extended_actions_other.robot create mode 100644 robot/testsuites/integration/acl/acl_extended_actions_pubkey.robot create mode 100644 robot/testsuites/integration/acl/acl_extended_actions_system.robot create mode 100644 robot/testsuites/integration/acl/acl_extended_actions_user.robot diff --git a/robot/resources/lib/neofs.py b/robot/resources/lib/neofs.py index c91b8478..c626fb75 100644 --- a/robot/resources/lib/neofs.py +++ b/robot/resources/lib/neofs.py @@ -185,9 +185,11 @@ def get_eacl(private_key: str, cid: str): @keyword('Set eACL') def set_eacl(private_key: str, cid: str, eacl: str, add_keys: str = ""): + file_path = TEMP_DIR + eacl + Cmd = ( f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --key {private_key} ' - f'container set-eacl --cid {cid} --table {eacl} {add_keys}' + f'container set-eacl --cid {cid} --table {file_path} {add_keys}' ) logger.info("Cmd: %s" % Cmd) complProc = subprocess.run(Cmd, check=True, universal_newlines=True, @@ -255,7 +257,7 @@ def form_bearertoken_file(private_key: str, cid: str, file_name: str, eacl_oper_ @keyword('Form eACL json common file') def form_eacl_json_common_file(file_name, eacl_oper_list ): # Input role can be Role (USER, SYSTEM, OTHERS) or public key. - + file_path = TEMP_DIR + file_name eacl = {"records":[]} logger.info(eacl_oper_list) @@ -276,7 +278,7 @@ def form_eacl_json_common_file(file_name, eacl_oper_list ): logger.info(eacl) - with open(file_name, 'w', encoding='utf-8') as f: + with open(file_path, 'w', encoding='utf-8') as f: json.dump(eacl, f, ensure_ascii=False, indent=4) return file_name @@ -385,13 +387,13 @@ def search_object(private_key: str, cid: str, keys: str, bearer: str, filters: s filter_item = re.sub(r'=', ' EQ ', filter_item) filters_result += f"--filters '{filter_item}' " - ObjectCmd = ( + object_cmd = ( f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --key {private_key} ' f'object search {keys} --cid {cid} {bearer_token} {filters_result} {options}' ) - logger.info("Cmd: %s" % ObjectCmd) + logger.info("Cmd: %s" % object_cmd) try: - complProc = subprocess.run(ObjectCmd, check=True, universal_newlines=True, + complProc = subprocess.run(object_cmd, check=True, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=15, shell=True) logger.info("Output: %s" % complProc.stdout) @@ -594,14 +596,14 @@ def get_container_logs(testcase_name: str): @keyword('Verify Head Tombstone') def verify_head_tombstone(private_key: str, cid: str, oid_ts: str, oid: str, addr: str): - ObjectCmd = ( + object_cmd = ( f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --key {private_key} ' f'object head --cid {cid} --oid {oid_ts} --json' ) - logger.info("Cmd: %s" % ObjectCmd) + logger.info("Cmd: %s" % object_cmd) try: - complProc = subprocess.run(ObjectCmd, check=True, universal_newlines=True, + complProc = subprocess.run(object_cmd, check=True, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=15, shell=True) full_headers = json.loads(complProc.stdout) logger.info("Output: %s" % full_headers) @@ -658,13 +660,13 @@ def head_object(private_key: str, cid: str, oid: str, bearer_token: str="", if endpoint == "": endpoint = NEOFS_ENDPOINT - ObjectCmd = ( + object_cmd = ( f'{NEOFS_CLI_EXEC} --rpc-endpoint {endpoint} --key {private_key} object ' f'head --cid {cid} --oid {oid} {bearer_token} {options}' ) - logger.info("Cmd: %s" % ObjectCmd) + logger.info("Cmd: %s" % object_cmd) try: - complProc = subprocess.run(ObjectCmd, check=True, universal_newlines=True, + complProc = subprocess.run(object_cmd, check=True, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=15, shell=True) logger.info("Output: %s" % complProc.stdout) @@ -796,13 +798,13 @@ def delete_object(private_key: str, cid: str, oid: str, bearer: str, options: st if bearer: bearer_token = f"--bearer {TEMP_DIR}{bearer}" - ObjectCmd = ( + object_cmd = ( f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --key {private_key} ' f'object delete --cid {cid} --oid {oid} {bearer_token} {options}' ) - logger.info("Cmd: %s" % ObjectCmd) + logger.info("Cmd: %s" % object_cmd) try: - complProc = subprocess.run(ObjectCmd, check=True, universal_newlines=True, + complProc = subprocess.run(object_cmd, check=True, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=30, shell=True) logger.info("Output: %s" % complProc.stdout) tombstone = _parse_oid(complProc.stdout) @@ -852,13 +854,13 @@ def put_object(private_key: str, path: str, cid: str, bearer: str, user_headers: if bearer: bearer = f"--bearer {TEMP_DIR}{bearer}" - putObjectCmd = ( + putobject_cmd = ( f'{NEOFS_CLI_EXEC} --rpc-endpoint {endpoint} --key {private_key} object ' f'put --file {path} --cid {cid} {bearer} {user_headers} {options}' ) - logger.info("Cmd: %s" % putObjectCmd) + logger.info("Cmd: %s" % putobject_cmd) try: - complProc = subprocess.run(putObjectCmd, check=True, universal_newlines=True, + complProc = subprocess.run(putobject_cmd, check=True, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=120, shell=True) logger.info("Output: %s" % complProc.stdout) oid = _parse_oid(complProc.stdout) @@ -935,14 +937,14 @@ def get_range_hash(private_key: str, cid: str, oid: str, bearer_token: str, if bearer_token: bearer_token = f"--bearer {TEMP_DIR}{bearer_token}" - ObjectCmd = ( + object_cmd = ( f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --key {private_key} ' f'object hash --cid {cid} --oid {oid} --range {range_cut} ' f'{bearer_token} {options}' ) - logger.info("Cmd: %s" % ObjectCmd) + logger.info("Cmd: %s" % object_cmd) try: - complProc = subprocess.run(ObjectCmd, check=True, universal_newlines=True, + complProc = subprocess.run(object_cmd, check=True, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=60, shell=True) logger.info("Output: %s" % complProc.stdout) except subprocess.CalledProcessError as e: @@ -962,14 +964,14 @@ def get_object(private_key: str, cid: str, oid: str, bearer_token: str, if bearer_token: bearer_token = f"--bearer {TEMP_DIR}{bearer_token}" - ObjectCmd = ( + object_cmd = ( f'{NEOFS_CLI_EXEC} --rpc-endpoint {endpoint} --key {private_key} ' f'object get --cid {cid} --oid {oid} --file {file_path} {bearer_token} ' f'{options}' ) - logger.info("Cmd: %s" % ObjectCmd) + logger.info("Cmd: %s" % object_cmd) try: - complProc = subprocess.run(ObjectCmd, check=True, universal_newlines=True, + complProc = subprocess.run(object_cmd, check=True, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=120, shell=True) logger.info("Output: %s" % complProc.stdout) except subprocess.CalledProcessError as e: @@ -979,17 +981,20 @@ def get_object(private_key: str, cid: str, oid: str, bearer_token: str, @keyword('Put Storagegroup') -def put_storagegroup(private_key: str, cid: str, options: str="", *oid_list): +def put_storagegroup(private_key: str, cid: str, bearer_token: str="", *oid_list): cmd_oid_line = ",".join(oid_list) - ObjectCmd = ( + if bearer_token: + bearer_token = f"--bearer {TEMP_DIR}{bearer_token}" + + object_cmd = ( f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --key {private_key} storagegroup ' - f'put --cid {cid} --members {cmd_oid_line} {options}' + f'put --cid {cid} --members {cmd_oid_line} {bearer_token}' ) - logger.info(f"Cmd: {ObjectCmd}") + logger.info(f"Cmd: {object_cmd}") try: - complProc = subprocess.run(ObjectCmd, check=True, universal_newlines=True, + complProc = subprocess.run(object_cmd, check=True, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=60, shell=True) logger.info(f"Output: {complProc.stdout}" ) @@ -1000,13 +1005,19 @@ def put_storagegroup(private_key: str, cid: str, options: str="", *oid_list): @keyword('List Storagegroup') -def list_storagegroup(private_key: str, cid: str, *expected_list): +def list_storagegroup(private_key: str, cid: str, bearer_token: str="", *expected_list): - ObjectCmd = f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --key {private_key} storagegroup list --cid {cid}' + if bearer_token: + bearer_token = f"--bearer {TEMP_DIR}{bearer_token}" - logger.info(f"Cmd: {ObjectCmd}") + object_cmd = ( + f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --key {private_key} ' + f'storagegroup list --cid {cid} {bearer_token}' + ) + + logger.info(f"Cmd: {object_cmd}") try: - complProc = subprocess.run(ObjectCmd, check=True, universal_newlines=True, + complProc = subprocess.run(object_cmd, check=True, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=15, shell=True) logger.info(f"Output: {complProc.stdout}") @@ -1025,12 +1036,15 @@ def list_storagegroup(private_key: str, cid: str, *expected_list): @keyword('Get Storagegroup') -def get_storagegroup(private_key: str, cid: str, oid: str, expected_size, *expected_objects_list): +def get_storagegroup(private_key: str, cid: str, oid: str, bearer_token: str, expected_size, *expected_objects_list): - ObjectCmd = f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --key {private_key} storagegroup get --cid {cid} --id {oid}' - logger.info(f"Cmd: {ObjectCmd}") + if bearer_token: + bearer_token = f"--bearer {TEMP_DIR}{bearer_token}" + + object_cmd = f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --key {private_key} storagegroup get --cid {cid} --id {oid} {bearer_token}' + logger.info(f"Cmd: {object_cmd}") try: - complProc = subprocess.run(ObjectCmd, check=True, universal_newlines=True, + complProc = subprocess.run(object_cmd, check=True, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=60, shell=True) logger.info(f"Output: {complProc.stdout}") @@ -1054,15 +1068,18 @@ def get_storagegroup(private_key: str, cid: str, oid: str, expected_size, *expec @keyword('Delete Storagegroup') -def delete_storagegroup(private_key: str, cid: str, oid: str): +def delete_storagegroup(private_key: str, cid: str, oid: str, bearer_token: str=""): - ObjectCmd = ( + if bearer_token: + bearer_token = f"--bearer {TEMP_DIR}{bearer_token}" + + object_cmd = ( f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --key {private_key} storagegroup ' - f'delete --cid {cid} --id {oid}' + f'delete --cid {cid} --id {oid} {bearer_token}' ) - logger.info(f"Cmd: {ObjectCmd}") + logger.info(f"Cmd: {object_cmd}") try: - complProc = subprocess.run(ObjectCmd, check=True, universal_newlines=True, + complProc = subprocess.run(object_cmd, check=True, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=60, shell=True) logger.info(f"Output: {complProc.stdout}") @@ -1080,13 +1097,13 @@ def delete_storagegroup(private_key: str, cid: str, oid: str): def _exec_cli_cmd(private_key: bytes, postfix: str): # Get linked objects from first - ObjectCmd = ( + object_cmd = ( f'{NEOFS_CLI_EXEC} --raw --host {NEOFS_ENDPOINT} ' f'--key {binascii.hexlify(private_key).decode()} {postfix}' ) - logger.info("Cmd: %s" % ObjectCmd) + logger.info("Cmd: %s" % object_cmd) try: - complProc = subprocess.run(ObjectCmd, check=True, universal_newlines=True, + complProc = subprocess.run(object_cmd, check=True, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=15, shell=True) logger.info("Output: %s" % complProc.stdout) except subprocess.CalledProcessError as e: diff --git a/robot/resources/lib/neofs_int_vars.py b/robot/resources/lib/neofs_int_vars.py index c4236337..ba2d45ea 100644 --- a/robot/resources/lib/neofs_int_vars.py +++ b/robot/resources/lib/neofs_int_vars.py @@ -9,6 +9,7 @@ HTTP_GATE = 'http://http.neofs.devenv' S3_GATE = 'https://s3.neofs.devenv:8080' NEOFS_NETMAP = ['s01.neofs.devenv:8080', 's02.neofs.devenv:8080','s03.neofs.devenv:8080','s04.neofs.devenv:8080'] -GAS_HASH = '0x70e2301955bf1e74cbb31d18c2f96972abadb328' -NEOFS_CONTRACT = "005a4906ec233a3b677dad9fd7033ad8653f579d" -TEMP_DIR = "TemporaryDir/" \ No newline at end of file +GAS_HASH = '0xd2a4cff31913016155e38e474a2c06d08be276cf' +NEOFS_CONTRACT = "1e6d8b8e1a7c976649dc630062d8b281cb9c2615" +DEF_WALLET_ADDR = "NVUzCUvrbuWadAm6xBoyZ2U7nCmS9QBZtb" +TEMP_DIR = "TemporaryDir/" diff --git a/robot/testsuites/integration/acl/acl_basic_private_container.robot b/robot/testsuites/integration/acl/acl_basic_private_container.robot index 801fb04e..8dfed9f5 100644 --- a/robot/testsuites/integration/acl/acl_basic_private_container.robot +++ b/robot/testsuites/integration/acl/acl_basic_private_container.robot @@ -15,12 +15,12 @@ Basic ACL Operations for Private Container Generate Keys Create Containers - Generate file 1024 - Check Private Container Simple + Generate file ${SIMPLE_OBJ_SIZE} + Check Private Container Create Containers - Generate file 70e+6 - Check Private Container Complex + Generate file ${COMPLEX_OBJ_SIZE} + Check Private Container [Teardown] Cleanup @@ -30,7 +30,6 @@ Basic ACL Operations for Private Container *** Keywords *** Check Private Container - [Arguments] ${RUN_TYPE} # Put ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${PRIV_CID} ${EMPTY} ${EMPTY} @@ -40,46 +39,6 @@ Check Private Container ... Put object ${SYSTEM_KEY_IR} ${FILE_S} ${PRIV_CID} ${EMPTY} ${EMPTY} ${S_OID_SYS_SN} = Put object ${SYSTEM_KEY_SN} ${FILE_S} ${PRIV_CID} ${EMPTY} ${EMPTY} - # Storage group Operations (Put, List, Get, Delete) - ${SG_OID_INV} = Put Storagegroup ${USER_KEY} ${PRIV_CID} ${EMPTY} ${S_OID_USER} - ${SG_OID_1} = Put Storagegroup ${USER_KEY} ${PRIV_CID} ${EMPTY} ${S_OID_USER} - List Storagegroup ${USER_KEY} ${PRIV_CID} ${SG_OID_1} ${SG_OID_INV} - @{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${USER_KEY} ${PRIV_CID} ${S_OID_USER} - ... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER} - Get Storagegroup ${USER_KEY} ${PRIV_CID} ${SG_OID_1} ${EMPTY} @{EXPECTED_OIDS} - Delete Storagegroup ${USER_KEY} ${PRIV_CID} ${SG_OID_1} - - - ${SG_OID_1} = Put Storagegroup ${SYSTEM_KEY_SN} ${PRIV_CID} ${EMPTY} ${S_OID_USER} - List Storagegroup ${SYSTEM_KEY_SN} ${PRIV_CID} ${SG_OID_1} ${SG_OID_INV} - @{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${SYSTEM_KEY_SN} ${PRIV_CID} ${S_OID_USER} - ... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER} - Get Storagegroup ${SYSTEM_KEY_SN} ${PRIV_CID} ${SG_OID_1} ${EMPTY} @{EXPECTED_OIDS} - Run Keyword And Expect Error * - ... Delete Storagegroup ${SYSTEM_KEY_SN} ${PRIV_CID} ${SG_OID_1} - - Run Keyword And Expect Error * - ... Put Storagegroup ${OTHER_KEY} ${PRIV_CID} ${EMPTY} ${S_OID_USER} - Run Keyword And Expect Error * - ... List Storagegroup ${OTHER_KEY} ${PRIV_CID} ${SG_OID_INV} - Run Keyword And Expect Error * - ... Get Storagegroup ${OTHER_KEY} ${PRIV_CID} ${SG_OID_INV} ${EMPTY} ${S_OID_USER} - Run Keyword And Expect Error * - ... Delete Storagegroup ${OTHER_KEY} ${PRIV_CID} ${SG_OID_INV} - - Run Keyword And Expect Error * - ... Put Storagegroup ${SYSTEM_KEY_IR} ${PRIV_CID} ${EMPTY} ${S_OID_USER} - Run Keyword And Expect Error * - ... List Storagegroup ${SYSTEM_KEY_IR} ${PRIV_CID} ${SG_OID_INV} - - @{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${USER_KEY} ${PRIV_CID} ${S_OID_USER} - ... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER} - Get Storagegroup ${SYSTEM_KEY_IR} ${PRIV_CID} ${SG_OID_INV} ${EMPTY} @{EXPECTED_OIDS} - - Run Keyword And Expect Error * - ... Delete Storagegroup ${SYSTEM_KEY_IR} ${PRIV_CID} ${SG_OID_INV} - - # Get Get object ${USER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} s_file_read Run Keyword And Expect Error * diff --git a/robot/testsuites/integration/acl/acl_basic_private_container_storagegroup.robot b/robot/testsuites/integration/acl/acl_basic_private_container_storagegroup.robot new file mode 100644 index 00000000..6d1ba70c --- /dev/null +++ b/robot/testsuites/integration/acl/acl_basic_private_container_storagegroup.robot @@ -0,0 +1,87 @@ +*** Settings *** +Variables ../../../variables/common.py +Library Collections +Library ../${RESOURCES}/neofs.py +Library ../${RESOURCES}/payment_neogo.py + +Resource common_steps_acl_basic.robot + + +*** Test cases *** +Basic ACL Operations for Private Container + [Documentation] Testcase to validate NeoFS operations with ACL for Private Container. + [Tags] ACL NeoFS NeoCLI + [Timeout] 20 min + + Generate Keys + + Create Containers + Generate file ${SIMPLE_OBJ_SIZE} + Check Private Container Simple + + Create Containers + Generate file ${COMPLEX_OBJ_SIZE} + Check Private Container Complex + + [Teardown] Cleanup + + +*** Keywords *** + +Check Private Container + [Arguments] ${RUN_TYPE} + + # Put target object to use in storage groups + ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${PRIV_CID} ${EMPTY} ${EMPTY} + + + # Storage group Operations (Put, List, Get, Delete) with different Keys + # User group key + ${SG_OID_INV} = Put Storagegroup ${USER_KEY} ${PRIV_CID} ${EMPTY} ${S_OID_USER} + ${SG_OID_1} = Put Storagegroup ${USER_KEY} ${PRIV_CID} ${EMPTY} ${S_OID_USER} + List Storagegroup ${USER_KEY} ${PRIV_CID} ${EMPTY} ${SG_OID_1} ${SG_OID_INV} + @{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${USER_KEY} ${PRIV_CID} ${S_OID_USER} + ... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER} + Get Storagegroup ${USER_KEY} ${PRIV_CID} ${SG_OID_1} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS} + Delete Storagegroup ${USER_KEY} ${PRIV_CID} ${SG_OID_1} ${EMPTY} + + + # "Others" group key + Run Keyword And Expect Error * + ... Put Storagegroup ${OTHER_KEY} ${PRIV_CID} ${EMPTY} ${S_OID_USER} + Run Keyword And Expect Error * + ... List Storagegroup ${OTHER_KEY} ${PRIV_CID} ${EMPTY} ${SG_OID_INV} + Run Keyword And Expect Error * + ... Get Storagegroup ${OTHER_KEY} ${PRIV_CID} ${SG_OID_INV} ${EMPTY} ${EMPTY} ${S_OID_USER} + Run Keyword And Expect Error * + ... Delete Storagegroup ${OTHER_KEY} ${PRIV_CID} ${SG_OID_INV} ${EMPTY} + + + # System group key (storage node) + ${SG_OID_1} = Put Storagegroup ${SYSTEM_KEY_SN} ${PRIV_CID} ${EMPTY} ${S_OID_USER} + List Storagegroup ${SYSTEM_KEY_SN} ${PRIV_CID} ${EMPTY} ${SG_OID_1} ${SG_OID_INV} + @{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${SYSTEM_KEY_SN} ${PRIV_CID} ${S_OID_USER} + ... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER} + Get Storagegroup ${SYSTEM_KEY_SN} ${PRIV_CID} ${SG_OID_1} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS} + Run Keyword And Expect Error * + ... Delete Storagegroup ${SYSTEM_KEY_SN} ${PRIV_CID} ${SG_OID_1} ${EMPTY} + + + # System group key (Inner ring node) + Run Keyword And Expect Error * + ... Put Storagegroup ${SYSTEM_KEY_IR} ${PRIV_CID} ${EMPTY} ${S_OID_USER} + Run Keyword And Expect Error * + ... List Storagegroup ${SYSTEM_KEY_IR} ${PRIV_CID} ${EMPTY} ${SG_OID_INV} + + @{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${USER_KEY} ${PRIV_CID} ${S_OID_USER} + ... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER} + Get Storagegroup ${SYSTEM_KEY_IR} ${PRIV_CID} ${SG_OID_INV} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS} + + Run Keyword And Expect Error * + ... Delete Storagegroup ${SYSTEM_KEY_IR} ${PRIV_CID} ${SG_OID_INV} ${EMPTY} + + + +Cleanup + Cleanup Files + Get Docker Logs acl_basic \ No newline at end of file diff --git a/robot/testsuites/integration/acl/acl_basic_public_container.robot b/robot/testsuites/integration/acl/acl_basic_public_container.robot index f229c726..b502a30f 100644 --- a/robot/testsuites/integration/acl/acl_basic_public_container.robot +++ b/robot/testsuites/integration/acl/acl_basic_public_container.robot @@ -15,12 +15,12 @@ Basic ACL Operations for Public Container Generate Keys Create Containers - Generate file 1024 - Check Public Container Simple + Generate file ${SIMPLE_OBJ_SIZE} + Check Public Container Create Containers - Generate file 70e+6 - Check Public Container Complex + Generate file ${COMPLEX_OBJ_SIZE} + Check Public Container [Teardown] Cleanup @@ -28,78 +28,63 @@ Basic ACL Operations for Public Container *** Keywords *** Check Public Container - [Arguments] ${RUN_TYPE} # Put - ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${PUBLIC_CID} ${EMPTY} ${EMPTY} - ${S_OID_OTHER} = Put object ${OTHER_KEY} ${FILE_S} ${PUBLIC_CID} ${EMPTY} ${EMPTY} - ${S_OID_SYS_IR} = Put object ${SYSTEM_KEY_IR} ${FILE_S} ${PUBLIC_CID} ${EMPTY} ${EMPTY} - ${S_OID_SYS_SN} = Put object ${SYSTEM_KEY_SN} ${FILE_S} ${PUBLIC_CID} ${EMPTY} ${EMPTY} + ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${PUBLIC_CID} ${EMPTY} ${EMPTY} + ${S_OID_OTHER} = Put object ${OTHER_KEY} ${FILE_S} ${PUBLIC_CID} ${EMPTY} ${EMPTY} + ${S_OID_SYS_IR} = Put object ${SYSTEM_KEY_IR} ${FILE_S} ${PUBLIC_CID} ${EMPTY} ${EMPTY} + ${S_OID_SYS_SN} = Put object ${SYSTEM_KEY_SN} ${FILE_S} ${PUBLIC_CID} ${EMPTY} ${EMPTY} # Get - Get object ${USER_KEY} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} s_file_read - Get object ${OTHER_KEY} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} s_file_read - Get object ${SYSTEM_KEY_IR} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} s_file_read - Get object ${SYSTEM_KEY_SN} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} s_file_read + Get object ${USER_KEY} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} s_file_read + Get object ${OTHER_KEY} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} s_file_read + Get object ${SYSTEM_KEY_IR} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} s_file_read + Get object ${SYSTEM_KEY_SN} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} s_file_read # Get Range - Get Range ${USER_KEY} ${PUBLIC_CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 - Get Range ${OTHER_KEY} ${PUBLIC_CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 - Get Range ${SYSTEM_KEY_IR} ${PUBLIC_CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 - Get Range ${SYSTEM_KEY_SN} ${PUBLIC_CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + Get Range ${USER_KEY} ${PUBLIC_CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + Get Range ${OTHER_KEY} ${PUBLIC_CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + Get Range ${SYSTEM_KEY_IR} ${PUBLIC_CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + Get Range ${SYSTEM_KEY_SN} ${PUBLIC_CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 # Get Range Hash - Get Range Hash ${USER_KEY} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} 0:256 - Get Range Hash ${OTHER_KEY} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} 0:256 - Get Range Hash ${SYSTEM_KEY_IR} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} 0:256 - Get Range Hash ${SYSTEM_KEY_SN} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} 0:256 + Get Range Hash ${USER_KEY} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} 0:256 + Get Range Hash ${OTHER_KEY} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} 0:256 + Get Range Hash ${SYSTEM_KEY_IR} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} 0:256 + Get Range Hash ${SYSTEM_KEY_SN} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} 0:256 # Search - @{S_OBJ_PRIV} = Create List ${S_OID_USER} ${S_OID_OTHER} ${S_OID_SYS_SN} ${S_OID_SYS_IR} - Search object ${USER_KEY} ${PUBLIC_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_PRIV} - Search object ${OTHER_KEY} ${PUBLIC_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_PRIV} - Search object ${SYSTEM_KEY_IR} ${PUBLIC_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_PRIV} - Search object ${SYSTEM_KEY_SN} ${PUBLIC_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_PRIV} + @{S_OBJ_PRIV} = Create List ${S_OID_USER} ${S_OID_OTHER} ${S_OID_SYS_SN} ${S_OID_SYS_IR} + Search object ${USER_KEY} ${PUBLIC_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_PRIV} + Search object ${OTHER_KEY} ${PUBLIC_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_PRIV} + Search object ${SYSTEM_KEY_IR} ${PUBLIC_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_PRIV} + Search object ${SYSTEM_KEY_SN} ${PUBLIC_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_PRIV} # Head - Head object ${USER_KEY} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} ${EMPTY} - Head object ${OTHER_KEY} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} ${EMPTY} - Head object ${SYSTEM_KEY_IR} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} ${EMPTY} - Head object ${SYSTEM_KEY_SN} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} ${EMPTY} + Head object ${USER_KEY} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} ${EMPTY} + Head object ${OTHER_KEY} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} ${EMPTY} + Head object ${SYSTEM_KEY_IR} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} ${EMPTY} + Head object ${SYSTEM_KEY_SN} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} ${EMPTY} - Head object ${USER_KEY} ${PUBLIC_CID} ${S_OID_OTHER} ${EMPTY} ${EMPTY} - Head object ${OTHER_KEY} ${PUBLIC_CID} ${S_OID_OTHER} ${EMPTY} ${EMPTY} - Head object ${SYSTEM_KEY_IR} ${PUBLIC_CID} ${S_OID_OTHER} ${EMPTY} ${EMPTY} - Head object ${SYSTEM_KEY_SN} ${PUBLIC_CID} ${S_OID_OTHER} ${EMPTY} ${EMPTY} + Head object ${USER_KEY} ${PUBLIC_CID} ${S_OID_OTHER} ${EMPTY} ${EMPTY} + Head object ${OTHER_KEY} ${PUBLIC_CID} ${S_OID_OTHER} ${EMPTY} ${EMPTY} + Head object ${SYSTEM_KEY_IR} ${PUBLIC_CID} ${S_OID_OTHER} ${EMPTY} ${EMPTY} + Head object ${SYSTEM_KEY_SN} ${PUBLIC_CID} ${S_OID_OTHER} ${EMPTY} ${EMPTY} - Head object ${USER_KEY} ${PUBLIC_CID} ${S_OID_SYS_SN} ${EMPTY} ${EMPTY} - Head object ${OTHER_KEY} ${PUBLIC_CID} ${S_OID_SYS_SN} ${EMPTY} ${EMPTY} - Head object ${SYSTEM_KEY_IR} ${PUBLIC_CID} ${S_OID_SYS_SN} ${EMPTY} ${EMPTY} - Head object ${SYSTEM_KEY_SN} ${PUBLIC_CID} ${S_OID_SYS_SN} ${EMPTY} ${EMPTY} + Head object ${USER_KEY} ${PUBLIC_CID} ${S_OID_SYS_SN} ${EMPTY} ${EMPTY} + Head object ${OTHER_KEY} ${PUBLIC_CID} ${S_OID_SYS_SN} ${EMPTY} ${EMPTY} + Head object ${SYSTEM_KEY_IR} ${PUBLIC_CID} ${S_OID_SYS_SN} ${EMPTY} ${EMPTY} + Head object ${SYSTEM_KEY_SN} ${PUBLIC_CID} ${S_OID_SYS_SN} ${EMPTY} ${EMPTY} # Delete - Delete object ${USER_KEY} ${PUBLIC_CID} ${S_OID_SYS_IR} ${EMPTY} - Delete object ${OTHER_KEY} ${PUBLIC_CID} ${S_OID_SYS_SN} ${EMPTY} - Delete object ${SYSTEM_KEY_IR} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} - Delete object ${SYSTEM_KEY_SN} ${PUBLIC_CID} ${S_OID_OTHER} ${EMPTY} + Delete object ${USER_KEY} ${PUBLIC_CID} ${S_OID_SYS_IR} ${EMPTY} + Delete object ${OTHER_KEY} ${PUBLIC_CID} ${S_OID_SYS_SN} ${EMPTY} + Delete object ${SYSTEM_KEY_IR} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} + Delete object ${SYSTEM_KEY_SN} ${PUBLIC_CID} ${S_OID_OTHER} ${EMPTY} - # Storage group Operations (Put, List, Get, Delete) - Log Storage group Operations for each Role keys - ${S_OID} = Put object ${USER_KEY} ${FILE_S} ${PUBLIC_CID} ${EMPTY} ${EMPTY} - @{Roles_keys} = Create List ${USER_KEY} ${OTHER_KEY} ${SYSTEM_KEY_IR} ${SYSTEM_KEY_SN} - FOR ${role_key} IN @{Roles_keys} - ${SG_OID_1} = Put Storagegroup ${USER_KEY} ${PUBLIC_CID} ${EMPTY} ${S_OID} - List Storagegroup ${USER_KEY} ${PUBLIC_CID} ${SG_OID_1} - @{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${USER_KEY} ${PUBLIC_CID} ${S_OID} - ... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID} - Get Storagegroup ${USER_KEY} ${PUBLIC_CID} ${SG_OID_1} ${EMPTY} @{EXPECTED_OIDS} - Delete Storagegroup ${USER_KEY} ${PUBLIC_CID} ${SG_OID_1} - - END - Cleanup Cleanup Files \ No newline at end of file diff --git a/robot/testsuites/integration/acl/acl_basic_public_container_storagegroup.robot b/robot/testsuites/integration/acl/acl_basic_public_container_storagegroup.robot new file mode 100644 index 00000000..1895c217 --- /dev/null +++ b/robot/testsuites/integration/acl/acl_basic_public_container_storagegroup.robot @@ -0,0 +1,54 @@ +*** Settings *** +Variables ../../../variables/common.py + +Library ../${RESOURCES}/neofs.py +Library ../${RESOURCES}/payment_neogo.py + +Resource common_steps_acl_basic.robot + + +*** Test cases *** +Basic ACL Operations for Public Container + [Documentation] Testcase to validate NeoFS operations with ACL for Public Container. + [Tags] ACL NeoFS NeoCLI + [Timeout] 20 min + + Generate Keys + + Create Containers + Generate file ${SIMPLE_OBJ_SIZE} + Check Public Container Simple + + Create Containers + Generate file ${COMPLEX_OBJ_SIZE} + Check Public Container Complex + + [Teardown] Cleanup + + +*** Keywords *** + +Check Public Container + [Arguments] ${RUN_TYPE} + + # Storage group Operations (Put, List, Get, Delete) + Log Storage group Operations for each Role keys + + # Put target object to use in storage groups + ${S_OID} = Put object ${USER_KEY} ${FILE_S} ${PUBLIC_CID} ${EMPTY} ${EMPTY} + + @{Roles_keys} = Create List ${USER_KEY} ${OTHER_KEY} ${SYSTEM_KEY_IR} ${SYSTEM_KEY_SN} + + FOR ${role_key} IN @{Roles_keys} + ${SG_OID_1} = Put Storagegroup ${role_key} ${PUBLIC_CID} ${EMPTY} ${S_OID} + List Storagegroup ${role_key} ${PUBLIC_CID} ${EMPTY} ${SG_OID_1} + @{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${role_key} ${PUBLIC_CID} ${S_OID} + ... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID} + Get Storagegroup ${role_key} ${PUBLIC_CID} ${SG_OID_1} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS} + Delete Storagegroup ${role_key} ${PUBLIC_CID} ${SG_OID_1} ${EMPTY} + END + + +Cleanup + Cleanup Files + Get Docker Logs acl_basic \ No newline at end of file diff --git a/robot/testsuites/integration/acl/acl_basic_readonly_container.robot b/robot/testsuites/integration/acl/acl_basic_readonly_container.robot index dd98962d..406d04da 100644 --- a/robot/testsuites/integration/acl/acl_basic_readonly_container.robot +++ b/robot/testsuites/integration/acl/acl_basic_readonly_container.robot @@ -15,11 +15,11 @@ Basic ACL Operations for Read-Only Container Generate Keys Create Containers - Generate file 1024 + Generate file ${SIMPLE_OBJ_SIZE} Check Read-Only Container Simple Create Containers - Generate file 70e+6 + Generate file ${COMPLEX_OBJ_SIZE} Check Read-Only Container Complex [Teardown] Cleanup @@ -43,29 +43,29 @@ Check Read-Only Container # Storage group Operations (Put, List, Get, Delete) ${SG_OID_INV} = Put Storagegroup ${USER_KEY} ${READONLY_CID} ${EMPTY} ${S_OID_USER} ${SG_OID_1} = Put Storagegroup ${USER_KEY} ${READONLY_CID} ${EMPTY} ${S_OID_USER} - List Storagegroup ${USER_KEY} ${READONLY_CID} ${SG_OID_1} ${SG_OID_INV} + List Storagegroup ${USER_KEY} ${READONLY_CID} ${EMPTY} ${SG_OID_1} ${SG_OID_INV} @{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${USER_KEY} ${READONLY_CID} ${S_OID_USER} ... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER} - Get Storagegroup ${USER_KEY} ${READONLY_CID} ${SG_OID_1} ${EMPTY} @{EXPECTED_OIDS} - Delete Storagegroup ${USER_KEY} ${READONLY_CID} ${SG_OID_1} + Get Storagegroup ${USER_KEY} ${READONLY_CID} ${SG_OID_1} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS} + Delete Storagegroup ${USER_KEY} ${READONLY_CID} ${SG_OID_1} ${EMPTY} Run Keyword And Expect Error * ... Put Storagegroup ${OTHER_KEY} ${READONLY_CID} ${EMPTY} ${S_OID_USER} - List Storagegroup ${OTHER_KEY} ${READONLY_CID} ${SG_OID_INV} + List Storagegroup ${OTHER_KEY} ${READONLY_CID} ${EMPTY} ${SG_OID_INV} @{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${USER_KEY} ${READONLY_CID} ${S_OID_USER} ... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER} - Get Storagegroup ${OTHER_KEY} ${READONLY_CID} ${SG_OID_INV} ${EMPTY} @{EXPECTED_OIDS} + Get Storagegroup ${OTHER_KEY} ${READONLY_CID} ${SG_OID_INV} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS} Run Keyword And Expect Error * - ... Delete Storagegroup ${OTHER_KEY} ${READONLY_CID} ${SG_OID_INV} + ... Delete Storagegroup ${OTHER_KEY} ${READONLY_CID} ${SG_OID_INV} ${EMPTY} Run Keyword And Expect Error * ... Put Storagegroup ${SYSTEM_KEY_IR} ${READONLY_CID} ${EMPTY} ${S_OID_USER} - List Storagegroup ${SYSTEM_KEY_IR} ${READONLY_CID} ${SG_OID_INV} + List Storagegroup ${SYSTEM_KEY_IR} ${READONLY_CID} ${EMPTY} ${SG_OID_INV} @{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${USER_KEY} ${READONLY_CID} ${S_OID_USER} ... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER} - Get Storagegroup ${SYSTEM_KEY_IR} ${READONLY_CID} ${SG_OID_INV} ${EMPTY} @{EXPECTED_OIDS} + Get Storagegroup ${SYSTEM_KEY_IR} ${READONLY_CID} ${SG_OID_INV} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS} Run Keyword And Expect Error * - ... Delete Storagegroup ${SYSTEM_KEY_IR} ${READONLY_CID} ${SG_OID_INV} + ... Delete Storagegroup ${SYSTEM_KEY_IR} ${READONLY_CID} ${SG_OID_INV} ${EMPTY} # Get Get object ${USER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} s_file_read diff --git a/robot/testsuites/integration/acl/acl_basic_readonly_container_storagegroup.robot b/robot/testsuites/integration/acl/acl_basic_readonly_container_storagegroup.robot new file mode 100644 index 00000000..31156f97 --- /dev/null +++ b/robot/testsuites/integration/acl/acl_basic_readonly_container_storagegroup.robot @@ -0,0 +1,73 @@ +*** Settings *** +Variables ../../../variables/common.py + +Library ../${RESOURCES}/neofs.py +Library ../${RESOURCES}/payment_neogo.py + +Resource common_steps_acl_basic.robot + + +*** Test cases *** +Basic ACL Operations for Read-Only Container + [Documentation] Testcase to validate NeoFS operations with ACL for Read-Only Container. + [Tags] ACL NeoFS NeoCLI + [Timeout] 20 min + + Generate Keys + + Create Containers + Generate file ${SIMPLE_OBJ_SIZE} + Check Read-Only Container Simple + + Create Containers + Generate file ${COMPLEX_OBJ_SIZE} + Check Read-Only Container Complex + + [Teardown] Cleanup + + +*** Keywords *** + + +Check Read-Only Container + [Arguments] ${RUN_TYPE} + + # Put target object to use in storage groups + ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${READONLY_CID} ${EMPTY} ${EMPTY} + + # Storage group Operations (Put, List, Get, Delete) for Read-only container + + ${SG_OID_INV} = Put Storagegroup ${USER_KEY} ${READONLY_CID} ${EMPTY} ${S_OID_USER} + ${SG_OID_1} = Put Storagegroup ${USER_KEY} ${READONLY_CID} ${EMPTY} ${S_OID_USER} + List Storagegroup ${USER_KEY} ${READONLY_CID} ${EMPTY} ${SG_OID_1} ${SG_OID_INV} + @{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${USER_KEY} ${READONLY_CID} ${S_OID_USER} + ... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER} + Get Storagegroup ${USER_KEY} ${READONLY_CID} ${SG_OID_1} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS} + Delete Storagegroup ${USER_KEY} ${READONLY_CID} ${SG_OID_1} ${EMPTY} + + + Run Keyword And Expect Error * + ... Put Storagegroup ${OTHER_KEY} ${READONLY_CID} ${EMPTY} ${S_OID_USER} + List Storagegroup ${OTHER_KEY} ${READONLY_CID} ${EMPTY} ${SG_OID_INV} + @{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${USER_KEY} ${READONLY_CID} ${S_OID_USER} + ... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER} + Get Storagegroup ${OTHER_KEY} ${READONLY_CID} ${SG_OID_INV} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS} + Run Keyword And Expect Error * + ... Delete Storagegroup ${OTHER_KEY} ${READONLY_CID} ${SG_OID_INV} ${EMPTY} + + + Run Keyword And Expect Error * + ... Put Storagegroup ${SYSTEM_KEY_IR} ${READONLY_CID} ${EMPTY} ${S_OID_USER} + List Storagegroup ${SYSTEM_KEY_IR} ${READONLY_CID} ${EMPTY} ${SG_OID_INV} + @{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${USER_KEY} ${READONLY_CID} ${S_OID_USER} + ... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER} + Get Storagegroup ${SYSTEM_KEY_IR} ${READONLY_CID} ${SG_OID_INV} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS} + Run Keyword And Expect Error * + ... Delete Storagegroup ${SYSTEM_KEY_IR} ${READONLY_CID} ${SG_OID_INV} ${EMPTY} + + + + +Cleanup + Cleanup Files + Get Docker Logs acl_basic \ No newline at end of file diff --git a/robot/testsuites/integration/acl/acl_bearer_allow.robot b/robot/testsuites/integration/acl/acl_bearer_allow.robot index 041e7ea4..68e32611 100644 --- a/robot/testsuites/integration/acl/acl_bearer_allow.robot +++ b/robot/testsuites/integration/acl/acl_bearer_allow.robot @@ -17,12 +17,12 @@ BearerToken Operations Prepare eACL Role rules Log Check Bearer token with simple object - Generate file 1024 - Check eACL Deny and Allow All Bearer Simple + Generate file ${SIMPLE_OBJ_SIZE} + Check eACL Deny and Allow All Bearer Log Check Bearer token with complex object - Generate file 70e+6 - Check eACL Deny and Allow All Bearer Complex + Generate file ${COMPLEX_OBJ_SIZE} + Check eACL Deny and Allow All Bearer [Teardown] Cleanup @@ -32,7 +32,7 @@ BearerToken Operations *** Keywords *** Check eACL Deny and Allow All Bearer - [Arguments] ${RUN_TYPE} + ${CID} = Create Container Public ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} @@ -45,17 +45,11 @@ Check eACL Deny and Allow All Bearer Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 Delete object ${USER_KEY} ${CID} ${D_OID_USER} ${EMPTY} - # Storage group Operations (Put, List, Get, Delete) - ${SG_OID_INV} = Put Storagegroup ${USER_KEY} ${CID} ${EMPTY} ${S_OID_USER} - ${SG_OID_1} = Put Storagegroup ${USER_KEY} ${CID} ${EMPTY} ${S_OID_USER} - List Storagegroup ${USER_KEY} ${CID} ${SG_OID_1} ${SG_OID_INV} - @{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${USER_KEY} ${CID} ${S_OID_USER} - ... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER} - Get Storagegroup ${USER_KEY} ${CID} ${SG_OID_1} ${EMPTY} @{EXPECTED_OIDS} - Delete Storagegroup ${USER_KEY} ${CID} ${SG_OID_1} - Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_USER} --await + # The current ACL cache lifetime is 30 sec + Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} + ${rule1}= Create Dictionary Operation=GET Access=ALLOW Role=USER ${rule2}= Create Dictionary Operation=HEAD Access=ALLOW Role=USER ${rule3}= Create Dictionary Operation=PUT Access=ALLOW Role=USER @@ -81,17 +75,7 @@ Check eACL Deny and Allow All Bearer Run Keyword And Expect Error * ... Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} - Run Keyword And Expect Error * - ... Put Storagegroup ${USER_KEY} ${CID} ${EMPTY} ${S_OID_USER} - Run Keyword And Expect Error * - ... List Storagegroup ${USER_KEY} ${CID} ${SG_OID_1} ${SG_OID_INV} - Run Keyword And Expect Error * - ... Get Storagegroup ${USER_KEY} ${CID} ${SG_OID_1} ${EMPTY} @{EXPECTED_OIDS} - Run Keyword And Expect Error * - ... Delete Storagegroup ${USER_KEY} ${CID} ${SG_OID_1} - - # Storagegroup will be added after https://github.com/nspcc-dev/neofs-node/issues/388 - + # All operations on object should be passed with bearer token Put object ${USER_KEY} ${FILE_S} ${CID} bearer_allow_all_user ${FILE_OTH_HEADER} Get object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user local_file_eacl Search object ${USER_KEY} ${CID} ${EMPTY} bearer_allow_all_user ${FILE_USR_HEADER} ${S_OBJ_H} diff --git a/robot/testsuites/integration/acl/acl_bearer_allow_storagegroup.robot b/robot/testsuites/integration/acl/acl_bearer_allow_storagegroup.robot new file mode 100644 index 00000000..8797545f --- /dev/null +++ b/robot/testsuites/integration/acl/acl_bearer_allow_storagegroup.robot @@ -0,0 +1,85 @@ +*** Settings *** +Variables ../../../variables/common.py +Library ../${RESOURCES}/neofs.py +Library ../${RESOURCES}/payment_neogo.py + +Library Collections +Resource common_steps_acl_bearer.robot + + +*** Test cases *** +BearerToken Operations + [Documentation] Testcase to validate NeoFS operations with BearerToken. + [Tags] ACL NeoFS NeoCLI BearerToken + [Timeout] 20 min + + Generate Keys + Prepare eACL Role rules + + Log Check Bearer token with simple object + Generate file ${SIMPLE_OBJ_SIZE} + Check eACL Deny and Allow All Bearer Simple + + Log Check Bearer token with complex object + Generate file ${COMPLEX_OBJ_SIZE} + Check eACL Deny and Allow All Bearer Complex + + + [Teardown] Cleanup + + + +*** Keywords *** + +Check eACL Deny and Allow All Bearer + [Arguments] ${RUN_TYPE} + ${CID} = Create Container Public + ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} + + + # Storage group Operations (Put, List, Get, Delete) + ${SG_OID_INV} = Put Storagegroup ${USER_KEY} ${CID} ${EMPTY} ${S_OID_USER} + ${SG_OID_1} = Put Storagegroup ${USER_KEY} ${CID} ${EMPTY} ${S_OID_USER} + List Storagegroup ${USER_KEY} ${CID} ${EMPTY} ${SG_OID_1} ${SG_OID_INV} + @{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${USER_KEY} ${CID} ${S_OID_USER} + ... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER} + Get Storagegroup ${USER_KEY} ${CID} ${SG_OID_1} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS} + Delete Storagegroup ${USER_KEY} ${CID} ${SG_OID_1} ${EMPTY} + + Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_USER} --await + + # The current ACL cache lifetime is 30 sec + Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} + + ${rule1}= Create Dictionary Operation=GET Access=ALLOW Role=USER + ${rule2}= Create Dictionary Operation=HEAD Access=ALLOW Role=USER + ${rule3}= Create Dictionary Operation=PUT Access=ALLOW Role=USER + ${rule4}= Create Dictionary Operation=DELETE Access=ALLOW Role=USER + ${rule5}= Create Dictionary Operation=SEARCH Access=ALLOW Role=USER + ${rule6}= Create Dictionary Operation=GETRANGE Access=ALLOW Role=USER + ${rule7}= Create Dictionary Operation=GETRANGEHASH Access=ALLOW Role=USER + + ${eACL_gen}= Create List ${rule1} ${rule2} ${rule3} ${rule4} ${rule5} ${rule6} ${rule7} + + Form BearerToken file ${USER_KEY} ${CID} bearer_allow_all_user ${eACL_gen} 100500 + + # All storage groups should fail without bearer token + Run Keyword And Expect Error * + ... Put Storagegroup ${USER_KEY} ${CID} ${EMPTY} ${S_OID_USER} + Run Keyword And Expect Error * + ... List Storagegroup ${USER_KEY} ${CID} ${EMPTY} ${SG_OID_1} ${SG_OID_INV} + Run Keyword And Expect Error * + ... Get Storagegroup ${USER_KEY} ${CID} ${SG_OID_1} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS} + Run Keyword And Expect Error * + ... Delete Storagegroup ${USER_KEY} ${CID} ${SG_OID_1} ${EMPTY} + + # Storagegroup should passed with User group key and bearer token + ${SG_OID_NEW} = Put Storagegroup ${USER_KEY} ${CID} bearer_allow_all_user ${S_OID_USER} + List Storagegroup ${USER_KEY} ${CID} bearer_allow_all_user ${SG_OID_NEW} ${SG_OID_INV} + Get Storagegroup ${USER_KEY} ${CID} ${SG_OID_INV} bearer_allow_all_user ${EMPTY} @{EXPECTED_OIDS} + Delete Storagegroup ${USER_KEY} ${CID} ${SG_OID_INV} bearer_allow_all_user + + +Cleanup + Cleanup Files + Get Docker Logs acl_bearer \ No newline at end of file diff --git a/robot/testsuites/integration/acl/acl_bearer_compound.robot b/robot/testsuites/integration/acl/acl_bearer_compound.robot index ef4f4b5b..10d4c9e9 100644 --- a/robot/testsuites/integration/acl/acl_bearer_compound.robot +++ b/robot/testsuites/integration/acl/acl_bearer_compound.robot @@ -16,12 +16,12 @@ BearerToken Operations for Сompound Operations Prepare eACL Role rules Log Check Bearer token with simple object - Generate file 1024 + Generate file ${SIMPLE_OBJ_SIZE} Check Сompound Operations Log Check Bearer token with complex object - Generate file 70e+6 + Generate file ${COMPLEX_OBJ_SIZE} Check Сompound Operations [Teardown] Cleanup @@ -55,6 +55,9 @@ Check Bearer Сompound Get Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Set eACL ${USER_KEY} ${CID} ${DENY_EACL} --await + # The current ACL cache lifetime is 30 sec + Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} + ${rule1}= Create Dictionary Operation=GET Access=ALLOW Role=${DENY_GROUP} ${rule2}= Create Dictionary Operation=GETRANGE Access=ALLOW Role=${DENY_GROUP} ${rule3}= Create Dictionary Operation=GETRANGEHASH Access=ALLOW Role=${DENY_GROUP} @@ -81,6 +84,9 @@ Check Bearer Сompound Delete Set eACL ${USER_KEY} ${CID} ${DENY_EACL} --await + # The current ACL cache lifetime is 30 sec + Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} + ${rule1} = Create Dictionary Operation=DELETE Access=ALLOW Role=${DENY_GROUP} ${rule2} = Create Dictionary Operation=PUT Access=DENY Role=${DENY_GROUP} ${rule3} = Create Dictionary Operation=HEAD Access=DENY Role=${DENY_GROUP} @@ -107,6 +113,9 @@ Check Bearer Сompound Get Range Hash Set eACL ${USER_KEY} ${CID} ${DENY_EACL} --await + # The current ACL cache lifetime is 30 sec + Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} + ${rule1} = Create Dictionary Operation=GETRANGEHASH Access=ALLOW Role=${DENY_GROUP} ${rule2} = Create Dictionary Operation=GETRANGE Access=DENY Role=${DENY_GROUP} ${rule3} = Create Dictionary Operation=GET Access=DENY Role=${DENY_GROUP} diff --git a/robot/testsuites/integration/acl/acl_bearer_filter_oid_equal.robot b/robot/testsuites/integration/acl/acl_bearer_filter_oid_equal.robot index f0049a56..83b1c10a 100644 --- a/robot/testsuites/integration/acl/acl_bearer_filter_oid_equal.robot +++ b/robot/testsuites/integration/acl/acl_bearer_filter_oid_equal.robot @@ -17,12 +17,12 @@ BearerToken Operations with Filter OID Equal Prepare eACL Role rules Log Check Bearer token with simple object - Generate file 1024 + Generate file ${SIMPLE_OBJ_SIZE} Check eACL Deny and Allow All Bearer Filter OID Equal Log Check Bearer token with complex object - Generate file 70e+6 + Generate file ${COMPLEX_OBJ_SIZE} Check eACL Deny and Allow All Bearer Filter OID Equal [Teardown] Cleanup @@ -47,6 +47,9 @@ Check eACL Deny and Allow All Bearer Filter OID Equal Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_USER} --await + # The current ACL cache lifetime is 30 sec + Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} + ${filters}= Create Dictionary headerType=OBJECT matchType=STRING_EQUAL key=$Object:objectID value=${S_OID_USER} ${rule1}= Create Dictionary Operation=GET Access=ALLOW Role=USER Filters=${filters} diff --git a/robot/testsuites/integration/acl/acl_bearer_filter_oid_not_equal.robot b/robot/testsuites/integration/acl/acl_bearer_filter_oid_not_equal.robot index 85e1f977..86eb6498 100644 --- a/robot/testsuites/integration/acl/acl_bearer_filter_oid_not_equal.robot +++ b/robot/testsuites/integration/acl/acl_bearer_filter_oid_not_equal.robot @@ -17,12 +17,12 @@ BearerToken Operations with Filter OID NotEqual Prepare eACL Role rules Log Check Bearer token with simple object - Generate file 1024 + Generate file ${SIMPLE_OBJ_SIZE} Check eACL Deny and Allow All Bearer Filter OID NotEqual Log Check Bearer token with complex object - Generate file 70e+6 + Generate file ${COMPLEX_OBJ_SIZE} Check eACL Deny and Allow All Bearer Filter OID NotEqual [Teardown] Cleanup @@ -68,6 +68,9 @@ Check eACL Deny and Allow All Bearer Filter OID NotEqual Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_USER} --await + # The current ACL cache lifetime is 30 sec + Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} + ${filters}= Create Dictionary headerType=OBJECT matchType=STRING_NOT_EQUAL key=$Object:objectID value=${S_OID_USER_2} ${rule1}= Create Dictionary Operation=GET Access=ALLOW Role=USER Filters=${filters} diff --git a/robot/testsuites/integration/acl/acl_bearer_filter_userheader_equal.robot b/robot/testsuites/integration/acl/acl_bearer_filter_userheader_equal.robot index 8c0be050..720774b9 100644 --- a/robot/testsuites/integration/acl/acl_bearer_filter_userheader_equal.robot +++ b/robot/testsuites/integration/acl/acl_bearer_filter_userheader_equal.robot @@ -18,12 +18,12 @@ BearerToken Operations with Filter UserHeader Equal Prepare eACL Role rules Log Check Bearer token with simple object - Generate file 1024 + Generate file ${SIMPLE_OBJ_SIZE} Check eACL Deny and Allow All Bearer Filter UserHeader Equal Log Check Bearer token with complex object - Generate file 70e+6 + Generate file ${COMPLEX_OBJ_SIZE} Check eACL Deny and Allow All Bearer Filter UserHeader Equal [Teardown] Cleanup @@ -69,6 +69,8 @@ Check eACL Deny and Allow All Bearer Filter UserHeader Equal Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_USER} --await + # The current ACL cache lifetime is 30 sec + Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} ${filters}= Create Dictionary headerType=OBJECT matchType=STRING_EQUAL key=key2 value=abc diff --git a/robot/testsuites/integration/acl/acl_bearer_filter_userheader_not_equal.robot b/robot/testsuites/integration/acl/acl_bearer_filter_userheader_not_equal.robot index 8ca63849..db8f051e 100644 --- a/robot/testsuites/integration/acl/acl_bearer_filter_userheader_not_equal.robot +++ b/robot/testsuites/integration/acl/acl_bearer_filter_userheader_not_equal.robot @@ -17,12 +17,12 @@ BearerToken Operations Filter UserHeader NotEqual Prepare eACL Role rules Log Check Bearer token with simple object - Generate file 1024 + Generate file ${SIMPLE_OBJ_SIZE} Check eACL Deny and Allow All Bearer Filter UserHeader NotEqual Log Check Bearer token with complex object - Generate file 70e+6 + Generate file ${COMPLEX_OBJ_SIZE} Check eACL Deny and Allow All Bearer Filter UserHeader NotEqual [Teardown] Cleanup @@ -48,6 +48,8 @@ Check eACL Deny and Allow All Bearer Filter UserHeader NotEqual Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_USER} --await + # The current ACL cache lifetime is 30 sec + Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} ${filters}= Create Dictionary headerType=OBJECT matchType=STRING_NOT_EQUAL key=key2 value=abc diff --git a/robot/testsuites/integration/acl/acl_bearer_inaccessible.robot b/robot/testsuites/integration/acl/acl_bearer_inaccessible.robot index a81b01e1..6a686978 100644 --- a/robot/testsuites/integration/acl/acl_bearer_inaccessible.robot +++ b/robot/testsuites/integration/acl/acl_bearer_inaccessible.robot @@ -17,12 +17,12 @@ BearerToken Operations for Inaccessible Container Prepare eACL Role rules Log Check Bearer token with simple object - Generate file 1024 + Generate file ${SIMPLE_OBJ_SIZE} Check Container Inaccessible and Allow All Bearer Log Check Bearer token with complex object - Generate file 70e+6 + Generate file ${COMPLEX_OBJ_SIZE} Check Container Inaccessible and Allow All Bearer [Teardown] Cleanup diff --git a/robot/testsuites/integration/acl/acl_bearer_request_filter_xheader_deny.robot b/robot/testsuites/integration/acl/acl_bearer_request_filter_xheader_deny.robot index f6337958..b3e42c03 100644 --- a/robot/testsuites/integration/acl/acl_bearer_request_filter_xheader_deny.robot +++ b/robot/testsuites/integration/acl/acl_bearer_request_filter_xheader_deny.robot @@ -20,12 +20,12 @@ BearerToken Operations Prepare eACL Role rules Log Check Bearer token with simple object - Generate file 1024 + Generate file ${SIMPLE_OBJ_SIZE} Check eACL Allow All Bearer Filter Requst Equal Deny Log Check Bearer token with complex object - Generate file 70e+6 + Generate file ${COMPLEX_OBJ_SIZE} Check eACL Allow All Bearer Filter Requst Equal Deny [Teardown] Cleanup diff --git a/robot/testsuites/integration/acl/acl_bearer_request_filter_xheader_equal.robot b/robot/testsuites/integration/acl/acl_bearer_request_filter_xheader_equal.robot index 468e53d4..ff47cbef 100644 --- a/robot/testsuites/integration/acl/acl_bearer_request_filter_xheader_equal.robot +++ b/robot/testsuites/integration/acl/acl_bearer_request_filter_xheader_equal.robot @@ -17,12 +17,12 @@ BearerToken Operations with Filter Requst Equal Prepare eACL Role rules Log Check Bearer token with simple object - Generate file 1024 + Generate file ${SIMPLE_OBJ_SIZE} Check eACL Deny and Allow All Bearer Filter Requst Equal Log Check Bearer token with complex object - Generate file 70e+6 + Generate file ${COMPLEX_OBJ_SIZE} Check eACL Deny and Allow All Bearer Filter Requst Equal [Teardown] Cleanup @@ -47,6 +47,9 @@ Check eACL Deny and Allow All Bearer Filter Requst Equal Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_USER} --await + # The current ACL cache lifetime is 30 sec + Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} + ${filters}= Create Dictionary headerType=REQUEST matchType=STRING_EQUAL key=a value=256 ${rule1}= Create Dictionary Operation=GET Access=ALLOW Role=USER Filters=${filters} ${rule2}= Create Dictionary Operation=HEAD Access=ALLOW Role=USER Filters=${filters} diff --git a/robot/testsuites/integration/acl/acl_bearer_request_filter_xheader_not_equal.robot b/robot/testsuites/integration/acl/acl_bearer_request_filter_xheader_not_equal.robot index 13ec572f..d7860707 100644 --- a/robot/testsuites/integration/acl/acl_bearer_request_filter_xheader_not_equal.robot +++ b/robot/testsuites/integration/acl/acl_bearer_request_filter_xheader_not_equal.robot @@ -17,12 +17,12 @@ BearerToken Operations with Filter Requst NotEqual Prepare eACL Role rules Log Check Bearer token with simple object - Generate file 1024 + Generate file ${SIMPLE_OBJ_SIZE} Check eACL Deny and Allow All Bearer Filter Requst NotEqual Log Check Bearer token with complex object - Generate file 70e+6 + Generate file ${COMPLEX_OBJ_SIZE} Check eACL Deny and Allow All Bearer Filter Requst NotEqual [Teardown] Cleanup @@ -46,6 +46,9 @@ Check eACL Deny and Allow All Bearer Filter Requst NotEqual Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_USER} --await + # The current ACL cache lifetime is 30 sec + Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} + ${filters}= Create Dictionary headerType=REQUEST matchType=STRING_NOT_EQUAL key=a value=256 ${rule1}= Create Dictionary Operation=GET Access=ALLOW Role=USER Filters=${filters} ${rule2}= Create Dictionary Operation=HEAD Access=ALLOW Role=USER Filters=${filters} diff --git a/robot/testsuites/integration/acl/acl_extended_actions.robot b/robot/testsuites/integration/acl/acl_extended_actions.robot deleted file mode 100644 index a4e1e282..00000000 --- a/robot/testsuites/integration/acl/acl_extended_actions.robot +++ /dev/null @@ -1,243 +0,0 @@ -*** Settings *** -Variables ../../../variables/common.py -Library Collections -Library ../${RESOURCES}/neofs.py -Library ../${RESOURCES}/payment_neogo.py - -Resource common_steps_acl_extended.robot - -*** Test cases *** -Extended ACL Operations - [Documentation] Testcase to validate NeoFS operations with extended ACL. - [Tags] ACL eACL NeoFS NeoCLI - [Timeout] 20 min - - Generate Keys - Prepare eACL Role rules - - Log Check extended ACL with simple object - - Generate files 1024 - Check Actions - - - Log Check extended ACL with complex object - Generate files 70e+6 - Check Actions - - - [Teardown] Cleanup - - -*** Keywords *** - -Check Actions - Check eACL Deny and Allow All Other - Check eACL Deny and Allow All User - Check eACL Deny and Allow All System - Check eACL Deny All Other and Allow All Pubkey - - - -Check eACL Deny and Allow All User - Check eACL Deny and Allow All ${USER_KEY} ${EACL_DENY_ALL_USER} ${EACL_ALLOW_ALL_USER} - - -Check eACL Deny and Allow All Other - Check eACL Deny and Allow All ${OTHER_KEY} ${EACL_DENY_ALL_OTHER} ${EACL_ALLOW_ALL_OTHER} - - -Check eACL Deny and Allow All System - ${CID} = Create Container Public - - ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} - ${D_OID_USER_S} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} - ${D_OID_USER_SN} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} - - @{S_OBJ_H} = Create List ${S_OID_USER} - - Put object ${SYSTEM_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} - Put object ${SYSTEM_KEY_SN} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} - - Get object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl - Get object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl - - Search object ${SYSTEM_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} - Search object ${SYSTEM_KEY_SN} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} - - Head object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} - Head object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} - - Get Range ${SYSTEM_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 - Get Range ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 - - Get Range Hash ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 - Get Range Hash ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} 0:256 - - Delete object ${SYSTEM_KEY} ${CID} ${D_OID_USER_S} ${EMPTY} - Delete object ${SYSTEM_KEY_SN} ${CID} ${D_OID_USER_SN} ${EMPTY} - - Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_SYSTEM} --await - - Run Keyword And Expect Error * - ... Put object ${SYSTEM_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} - Run Keyword And Expect Error * - ... Put object ${SYSTEM_KEY_SN} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} - - Run Keyword And Expect Error * - ... Get object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl - Run Keyword And Expect Error * - ... Get object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl - - Run Keyword And Expect Error * - ... Search object ${SYSTEM_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} - Run Keyword And Expect Error * - ... Search object ${SYSTEM_KEY_SN} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} - - - Run Keyword And Expect Error * - ... Head object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} - Run Keyword And Expect Error * - ... Head object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} - - Run Keyword And Expect Error * - ... Get Range ${SYSTEM_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 - Run Keyword And Expect Error * - ... Get Range ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 - - - Run Keyword And Expect Error * - ... Get Range Hash ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 - Run Keyword And Expect Error * - ... Get Range Hash ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} 0:256 - - - Run Keyword And Expect Error * - ... Delete object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} - Run Keyword And Expect Error * - ... Delete object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} - - - Set eACL ${USER_KEY} ${CID} ${EACL_ALLOW_ALL_SYSTEM} --await - - - ${D_OID_USER_S} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} - ${D_OID_USER_SN} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} - - - Put object ${SYSTEM_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} - Put object ${SYSTEM_KEY_SN} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} - - Get object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl - Get object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl - - Search object ${SYSTEM_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} - Search object ${SYSTEM_KEY_SN} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} - - Head object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} - Head object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} - - Get Range ${SYSTEM_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 - Get Range ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 - - Get Range Hash ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 - Get Range Hash ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} 0:256 - - Delete object ${SYSTEM_KEY} ${CID} ${D_OID_USER_S} ${EMPTY} - Delete object ${SYSTEM_KEY_SN} ${CID} ${D_OID_USER_SN} ${EMPTY} - - - -Check eACL Deny All Other and Allow All Pubkey - - ${CID} = Create Container Public - ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} - ${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} - @{S_OBJ_H} = Create List ${S_OID_USER} - - Put object ${EACL_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} - Get object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl - Search object ${EACL_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} - Head object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} - Get Range ${EACL_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 - Get Range Hash ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 - Delete object ${EACL_KEY} ${CID} ${D_OID_USER} ${EMPTY} - - Set eACL ${USER_KEY} ${CID} ${EACL_ALLOW_ALL_Pubkey} --await - Get eACL ${USER_KEY} ${CID} - - Run Keyword And Expect Error * - ... Put object ${OTHER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} - Run Keyword And Expect Error * - ... Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl - Run Keyword And Expect Error * - ... Search object ${OTHER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} - Run Keyword And Expect Error * - ... Head object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} - Run Keyword And Expect Error * - ... Get Range ${OTHER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 - Run Keyword And Expect Error * - ... Get Range Hash ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 - Run Keyword And Expect Error * - ... Delete object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} - - Put object ${EACL_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} - Get object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl - Search object ${EACL_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} - Head object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} - Get Range ${EACL_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 - Get Range Hash ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 - Delete object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} - - -Check eACL Deny and Allow All - [Arguments] ${KEY} ${DENY_EACL} ${ALLOW_EACL} - - ${CID} = Create Container Public - ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} - ${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} - @{S_OBJ_H} = Create List ${S_OID_USER} - - Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} - - Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl - Search object ${KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} - Head object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} - - Get Range ${KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 - Get Range Hash ${KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 - Delete object ${KEY} ${CID} ${D_OID_USER} ${EMPTY} - - Set eACL ${USER_KEY} ${CID} ${DENY_EACL} --await - - Run Keyword And Expect Error * - ... Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} - Run Keyword And Expect Error * - ... Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl - Run Keyword And Expect Error * - ... Search object ${KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} - Run Keyword And Expect Error * - ... Head object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} - Run Keyword And Expect Error * - ... Get Range ${KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 - Run Keyword And Expect Error * - ... Get Range Hash ${KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 - Run Keyword And Expect Error * - ... Delete object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} - - Set eACL ${USER_KEY} ${CID} ${ALLOW_EACL} --await - - - Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} - Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl - Search object ${KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} - Head object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} - Get Range ${KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 - Get Range Hash ${KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 - Delete object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} - - - -Cleanup - Cleanup Files - Get Docker Logs acl_extended diff --git a/robot/testsuites/integration/acl/acl_extended_actions_other.robot b/robot/testsuites/integration/acl/acl_extended_actions_other.robot new file mode 100644 index 00000000..f221934f --- /dev/null +++ b/robot/testsuites/integration/acl/acl_extended_actions_other.robot @@ -0,0 +1,37 @@ +*** Settings *** +Variables ../../../variables/common.py +Library Collections +Library ../${RESOURCES}/neofs.py +Library ../${RESOURCES}/payment_neogo.py + +Resource common_steps_acl_extended.robot + +*** Test cases *** +Extended ACL Operations + [Documentation] Testcase to validate NeoFS operations with extended ACL with Other group key. + [Tags] ACL eACL NeoFS NeoCLI + [Timeout] 20 min + + Generate Keys + Prepare eACL Role rules + + Log Check extended ACL with simple object + Generate files ${SIMPLE_OBJ_SIZE} + Check eACL Deny and Allow All Other + + Log Check extended ACL with complex object + Generate files ${COMPLEX_OBJ_SIZE} + Check eACL Deny and Allow All Other + + [Teardown] Cleanup + + +*** Keywords *** + +Check eACL Deny and Allow All Other + Check eACL Deny and Allow All ${OTHER_KEY} ${EACL_DENY_ALL_OTHER} ${EACL_ALLOW_ALL_OTHER} + + +Cleanup + Cleanup Files + Get Docker Logs acl_extended diff --git a/robot/testsuites/integration/acl/acl_extended_actions_pubkey.robot b/robot/testsuites/integration/acl/acl_extended_actions_pubkey.robot new file mode 100644 index 00000000..92c81d19 --- /dev/null +++ b/robot/testsuites/integration/acl/acl_extended_actions_pubkey.robot @@ -0,0 +1,80 @@ +*** Settings *** +Variables ../../../variables/common.py +Library Collections +Library ../${RESOURCES}/neofs.py +Library ../${RESOURCES}/payment_neogo.py + +Resource common_steps_acl_extended.robot + +*** Test cases *** +Extended ACL Operations + [Documentation] Testcase to validate NeoFS operations with extended ACL. + [Tags] ACL eACL NeoFS NeoCLI + [Timeout] 20 min + + Generate Keys + Prepare eACL Role rules + + Log Check extended ACL with simple object + Generate files ${SIMPLE_OBJ_SIZE} + Check eACL Deny All Other and Allow All Pubkey + + Log Check extended ACL with complex object + Generate files ${COMPLEX_OBJ_SIZE} + Check eACL Deny All Other and Allow All Pubkey + + + [Teardown] Cleanup + + +*** Keywords *** + +Check eACL Deny All Other and Allow All Pubkey + + ${CID} = Create Container Public + ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} + ${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} + @{S_OBJ_H} = Create List ${S_OID_USER} + + Put object ${EACL_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} + Get object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl + Search object ${EACL_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} + Head object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} + Get Range ${EACL_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + Get Range Hash ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 + Delete object ${EACL_KEY} ${CID} ${D_OID_USER} ${EMPTY} + + Set eACL ${USER_KEY} ${CID} ${EACL_ALLOW_ALL_Pubkey} --await + + # The current ACL cache lifetime is 30 sec + Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} + + Get eACL ${USER_KEY} ${CID} + + Run Keyword And Expect Error * + ... Put object ${OTHER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} + Run Keyword And Expect Error * + ... Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl + Run Keyword And Expect Error * + ... Search object ${OTHER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} + Run Keyword And Expect Error * + ... Head object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} + Run Keyword And Expect Error * + ... Get Range ${OTHER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + Run Keyword And Expect Error * + ... Get Range Hash ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 + Run Keyword And Expect Error * + ... Delete object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} + + Put object ${EACL_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} + Get object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl + Search object ${EACL_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} + Head object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} + Get Range ${EACL_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + Get Range Hash ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 + Delete object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} + + +Cleanup + Cleanup Files + Get Docker Logs acl_extended diff --git a/robot/testsuites/integration/acl/acl_extended_actions_system.robot b/robot/testsuites/integration/acl/acl_extended_actions_system.robot new file mode 100644 index 00000000..cf326dae --- /dev/null +++ b/robot/testsuites/integration/acl/acl_extended_actions_system.robot @@ -0,0 +1,138 @@ +*** Settings *** +Variables ../../../variables/common.py +Library Collections +Library ../${RESOURCES}/neofs.py +Library ../${RESOURCES}/payment_neogo.py + +Resource common_steps_acl_extended.robot + +*** Test cases *** +Extended ACL Operations + [Documentation] Testcase to validate NeoFS operations with extended ACL. + [Tags] ACL eACL NeoFS NeoCLI + [Timeout] 20 min + + Generate Keys + Prepare eACL Role rules + + Log Check extended ACL with simple object + Generate files ${SIMPLE_OBJ_SIZE} + Check eACL Deny and Allow All System + + Log Check extended ACL with complex object + Generate files ${COMPLEX_OBJ_SIZE} + Check eACL Deny and Allow All System + + [Teardown] Cleanup + + +*** Keywords *** + +Check eACL Deny and Allow All System + ${CID} = Create Container Public + + ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} + ${D_OID_USER_S} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} + ${D_OID_USER_SN} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} + + @{S_OBJ_H} = Create List ${S_OID_USER} + + Put object ${SYSTEM_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} + Put object ${SYSTEM_KEY_SN} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} + + Get object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl + Get object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl + + Search object ${SYSTEM_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} + Search object ${SYSTEM_KEY_SN} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} + + Head object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} + Head object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} + + Get Range ${SYSTEM_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + Get Range ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + + Get Range Hash ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 + Get Range Hash ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} 0:256 + + Delete object ${SYSTEM_KEY} ${CID} ${D_OID_USER_S} ${EMPTY} + Delete object ${SYSTEM_KEY_SN} ${CID} ${D_OID_USER_SN} ${EMPTY} + + Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_SYSTEM} --await + + # The current ACL cache lifetime is 30 sec + Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} + + Run Keyword And Expect Error * + ... Put object ${SYSTEM_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} + Run Keyword And Expect Error * + ... Put object ${SYSTEM_KEY_SN} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} + + Run Keyword And Expect Error * + ... Get object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl + Run Keyword And Expect Error * + ... Get object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl + + Run Keyword And Expect Error * + ... Search object ${SYSTEM_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} + Run Keyword And Expect Error * + ... Search object ${SYSTEM_KEY_SN} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} + + + Run Keyword And Expect Error * + ... Head object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} + Run Keyword And Expect Error * + ... Head object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} + + Run Keyword And Expect Error * + ... Get Range ${SYSTEM_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + Run Keyword And Expect Error * + ... Get Range ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + + + Run Keyword And Expect Error * + ... Get Range Hash ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 + Run Keyword And Expect Error * + ... Get Range Hash ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} 0:256 + + + Run Keyword And Expect Error * + ... Delete object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} + Run Keyword And Expect Error * + ... Delete object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} + + + Set eACL ${USER_KEY} ${CID} ${EACL_ALLOW_ALL_SYSTEM} --await + + # The current ACL cache lifetime is 30 sec + Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} + + ${D_OID_USER_S} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} + ${D_OID_USER_SN} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} + + + Put object ${SYSTEM_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} + Put object ${SYSTEM_KEY_SN} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} + + Get object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl + Get object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl + + Search object ${SYSTEM_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} + Search object ${SYSTEM_KEY_SN} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} + + Head object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} + Head object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} + + Get Range ${SYSTEM_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + Get Range ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + + Get Range Hash ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 + Get Range Hash ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} 0:256 + + Delete object ${SYSTEM_KEY} ${CID} ${D_OID_USER_S} ${EMPTY} + Delete object ${SYSTEM_KEY_SN} ${CID} ${D_OID_USER_SN} ${EMPTY} + + +Cleanup + Cleanup Files + Get Docker Logs acl_extended diff --git a/robot/testsuites/integration/acl/acl_extended_actions_user.robot b/robot/testsuites/integration/acl/acl_extended_actions_user.robot new file mode 100644 index 00000000..cd7c2033 --- /dev/null +++ b/robot/testsuites/integration/acl/acl_extended_actions_user.robot @@ -0,0 +1,37 @@ +*** Settings *** +Variables ../../../variables/common.py +Library Collections +Library ../${RESOURCES}/neofs.py +Library ../${RESOURCES}/payment_neogo.py + +Resource common_steps_acl_extended.robot + +*** Test cases *** +Extended ACL Operations + [Documentation] Testcase to validate NeoFS operations with extended ACL. + [Tags] ACL eACL NeoFS NeoCLI + [Timeout] 20 min + + Generate Keys + Prepare eACL Role rules + + Log Check extended ACL with simple object + Generate files ${SIMPLE_OBJ_SIZE} + Check eACL Deny and Allow All User + + Log Check extended ACL with complex object + Generate files ${COMPLEX_OBJ_SIZE} + Check eACL Deny and Allow All User + + [Teardown] Cleanup + + +*** Keywords *** + +Check eACL Deny and Allow All User + Check eACL Deny and Allow All ${USER_KEY} ${EACL_DENY_ALL_USER} ${EACL_ALLOW_ALL_USER} + + +Cleanup + Cleanup Files + Get Docker Logs acl_extended diff --git a/robot/testsuites/integration/acl/acl_extended_compound.robot b/robot/testsuites/integration/acl/acl_extended_compound.robot index 7e175b69..6908e471 100644 --- a/robot/testsuites/integration/acl/acl_extended_compound.robot +++ b/robot/testsuites/integration/acl/acl_extended_compound.robot @@ -17,13 +17,13 @@ Extended ACL Operations Prepare eACL Role rules Log Check extended ACL with simple object - Generate files 1024 + Generate files ${SIMPLE_OBJ_SIZE} Check Сompound Operations Log Check extended ACL with complex object - Generate files 70e+6 + Generate files ${COMPLEX_OBJ_SIZE} Check Сompound Operations [Teardown] Cleanup @@ -56,6 +56,9 @@ Check eACL Сompound Get Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Set eACL ${USER_KEY} ${CID} ${DENY_EACL} --await + # The current ACL cache lifetime is 30 sec + Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} + Run Keyword And Expect Error * ... Head object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} @@ -76,6 +79,9 @@ Check eACL Сompound Delete Set eACL ${USER_KEY} ${CID} ${DENY_EACL} --await + # The current ACL cache lifetime is 30 sec + Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} + Run Keyword And Expect Error * ... Head object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} Run Keyword And Expect Error * @@ -96,6 +102,9 @@ Check eACL Сompound Get Range Hash Set eACL ${USER_KEY} ${CID} ${DENY_EACL} --await + # The current ACL cache lifetime is 30 sec + Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} + Run Keyword And Expect Error * ... Get Range ${KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 Run Keyword And Expect Error * diff --git a/robot/testsuites/integration/acl/acl_extended_filters.robot b/robot/testsuites/integration/acl/acl_extended_filters.robot index 666edb8e..1d931f70 100644 --- a/robot/testsuites/integration/acl/acl_extended_filters.robot +++ b/robot/testsuites/integration/acl/acl_extended_filters.robot @@ -16,12 +16,12 @@ Extended ACL Operations Prepare eACL Role rules Log Check extended ACL with simple object - Generate files 1024 + Generate files ${SIMPLE_OBJ_SIZE} Check Filters Log Check extended ACL with complex object - Generate files 70e+6 + Generate files ${COMPLEX_OBJ_SIZE} Check Filters [Teardown] Cleanup @@ -49,7 +49,10 @@ Check eACL MatchType String Equal Request Deny ${ID_value} = Get From Dictionary ${HEADER_DICT} ID Set eACL ${USER_KEY} ${CID} ${EACL_XHEADER_DENY_ALL} --await - + + # The current ACL cache lifetime is 30 sec + Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} + Run Keyword And Expect Error * ... Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl ${EMPTY} --xhdr a=2 Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl ${EMPTY} --xhdr a=256 @@ -69,8 +72,8 @@ Check eACL MatchType String Equal Request Deny Run Keyword And Expect Error * ... Delete object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} --xhdr a=2 - Put object ${OTHER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} ${EMPTY} --xhdr a=256 - Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl ${EMPTY} --xhdr a=* + Put object ${OTHER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} ${EMPTY} --xhdr a=256 + Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl ${EMPTY} --xhdr a=* Search object ${OTHER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${EMPTY} --xhdr a= Head object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${EMPTY} --xhdr a=.* Get Range ${OTHER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 --xhdr a="2 2" @@ -91,14 +94,18 @@ Check eACL MatchType String Equal Request Allow ${ID_value} = Get From Dictionary ${HEADER_DICT} ID Set eACL ${USER_KEY} ${CID} ${EACL_XHEADER_ALLOW_ALL} --await + + # The current ACL cache lifetime is 30 sec + Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} + Get eACL ${USER_KEY} ${CID} Run Keyword And Expect Error * - ... Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl ${EMPTY} + ... Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl ${EMPTY} Run Keyword And Expect Error * - ... Put object ${OTHER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} ${EMPTY} + ... Put object ${OTHER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} ${EMPTY} Run Keyword And Expect Error * - ... Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl ${EMPTY} + ... Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl ${EMPTY} Run Keyword And Expect Error * ... Search object ${OTHER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${EMPTY} Run Keyword And Expect Error * @@ -110,8 +117,8 @@ Check eACL MatchType String Equal Request Allow Run Keyword And Expect Error * ... Delete object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} - Put object ${OTHER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} ${EMPTY} --xhdr a=2 - Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl ${EMPTY} --xhdr a=2 + Put object ${OTHER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} ${EMPTY} --xhdr a=2 + Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl ${EMPTY} --xhdr a=2 Search object ${OTHER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${EMPTY} --xhdr a=2 Head object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${EMPTY} --xhdr a=2 Get Range ${OTHER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 --xhdr a=2 @@ -121,11 +128,11 @@ Check eACL MatchType String Equal Request Allow Check eACL MatchType String Equal Object ${CID} = Create Container Public - ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} + ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${HEADER} = Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} &{HEADER_DICT} = Parse Object System Header ${HEADER} - Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl + Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Log Set eACL for Deny GET operation with StringEqual Object ID @@ -133,12 +140,12 @@ Check eACL MatchType String Equal Object ${filters} = Create Dictionary headerType=OBJECT matchType=STRING_EQUAL key=$Object:objectID value=${ID_value} ${rule1} = Create Dictionary Operation=GET Access=DENY Role=OTHERS Filters=${filters} - ${eACL_gen} = Create List ${rule1} + ${eACL_gen} = Create List ${rule1} ${EACL_CUSTOM} = Form eACL json common file eacl_custom ${eACL_gen} Set eACL ${USER_KEY} ${CID} ${EACL_CUSTOM} --await Run Keyword And Expect Error * - ... Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl + ... Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Log Set eACL for Deny GET operation with StringEqual Object Extended User Header diff --git a/robot/testsuites/integration/acl/common_steps_acl_basic.robot b/robot/testsuites/integration/acl/common_steps_acl_basic.robot index 259e7129..d2131acb 100644 --- a/robot/testsuites/integration/acl/common_steps_acl_basic.robot +++ b/robot/testsuites/integration/acl/common_steps_acl_basic.robot @@ -14,9 +14,9 @@ Generate Keys Generate wallet ${WALLET_OTH} ${ADDR_OTH} = Dump Address ${WALLET_OTH} ${OTHER_KEY_GEN} = Dump PrivKey ${WALLET_OTH} ${ADDR_OTH} - - ${SYSTEM_KEY_GEN} = Form WIF from String c428b4a06f166fde9f8afcf918194acdde35aa2612ecf42fe0c94273425ded21 - ${SYSTEM_KEY_GEN_SN} = Form WIF from String 0fa21a94be2227916284e4b3495180d9c93d04f095fe9d5a86f22044f5c411d2 + + ${SYSTEM_KEY_GEN} = Set Variable ${NEOFS_IR_WIF} + ${SYSTEM_KEY_GEN_SN} = Set Variable ${NEOFS_SN_WIF} Set Global Variable ${USER_KEY} ${USER_KEY_GEN} Set Global Variable ${OTHER_KEY} ${OTHER_KEY_GEN} @@ -33,7 +33,7 @@ Generate Keys Payment Operations [Arguments] ${WALLET} ${ADDR} ${KEY} - ${TX} = Transfer Mainnet Gas wallets/wallet.json NTrezR3C4X8aMLVg7vozt5wguyNfFhwuFx ${ADDR} 3 + ${TX} = Transfer Mainnet Gas wallets/wallet.json ${DEF_WALLET_ADDR} ${ADDR} 3 Wait Until Keyword Succeeds 1 min 15 sec ... Transaction accepted in block ${TX} Get Transaction ${TX} diff --git a/robot/testsuites/integration/acl/common_steps_acl_bearer.robot b/robot/testsuites/integration/acl/common_steps_acl_bearer.robot index b1ab344c..7cb0baa6 100644 --- a/robot/testsuites/integration/acl/common_steps_acl_bearer.robot +++ b/robot/testsuites/integration/acl/common_steps_acl_bearer.robot @@ -22,8 +22,8 @@ Generate Keys # Get pre-defined keys ${EACL_KEY_GEN} = Form WIF from String 782676b81a35c5f07325ec523e8521ee4946b6e5d4c6cd652dd0c3ba51ce03de - ${SYSTEM_KEY_GEN} = Form WIF from String c428b4a06f166fde9f8afcf918194acdde35aa2612ecf42fe0c94273425ded21 - ${SYSTEM_KEY_GEN_SN} = Form WIF from String 0fa21a94be2227916284e4b3495180d9c93d04f095fe9d5a86f22044f5c411d2 + ${SYSTEM_KEY_GEN} = Set Variable ${NEOFS_IR_WIF} + ${SYSTEM_KEY_GEN_SN} = Set Variable ${NEOFS_SN_WIF} # Set global variables for keys for each role Set Global Variable ${USER_KEY} ${USER_KEY_GEN} @@ -39,7 +39,7 @@ Generate Keys Payment Operations [Arguments] ${WALLET} ${ADDR} ${KEY} - ${TX} = Transfer Mainnet Gas wallets/wallet.json NTrezR3C4X8aMLVg7vozt5wguyNfFhwuFx ${ADDR} 3 + ${TX} = Transfer Mainnet Gas wallets/wallet.json ${DEF_WALLET_ADDR} ${ADDR} 3 Wait Until Keyword Succeeds 1 min 15 sec ... Transaction accepted in block ${TX} Get Transaction ${TX} diff --git a/robot/testsuites/integration/acl/common_steps_acl_extended.robot b/robot/testsuites/integration/acl/common_steps_acl_extended.robot index 39f34d8a..036fd322 100644 --- a/robot/testsuites/integration/acl/common_steps_acl_extended.robot +++ b/robot/testsuites/integration/acl/common_steps_acl_extended.robot @@ -19,8 +19,8 @@ Generate Keys ${EACL_KEY_GEN} = Form WIF from String 782676b81a35c5f07325ec523e8521ee4946b6e5d4c6cd652dd0c3ba51ce03de - ${SYSTEM_KEY_GEN} = Form WIF from String c428b4a06f166fde9f8afcf918194acdde35aa2612ecf42fe0c94273425ded21 - ${SYSTEM_KEY_GEN_SN} = Form WIF from String 0fa21a94be2227916284e4b3495180d9c93d04f095fe9d5a86f22044f5c411d2 + ${SYSTEM_KEY_GEN} = Set Variable ${NEOFS_IR_WIF} + ${SYSTEM_KEY_GEN_SN} = Set Variable ${NEOFS_SN_WIF} Set Global Variable ${USER_KEY} ${USER_KEY_GEN} Set Global Variable ${OTHER_KEY} ${OTHER_KEY_GEN} @@ -35,7 +35,7 @@ Generate Keys Payment Operations [Arguments] ${WALLET} ${ADDR} ${KEY} - ${TX} = Transfer Mainnet Gas wallets/wallet.json NTrezR3C4X8aMLVg7vozt5wguyNfFhwuFx ${ADDR} 3 + ${TX} = Transfer Mainnet Gas wallets/wallet.json ${DEF_WALLET_ADDR} ${ADDR} 3 Wait Until Keyword Succeeds 1 min 15 sec ... Transaction accepted in block ${TX} @@ -193,12 +193,66 @@ Prepare eACL Role rules ${rule7}= Create Dictionary Operation=GETRANGEHASH Access=ALLOW Role=OTHERS Filters=${filters} ${rule8}= Create Dictionary Operation=GET Access=DENY Role=OTHERS ${rule9}= Create Dictionary Operation=HEAD Access=DENY Role=OTHERS - ${rule10}= Create Dictionary Operation=PUT Access=DENY Role=OTHERS - ${rule11}= Create Dictionary Operation=DELETE Access=DENY Role=OTHERS - ${rule12}= Create Dictionary Operation=SEARCH Access=DENY Role=OTHERS - ${rule13}= Create Dictionary Operation=GETRANGE Access=DENY Role=OTHERS - ${rule14}= Create Dictionary Operation=GETRANGEHASH Access=DENY Role=OTHERS + ${rule10}= Create Dictionary Operation=PUT Access=DENY Role=OTHERS + ${rule11}= Create Dictionary Operation=DELETE Access=DENY Role=OTHERS + ${rule12}= Create Dictionary Operation=SEARCH Access=DENY Role=OTHERS + ${rule13}= Create Dictionary Operation=GETRANGE Access=DENY Role=OTHERS + ${rule14}= Create Dictionary Operation=GETRANGEHASH Access=DENY Role=OTHERS ${eACL_gen}= Create List ${rule1} ${rule2} ${rule3} ${rule4} ${rule5} ${rule6} ${rule7} ... ${rule8} ${rule9} ${rule10} ${rule11} ${rule12} ${rule13} ${rule14} Form eACL json common file gen_eacl_xheader_allow_all ${eACL_gen} Set Global Variable ${EACL_XHEADER_ALLOW_ALL} gen_eacl_xheader_allow_all + + + +Check eACL Deny and Allow All + [Arguments] ${KEY} ${DENY_EACL} ${ALLOW_EACL} + + ${CID} = Create Container Public + ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} + ${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} + @{S_OBJ_H} = Create List ${S_OID_USER} + + Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} + + Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl + Search object ${KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} + Head object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} + + Get Range ${KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + Get Range Hash ${KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 + Delete object ${KEY} ${CID} ${D_OID_USER} ${EMPTY} + + Set eACL ${USER_KEY} ${CID} ${DENY_EACL} --await + + # The current ACL cache lifetime is 30 sec + Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} + + Run Keyword And Expect Error * + ... Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} + Run Keyword And Expect Error * + ... Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl + Run Keyword And Expect Error * + ... Search object ${KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} + Run Keyword And Expect Error * + ... Head object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} + Run Keyword And Expect Error * + ... Get Range ${KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + Run Keyword And Expect Error * + ... Get Range Hash ${KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 + Run Keyword And Expect Error * + ... Delete object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} + + Set eACL ${USER_KEY} ${CID} ${ALLOW_EACL} --await + + # The current ACL cache lifetime is 30 sec + Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} + + Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} + Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl + Search object ${KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} + Head object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} + Get Range ${KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + Get Range Hash ${KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 + Delete object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} + diff --git a/robot/testsuites/integration/network/netmap_simple.robot b/robot/testsuites/integration/network/netmap_simple.robot index 23687acc..dde2d042 100644 --- a/robot/testsuites/integration/network/netmap_simple.robot +++ b/robot/testsuites/integration/network/netmap_simple.robot @@ -66,7 +66,7 @@ NeoFS Simple Netmap Generate file - ${FILE} = Generate file of bytes 1024 + ${FILE} = Generate file of bytes ${SIMPLE_OBJ_SIZE} Set Global Variable ${FILE} ${FILE} Generate Key and Pre-payment @@ -83,7 +83,7 @@ Generate Key and Pre-payment Payment Operations [Arguments] ${WALLET} ${ADDR} ${KEY} - ${TX} = Transfer Mainnet Gas wallets/wallet.json NTrezR3C4X8aMLVg7vozt5wguyNfFhwuFx ${ADDR} 11 + ${TX} = Transfer Mainnet Gas wallets/wallet.json ${DEF_WALLET_ADDR} ${ADDR} 11 Wait Until Keyword Succeeds 1 min 15 sec ... Transaction accepted in block ${TX} Get Transaction ${TX} diff --git a/robot/testsuites/integration/network/replication.robot b/robot/testsuites/integration/network/replication.robot index b31404c9..853255f6 100644 --- a/robot/testsuites/integration/network/replication.robot +++ b/robot/testsuites/integration/network/replication.robot @@ -8,14 +8,14 @@ Library ../${RESOURCES}/payment_neogo.py NeoFS Object Replication [Documentation] Testcase to validate NeoFS object replication. [Tags] Migration Replication NeoFS NeoCLI - [Timeout] 15 min + [Timeout] 25 min ${WALLET} = Init wallet Generate wallet ${WALLET} ${ADDR} = Dump Address ${WALLET} ${PRIV_KEY} = Dump PrivKey ${WALLET} ${ADDR} - ${TX} = Transfer Mainnet Gas wallets/wallet.json NTrezR3C4X8aMLVg7vozt5wguyNfFhwuFx ${ADDR} 11 + ${TX} = Transfer Mainnet Gas wallets/wallet.json ${DEF_WALLET_ADDR} ${ADDR} 11 Wait Until Keyword Succeeds 1 min 15 sec ... Transaction accepted in block ${TX} Get Transaction ${TX} @@ -32,7 +32,7 @@ NeoFS Object Replication Container Existing ${PRIV_KEY} ${CID} - ${FILE} = Generate file of bytes 1024 + ${FILE} = Generate file of bytes ${SIMPLE_OBJ_SIZE} ${FILE_HASH} = Get file hash ${FILE} ${S_OID} = Put object ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} ${EMPTY} @@ -53,7 +53,14 @@ NeoFS Object Replication Find in Nodes Log object successfully replicated ${NODES_LOG_TIME} Start nodes @{NODES_OBJ_STOPPED} - Cleanup + + # We have 2 or 3 copies. Expected behaviour: after one epoch potential 3rd copy should be removed. + + Sleep ${NEOFS_EPOCH_TIMEOUT} + + Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${S_OID} + + [Teardown] Cleanup *** Keywords *** diff --git a/robot/testsuites/integration/object/object_complex.robot b/robot/testsuites/integration/object/object_complex.robot index a24d92e5..aa7fe24e 100644 --- a/robot/testsuites/integration/object/object_complex.robot +++ b/robot/testsuites/integration/object/object_complex.robot @@ -16,7 +16,7 @@ NeoFS Complex Object Operations Generate wallet ${WALLET} ${ADDR} = Dump Address ${WALLET} ${PRIV_KEY} = Dump PrivKey ${WALLET} ${ADDR} - ${TX} = Transfer Mainnet Gas wallets/wallet.json NTrezR3C4X8aMLVg7vozt5wguyNfFhwuFx ${ADDR} 15 + ${TX} = Transfer Mainnet Gas wallets/wallet.json ${DEF_WALLET_ADDR} ${ADDR} 15 Wait Until Keyword Succeeds 1 min 15 sec ... Transaction accepted in block ${TX} Get Transaction ${TX} @@ -36,9 +36,9 @@ NeoFS Complex Object Operations Container Existing ${PRIV_KEY} ${CID} Wait Until Keyword Succeeds 2 min 30 sec - ... Expected Balance ${PRIV_KEY} 10 -7e-08 + ... Expected Balance ${PRIV_KEY} 10 -1e-08 - ${FILE} = Generate file of bytes 70e+6 + ${FILE} = Generate file of bytes ${COMPLEX_OBJ_SIZE} ${FILE_HASH} = Get file hash ${FILE} ${S_OID} = Put object ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} ${EMPTY} diff --git a/robot/testsuites/integration/object/object_simple.robot b/robot/testsuites/integration/object/object_simple.robot index 0a197afe..07bc8675 100644 --- a/robot/testsuites/integration/object/object_simple.robot +++ b/robot/testsuites/integration/object/object_simple.robot @@ -16,7 +16,7 @@ NeoFS Simple Object Operations Generate wallet ${WALLET} ${ADDR} = Dump Address ${WALLET} ${PRIV_KEY} = Dump PrivKey ${WALLET} ${ADDR} - ${TX} = Transfer Mainnet Gas wallets/wallet.json NTrezR3C4X8aMLVg7vozt5wguyNfFhwuFx ${ADDR} 15 + ${TX} = Transfer Mainnet Gas wallets/wallet.json ${DEF_WALLET_ADDR} ${ADDR} 15 Wait Until Keyword Succeeds 1 min 15 sec ... Transaction accepted in block ${TX} Get Transaction ${TX} @@ -36,9 +36,9 @@ NeoFS Simple Object Operations Container Existing ${PRIV_KEY} ${CID} Wait Until Keyword Succeeds 2 min 30 sec - ... Expected Balance ${PRIV_KEY} 10 -7e-08 + ... Expected Balance ${PRIV_KEY} 10 -1e-08 - ${FILE} = Generate file of bytes 1024 + ${FILE} = Generate file of bytes ${SIMPLE_OBJ_SIZE} ${FILE_HASH} = Get file hash ${FILE} diff --git a/robot/testsuites/integration/object/object_storagegroup_complex.robot b/robot/testsuites/integration/object/object_storagegroup_complex.robot index a723ca55..25ec55af 100644 --- a/robot/testsuites/integration/object/object_storagegroup_complex.robot +++ b/robot/testsuites/integration/object/object_storagegroup_complex.robot @@ -16,7 +16,7 @@ NeoFS Complex Storagegroup Generate wallet ${WALLET} ${ADDR} = Dump Address ${WALLET} ${PRIV_KEY} = Dump PrivKey ${WALLET} ${ADDR} - ${TX} = Transfer Mainnet Gas wallets/wallet.json NTrezR3C4X8aMLVg7vozt5wguyNfFhwuFx ${ADDR} 15 + ${TX} = Transfer Mainnet Gas wallets/wallet.json ${DEF_WALLET_ADDR} ${ADDR} 15 Wait Until Keyword Succeeds 1 min 15 sec ... Transaction accepted in block ${TX} Get Transaction ${TX} @@ -35,7 +35,7 @@ NeoFS Complex Storagegroup ${CID} = Create container ${PRIV_KEY} Container Existing ${PRIV_KEY} ${CID} - ${FILE_S} = Generate file of bytes 70e+6 + ${FILE_S} = Generate file of bytes ${COMPLEX_OBJ_SIZE} ${FILE_HASH_S} = Get file hash ${FILE_S} @@ -47,34 +47,35 @@ NeoFS Complex Storagegroup Log Storage group with 1 object ${SG_OID_1} = Put Storagegroup ${PRIV_KEY} ${CID} ${EMPTY} ${S_OID_1} - List Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_1} + List Storagegroup ${PRIV_KEY} ${CID} ${EMPTY} ${SG_OID_1} @{SPLIT_OBJ_1} = Get Split objects ${PRIV_KEY} ${CID} ${S_OID_1} - Get Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_1} 70000000 @{SPLIT_OBJ_1} - ${Tombstone} = Delete Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_1} + Get Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_1} ${EMPTY} ${COMPLEX_OBJ_SIZE} @{SPLIT_OBJ_1} + ${Tombstone} = Delete Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_1} ${EMPTY} Verify Head tombstone ${PRIV_KEY} ${CID} ${Tombstone} ${SG_OID_1} ${ADDR} Run Keyword And Expect Error * - ... Get Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_1} 70000000 @{SPLIT_OBJ_1} - List Storagegroup ${PRIV_KEY} ${CID} @{EMPTY} + ... Get Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_1} ${EMPTY} ${COMPLEX_OBJ_SIZE} @{SPLIT_OBJ_1} + List Storagegroup ${PRIV_KEY} ${CID} ${EMPTY} @{EMPTY} Log Storage group with 2 objects ${SG_OID_2} = Put Storagegroup ${PRIV_KEY} ${CID} ${EMPTY} @{S_OBJ_ALL} - List Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_2} + List Storagegroup ${PRIV_KEY} ${CID} ${EMPTY} ${SG_OID_2} @{SPLIT_OBJ_2} = Get Split objects ${PRIV_KEY} ${CID} ${S_OID_2} @{SPLIT_OBJ_ALL} = Combine Lists ${SPLIT_OBJ_1} ${SPLIT_OBJ_2} - Get Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_2} 140000000 @{SPLIT_OBJ_ALL} - ${Tombstone} = Delete Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_2} + ${EXPECTED_SIZE} = Evaluate 2*${COMPLEX_OBJ_SIZE} + Get Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_2} ${EMPTY} ${EXPECTED_SIZE} @{SPLIT_OBJ_ALL} + ${Tombstone} = Delete Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_2} ${EMPTY} Verify Head tombstone ${PRIV_KEY} ${CID} ${Tombstone} ${SG_OID_2} ${ADDR} Run Keyword And Expect Error * - ... Get Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_2} 140000000 @{SPLIT_OBJ_ALL} - List Storagegroup ${PRIV_KEY} ${CID} @{EMPTY} + ... Get Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_2} ${EMPTY} ${EXPECTED_SIZE} @{SPLIT_OBJ_ALL} + List Storagegroup ${PRIV_KEY} ${CID} ${EMPTY} @{EMPTY} Log Incorrect input Run Keyword And Expect Error * ... Put Storagegroup ${PRIV_KEY} ${CID} ${EMPTY} ${UNEXIST_OID} Run Keyword And Expect Error * - ... Delete Storagegroup ${PRIV_KEY} ${CID} ${UNEXIST_OID} + ... Delete Storagegroup ${PRIV_KEY} ${CID} ${UNEXIST_OID} ${EMPTY} [Teardown] Cleanup diff --git a/robot/testsuites/integration/object/object_storagegroup_simple.robot b/robot/testsuites/integration/object/object_storagegroup_simple.robot index 8ba2bf0d..544f1128 100644 --- a/robot/testsuites/integration/object/object_storagegroup_simple.robot +++ b/robot/testsuites/integration/object/object_storagegroup_simple.robot @@ -16,7 +16,7 @@ NeoFS Simple Storagegroup Generate wallet ${WALLET} ${ADDR} = Dump Address ${WALLET} ${PRIV_KEY} = Dump PrivKey ${WALLET} ${ADDR} - ${TX} = Transfer Mainnet Gas wallets/wallet.json NTrezR3C4X8aMLVg7vozt5wguyNfFhwuFx ${ADDR} 15 + ${TX} = Transfer Mainnet Gas wallets/wallet.json ${DEF_WALLET_ADDR} ${ADDR} 15 Wait Until Keyword Succeeds 1 min 15 sec ... Transaction accepted in block ${TX} Get Transaction ${TX} @@ -35,7 +35,7 @@ NeoFS Simple Storagegroup ${CID} = Create container ${PRIV_KEY} Container Existing ${PRIV_KEY} ${CID} - ${FILE_S} = Generate file of bytes 1024 + ${FILE_S} = Generate file of bytes ${SIMPLE_OBJ_SIZE} ${FILE_HASH_S} = Get file hash ${FILE_S} @@ -47,31 +47,32 @@ NeoFS Simple Storagegroup Log Storage group with 1 object ${SG_OID_1} = Put Storagegroup ${PRIV_KEY} ${CID} ${EMPTY} ${S_OID_1} - List Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_1} - Get Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_1} 1024 ${S_OID_1} - ${Tombstone} = Delete Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_1} + List Storagegroup ${PRIV_KEY} ${CID} ${EMPTY} ${SG_OID_1} + Get Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_1} ${EMPTY} ${SIMPLE_OBJ_SIZE} ${S_OID_1} + ${Tombstone} = Delete Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_1} ${EMPTY} Verify Head tombstone ${PRIV_KEY} ${CID} ${Tombstone} ${SG_OID_1} ${ADDR} Run Keyword And Expect Error * - ... Get Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_1} 1024 ${S_OID_1} - List Storagegroup ${PRIV_KEY} ${CID} @{EMPTY} + ... Get Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_1} ${EMPTY} ${SIMPLE_OBJ_SIZE} ${S_OID_1} + List Storagegroup ${PRIV_KEY} ${CID} ${EMPTY} @{EMPTY} Log Storage group with 2 objects ${SG_OID_2} = Put Storagegroup ${PRIV_KEY} ${CID} ${EMPTY} @{S_OBJ_ALL} - List Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_2} - Get Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_2} 2048 @{S_OBJ_ALL} - ${Tombstone} = Delete Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_2} + List Storagegroup ${PRIV_KEY} ${CID} ${EMPTY} ${SG_OID_2} + ${EXPECTED_SIZE} = Evaluate 2*${SIMPLE_OBJ_SIZE} + Get Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_2} ${EMPTY} ${EXPECTED_SIZE} @{S_OBJ_ALL} + ${Tombstone} = Delete Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_2} ${EMPTY} Verify Head tombstone ${PRIV_KEY} ${CID} ${Tombstone} ${SG_OID_2} ${ADDR} Run Keyword And Expect Error * - ... Get Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_2} 2048 @{S_OBJ_ALL} - List Storagegroup ${PRIV_KEY} ${CID} @{EMPTY} + ... Get Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_2} ${EMPTY} ${EXPECTED_SIZE} @{S_OBJ_ALL} + List Storagegroup ${PRIV_KEY} ${CID} ${EMPTY} @{EMPTY} Log Incorrect input Run Keyword And Expect Error * ... Put Storagegroup ${PRIV_KEY} ${CID} ${EMPTY} ${UNEXIST_OID} Run Keyword And Expect Error * - ... Delete Storagegroup ${PRIV_KEY} ${CID} ${UNEXIST_OID} + ... Delete Storagegroup ${PRIV_KEY} ${CID} ${UNEXIST_OID} ${EMPTY} [Teardown] Cleanup diff --git a/robot/testsuites/integration/payment/withdraw.robot b/robot/testsuites/integration/payment/withdraw.robot index 363e52e2..779de5c7 100644 --- a/robot/testsuites/integration/payment/withdraw.robot +++ b/robot/testsuites/integration/payment/withdraw.robot @@ -5,8 +5,8 @@ Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/payment_neogo.py *** Variables *** -${DEPOSIT_AMOUNT} = 10 -${WITHDRAW_AMOUNT} = 10 +${DEPOSIT_AMOUNT} = 10 +${WITHDRAW_AMOUNT} = 10 *** Test cases *** NeoFS Deposit and Withdraw @@ -19,13 +19,13 @@ NeoFS Deposit and Withdraw ${ADDR} = Dump Address ${WALLET} ${PRIV_KEY} = Dump PrivKey ${WALLET} ${ADDR} - ${TX} = Transfer Mainnet Gas wallets/wallet.json NTrezR3C4X8aMLVg7vozt5wguyNfFhwuFx ${ADDR} 15 + ${TX} = Transfer Mainnet Gas wallets/wallet.json ${DEF_WALLET_ADDR} ${ADDR} 15 Wait Until Keyword Succeeds 1 min 15 sec ... Transaction accepted in block ${TX} Get Transaction ${TX} ${MAINNET_BALANCE} = Expected Mainnet Balance ${ADDR} 15 - ${SCRIPT_HASH} = Get ScriptHash ${PRIV_KEY} + ${SCRIPT_HASH} = Get ScriptHash ${PRIV_KEY} ${TX_DEPOSIT} = NeoFS Deposit ${WALLET} ${ADDR} ${SCRIPT_HASH} ${DEPOSIT_AMOUNT} @@ -33,7 +33,7 @@ NeoFS Deposit and Withdraw ... Transaction accepted in block ${TX_DEPOSIT} Get Transaction ${TX_DEPOSIT} - Sleep 1 min + # Expected amount diff will be formed from deposit amount and contract fee ${EXPECTED_DIFF} = Evaluate -${DEPOSIT_AMOUNT}-${NEOFS_CONTRACT_DEPOSIT_GAS_FEE} @@ -45,8 +45,11 @@ NeoFS Deposit and Withdraw Wait Until Keyword Succeeds 1 min 15 sec ... Transaction accepted in block ${TX} - Sleep 1 min + Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} + Get Balance ${PRIV_KEY} + Mainnet Balance ${ADDR} + Expected Balance ${PRIV_KEY} ${NEOFS_BALANCE} -${WITHDRAW_AMOUNT} # Expected amount diff will be formed from withdrawal amount and contract fee diff --git a/robot/testsuites/integration/services/http_gate.robot b/robot/testsuites/integration/services/http_gate.robot index d7f942d6..b7a48f8b 100644 --- a/robot/testsuites/integration/services/http_gate.robot +++ b/robot/testsuites/integration/services/http_gate.robot @@ -17,7 +17,7 @@ NeoFS HTTP Gateway Generate wallet ${WALLET} ${ADDR} = Dump Address ${WALLET} ${PRIV_KEY} = Dump PrivKey ${WALLET} ${ADDR} - ${TX} = Transfer Mainnet Gas wallets/wallet.json NTrezR3C4X8aMLVg7vozt5wguyNfFhwuFx ${ADDR} 6 + ${TX} = Transfer Mainnet Gas wallets/wallet.json ${DEF_WALLET_ADDR} ${ADDR} 6 Wait Until Keyword Succeeds 1 min 15 sec ... Transaction accepted in block ${TX} @@ -35,8 +35,8 @@ NeoFS HTTP Gateway Wait Until Keyword Succeeds 2 min 30 sec ... Container Existing ${PRIV_KEY} ${CID} - ${FILE} = Generate file of bytes 1024 - ${FILE_L} = Generate file of bytes 70e+6 + ${FILE} = Generate file of bytes ${SIMPLE_OBJ_SIZE} + ${FILE_L} = Generate file of bytes ${COMPLEX_OBJ_SIZE} ${FILE_HASH} = Get file hash ${FILE} ${FILE_L_HASH} = Get file hash ${FILE_L} diff --git a/robot/testsuites/integration/services/s3_gate.robot b/robot/testsuites/integration/services/s3_gate.robot index 1ccd987f..29a3c393 100644 --- a/robot/testsuites/integration/services/s3_gate.robot +++ b/robot/testsuites/integration/services/s3_gate.robot @@ -25,11 +25,11 @@ NeoFS S3 Gateway ... Transaction accepted in block ${TX_DEPOSIT} Get Transaction ${TX_DEPOSIT} - ${FILE_S3} = Generate file of bytes 70e+6 + ${FILE_S3} = Generate file of bytes ${COMPLEX_OBJ_SIZE} ${FILE_S3_HASH} = Get file hash ${FILE_S3} ${FILE_S3_NAME} = Get file name ${FILE_S3} - ${FILE_FS} = Generate file of bytes 70e+6 + ${FILE_FS} = Generate file of bytes ${COMPLEX_OBJ_SIZE} ${FILE_FS_HASH} = Get file hash ${FILE_FS} ${FILE_FS_NAME} = Get file name ${FILE_FS} diff --git a/robot/testsuites/smoke/selectelcdn_smoke.robot b/robot/testsuites/smoke/selectelcdn_smoke.robot index 6916e9a6..023cb2cb 100644 --- a/robot/testsuites/smoke/selectelcdn_smoke.robot +++ b/robot/testsuites/smoke/selectelcdn_smoke.robot @@ -59,11 +59,11 @@ NeoFS Storage Smoke ${CONTEINERS_LIST} = Container List ${PRIV_KEY} List Should Contain Value ${CONTEINERS_LIST} ${CID} - ${FILE_S3} = Generate file of bytes 1024 + ${FILE_S3} = Generate file of bytes ${SIMPLE_OBJ_SIZE} ${FILE_S3_HASH} = Get file hash ${FILE_S3} ${FILE_S3_NAME} = Get file name ${FILE_S3} - ${FILE_FS} = Generate file of bytes 1024 + ${FILE_FS} = Generate file of bytes ${SIMPLE_OBJ_SIZE} ${FILE_FS_HASH} = Get file hash ${FILE_FS} ${FILE_FS_NAME} = Get file name ${FILE_FS} @@ -89,5 +89,4 @@ NeoFS Storage Smoke Verify file hash s_file_read ${FILE_S3_HASH} Verify file hash ${FILEPATH_S3} ${FILE_S3_HASH} - [Teardown] Cleanup Files ${FILE_S3} ${FILE_FS} s_file_read s3_obj_get_s3 - ... fs_obj_get_s3 ${FILEPATH_S3} ${FILEPATH_FS} \ No newline at end of file + [Teardown] Cleanup Files \ No newline at end of file diff --git a/robot/variables/common.py b/robot/variables/common.py index 009df046..4265faa3 100644 --- a/robot/variables/common.py +++ b/robot/variables/common.py @@ -8,8 +8,13 @@ CERT="%s/../../ca" % ROOT # path from repo root is required for object put and get # in case when test is run from root in docker ABSOLUTE_FILE_PATH="/robot/testsuites/integration" - -# Price of the contract Deposit execution: 0.1493182 GAS -NEOFS_CONTRACT_DEPOSIT_GAS_FEE = 0.1493182 -NEOFS_CONTRACT_WITHDRAW_GAS_FEE = 0.0331791 -TEMP_DIR = "TemporaryDir/" \ No newline at end of file +# Price of the contract Deposit/Withdraw execution: +NEOFS_CONTRACT_DEPOSIT_GAS_FEE = 0.1679897 +NEOFS_CONTRACT_WITHDRAW_GAS_FEE = 0.0382514 +NEOFS_EPOCH_TIMEOUT = "5min" +NEOFS_CONTRACT_CACHE_TIMEOUT = "30s" +NEOFS_IR_WIF = "KxyjQ8eUa4FHt3Gvioyt1Wz29cTUrE4eTqX3yFSk1YFCsPL8uNsY" +NEOFS_SN_WIF = "Kwk6k2eC3L3QuPvD8aiaNyoSXgQ2YL1bwS5CP1oKoA9waeAze97s" +DEF_WALLET_ADDR = "NVUzCUvrbuWadAm6xBoyZ2U7nCmS9QBZtb" +SIMPLE_OBJ_SIZE = 1024 +COMPLEX_OBJ_SIZE = 70000000 diff --git a/wallets/wallet.json b/wallets/wallet.json index e007d956..40dcbfc5 100644 --- a/wallets/wallet.json +++ b/wallets/wallet.json @@ -1,30 +1 @@ -{ - "version": "3.0", - "accounts": [ - { - "address": "NTrezR3C4X8aMLVg7vozt5wguyNfFhwuFx", - "key": "6PYWrvsPU47vJTeoLUht12pHUQunPBgaR7JEbx7MpuAuNP8CHHyH9hbqqk", - "label": "", - "contract": { - "script": "DCEDGmxvu98CyjUXRfqGubpalFLXhaxPf8K3VIyipGxPz0oLQZVEDXg=", - "parameters": [ - { - "name": "parameter0", - "type": "Signature" - } - ], - "deployed": false - }, - "lock": false, - "isdefault": false - } - ], - "scrypt": { - "n": 16384, - "r": 8, - "p": 8 - }, - "extra": { - "Tokens": null - } -} +{"version":"3.0","accounts":[{"address":"NVUzCUvrbuWadAm6xBoyZ2U7nCmS9QBZtb","key":"6PYLKJhiSub5imt6WCVy6Quxtd9xu176omev1vWYovzkAQCTSQabAAQXii","label":"","contract":{"script":"DCEDGmxvu98CyjUXRfqGubpalFLXhaxPf8K3VIyipGxPz0pBdHR2qg==","parameters":[{"name":"parameter0","type":"Signature"}],"deployed":false},"lock":false,"isdefault":false}],"scrypt":{"n":16384,"r":8,"p":8},"extra":{"Tokens":null}} \ No newline at end of file