From 38e6776fc1d484be914bba7ce84b6d2f48a34cce Mon Sep 17 00:00:00 2001 From: Elizaveta Chichindaeva Date: Thu, 16 Dec 2021 09:51:26 +0300 Subject: [PATCH] [#105] Change common ACL constants Signed-off-by: Elizaveta Chichindaeva --- robot/resources/lib/python/neofs.py | 2 +- robot/resources/lib/python/payment_neogo.py | 3 +- .../lib/robot/common_steps_acl_basic.robot | 6 +- .../lib/robot/common_steps_acl_bearer.robot | 2 +- .../lib/robot/common_steps_acl_extended.robot | 8 +- .../lib/robot/common_steps_object.robot | 2 +- .../acl/acl_basic_private_container.robot | 87 +++++++++---------- ...basic_private_container_storagegroup.robot | 36 ++++---- .../acl/acl_basic_public_container.robot | 74 ++++++++-------- ..._basic_public_container_storagegroup.robot | 28 ++++-- .../acl/acl_basic_readonly_container.robot | 76 ++++++++-------- ...asic_readonly_container_storagegroup.robot | 9 +- .../integration/acl/acl_bearer_compound.robot | 80 +++++++++-------- ...rer_request_filter_xheader_not_equal.robot | 2 +- .../acl/acl_extended_actions_system.robot | 31 ++++--- .../acl/acl_extended_compound.robot | 22 ++++- .../acl/acl_extended_deny_replication.robot | 2 +- .../acl/acl_extended_filters.robot | 17 ++-- .../creation_epoch_filter.robot | 1 - .../payload_length_filter.robot | 1 - .../container/container_delete.robot | 39 +++++---- .../container/container_session_token.robot | 2 +- .../network/netmap_control_drop.robot | 25 +++--- .../object/object_attributes.robot | 2 +- .../integration/object/object_complex.robot | 13 ++- .../object/object_expiration.robot | 2 +- .../integration/object/object_simple.robot | 2 +- .../object/object_storagegroup_complex.robot | 2 +- .../object/object_storagegroup_simple.robot | 2 +- .../integration/services/http_gate.robot | 18 ++-- .../integration/services/s3_gate_bucket.robot | 14 ++- robot/variables/wellknown_acl.py | 10 ++- 32 files changed, 331 insertions(+), 289 deletions(-) diff --git a/robot/resources/lib/python/neofs.py b/robot/resources/lib/python/neofs.py index 7b7b27d5..5135ccd3 100644 --- a/robot/resources/lib/python/neofs.py +++ b/robot/resources/lib/python/neofs.py @@ -706,7 +706,7 @@ def delete_container(cid: str, private_key: str): deleteContainerCmd = ( f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wif {private_key} ' - f'container delete --cid {cid} --await' + f'container delete --cid {cid}' ) logger.info(f"Cmd: {deleteContainerCmd}") _cmd_run(deleteContainerCmd) diff --git a/robot/resources/lib/python/payment_neogo.py b/robot/resources/lib/python/payment_neogo.py index 093cfd4c..b7041695 100644 --- a/robot/resources/lib/python/payment_neogo.py +++ b/robot/resources/lib/python/payment_neogo.py @@ -11,6 +11,7 @@ from neo3 import wallet from common import * import rpc_client import contract +from wrappers import run_sh_with_passwd_contract ROBOT_AUTO_KEYWORDS = False @@ -29,7 +30,7 @@ def withdraw_mainnet_gas(wallet: str, address: str, scripthash: str, amount: int ) logger.info(f"Executing command: {cmd}") - out = _run_sh_with_passwd('', cmd) + out = (run_sh_with_passwd_contract('', cmd, expect_confirmation=True)).decode('utf-8') logger.info(f"Command completed with output: {out}") m = re.match(r'^Sent invocation transaction (\w{64})$', out) if m is None: diff --git a/robot/resources/lib/robot/common_steps_acl_basic.robot b/robot/resources/lib/robot/common_steps_acl_basic.robot index 201eabf5..9a48ee4d 100644 --- a/robot/resources/lib/robot/common_steps_acl_basic.robot +++ b/robot/resources/lib/robot/common_steps_acl_basic.robot @@ -7,7 +7,7 @@ Variables wellknown_acl.py Create Private Container [Arguments] ${USER_KEY} Log Create Private Container - ${PRIV_CID_GEN} = Create container ${USER_KEY} ${PRIVATE_ACL} ${COMMON_PLACEMENT_RULE} + ${PRIV_CID_GEN} = Create container ${USER_KEY} ${PRIVATE_ACL_F} ${COMMON_PLACEMENT_RULE} Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL} ... Container Existing ${USER_KEY} ${PRIV_CID_GEN} [Return] ${PRIV_CID_GEN} @@ -15,7 +15,7 @@ Create Private Container Create Public Container [Arguments] ${USER_KEY} Log Create Public Container - ${PUBLIC_CID_GEN} = Create container ${USER_KEY} ${PUBLIC_ACL} ${COMMON_PLACEMENT_RULE} + ${PUBLIC_CID_GEN} = Create container ${USER_KEY} ${PUBLIC_ACL_F} ${COMMON_PLACEMENT_RULE} Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL} ... Container Existing ${USER_KEY} ${PUBLIC_CID_GEN} [Return] ${PUBLIC_CID_GEN} @@ -23,7 +23,7 @@ Create Public Container Create Read-Only Container [Arguments] ${USER_KEY} Log Create Read-Only Container - ${READONLY_CID_GEN} = Create container ${USER_KEY} ${READONLY_ACL} ${COMMON_PLACEMENT_RULE} + ${READONLY_CID_GEN} = Create container ${USER_KEY} ${READONLY_ACL_F} ${COMMON_PLACEMENT_RULE} Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL} ... Container Existing ${USER_KEY} ${READONLY_CID_GEN} [Return] ${READONLY_CID_GEN} diff --git a/robot/resources/lib/robot/common_steps_acl_bearer.robot b/robot/resources/lib/robot/common_steps_acl_bearer.robot index ec38674f..68933296 100644 --- a/robot/resources/lib/robot/common_steps_acl_bearer.robot +++ b/robot/resources/lib/robot/common_steps_acl_bearer.robot @@ -10,7 +10,7 @@ ${FILE_OTH_HEADER} = key1=oth,key2=oth *** Keywords *** Create Container Public [Arguments] ${USER_KEY} - ${PUBLIC_CID_GEN} = Create container ${USER_KEY} 0x0FFFFFFF ${COMMON_PLACEMENT_RULE} + ${PUBLIC_CID_GEN} = Create container ${USER_KEY} ${PUBLIC_ACL} ${COMMON_PLACEMENT_RULE} Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL} ... Container Existing ${USER_KEY} ${PUBLIC_CID_GEN} [Return] ${PUBLIC_CID_GEN} diff --git a/robot/resources/lib/robot/common_steps_acl_extended.robot b/robot/resources/lib/robot/common_steps_acl_extended.robot index 3226645f..5217abe3 100644 --- a/robot/resources/lib/robot/common_steps_acl_extended.robot +++ b/robot/resources/lib/robot/common_steps_acl_extended.robot @@ -21,9 +21,9 @@ ${EACL_ERR_MSG} = * Create Container Public [Arguments] ${USER_KEY} Log Create Public Container - ${PUBLIC_CID_GEN} = Create container ${USER_KEY} 0x4FFFFFFF ${COMMON_PLACEMENT_RULE} - Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL} - ... Container Existing ${USER_KEY} ${PUBLIC_CID_GEN} + ${PUBLIC_CID_GEN} = Create container ${USER_KEY} ${PUBLIC_ACL} ${COMMON_PLACEMENT_RULE} + Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL} + ... Container Existing ${USER_KEY} ${PUBLIC_CID_GEN} [Return] ${PUBLIC_CID_GEN} @@ -43,7 +43,7 @@ Check eACL Deny and Allow All ${CID} = Create Container Public ${USER_KEY} ${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} + @{S_OBJ_H} = Create List ${S_OID_USER} Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} diff --git a/robot/resources/lib/robot/common_steps_object.robot b/robot/resources/lib/robot/common_steps_object.robot index 479acf33..8a958910 100644 --- a/robot/resources/lib/robot/common_steps_object.robot +++ b/robot/resources/lib/robot/common_steps_object.robot @@ -26,4 +26,4 @@ Prepare container ${CONTAINER_FEE} = Evaluate ${NEOFS_BALANCE} - ${NEW_NEOFS_BALANCE} Log Container fee is ${CONTAINER_FEE} - Set Global Variable ${CID} ${CID} + [Return] ${CID} diff --git a/robot/testsuites/integration/acl/acl_basic_private_container.robot b/robot/testsuites/integration/acl/acl_basic_private_container.robot index b5d44245..e2da3344 100644 --- a/robot/testsuites/integration/acl/acl_basic_private_container.robot +++ b/robot/testsuites/integration/acl/acl_basic_private_container.robot @@ -21,76 +21,73 @@ Basic ACL Operations for Private Container ${WALLET_OTH} ${ADDR_OTH} ${OTHER_KEY} = Prepare Wallet And Deposit ${PRIV_CID} = Create Private Container ${USER_KEY} - ${FILE_S} ${FILE_S_HASH} = Generate file ${SIMPLE_OBJ_SIZE} + ${FILE_S} ${FILE_S_HASH} = Generate file ${SIMPLE_OBJ_SIZE} Check Private Container ${USER_KEY} ${FILE_S} ${PRIV_CID} ${OTHER_KEY} ${PRIV_CID} = Create Private Container ${USER_KEY} - ${FILE_S} ${FILE_S_HASH} = Generate file ${COMPLEX_OBJ_SIZE} + ${FILE_S} ${FILE_S_HASH} = Generate file ${COMPLEX_OBJ_SIZE} Check Private Container ${USER_KEY} ${FILE_S} ${PRIV_CID} ${OTHER_KEY} [Teardown] Teardown acl_basic_private_container - - *** Keywords *** Check Private Container [Arguments] ${USER_KEY} ${FILE_S} ${PRIV_CID} ${OTHER_KEY} # Put - ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${PRIV_CID} ${EMPTY} ${EMPTY} - Run Keyword And Expect Error * - ... Put object ${OTHER_KEY} ${FILE_S} ${PRIV_CID} ${EMPTY} ${EMPTY} - Run Keyword And Expect Error * - ... Put object ${NEOFS_IR_WIF} ${FILE_S} ${PRIV_CID} ${EMPTY} ${EMPTY} - ${S_OID_SYS_SN} = Put object ${NEOFS_SN_WIF} ${FILE_S} ${PRIV_CID} ${EMPTY} ${EMPTY} + ${S_OID_USER} = Put Object ${USER_KEY} ${FILE_S} ${PRIV_CID} ${EMPTY} ${EMPTY} + Run Keyword And Expect Error * + ... Put object ${OTHER_KEY} ${FILE_S} ${PRIV_CID} ${EMPTY} ${EMPTY} + ${S_OID_SYS_IR} = Put Object ${NEOFS_IR_WIF} ${FILE_S} ${PRIV_CID} ${EMPTY} ${EMPTY} + ${S_OID_SYS_SN} = Put Object ${NEOFS_SN_WIF} ${FILE_S} ${PRIV_CID} ${EMPTY} ${EMPTY} # Get - Get object ${USER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} s_file_read - Run Keyword And Expect Error * - ... Get object ${OTHER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} s_file_read - Get object ${NEOFS_IR_WIF} ${PRIV_CID} ${S_OID_USER} ${EMPTY} s_file_read - Get object ${NEOFS_SN_WIF} ${PRIV_CID} ${S_OID_USER} ${EMPTY} s_file_read + Get Object ${USER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} s_file_read + Run Keyword And Expect Error * + ... Get object ${OTHER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} s_file_read + Get Object ${NEOFS_IR_WIF} ${PRIV_CID} ${S_OID_USER} ${EMPTY} s_file_read + Get Object ${NEOFS_SN_WIF} ${PRIV_CID} ${S_OID_USER} ${EMPTY} s_file_read # Get Range - Get Range ${USER_KEY} ${PRIV_CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 - Run Keyword And Expect Error * - ... Get Range ${OTHER_KEY} ${PRIV_CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 - Run Keyword And Expect Error * - ... Get Range ${NEOFS_IR_WIF} ${PRIV_CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 - Run Keyword And Expect Error * - ... Get Range ${NEOFS_SN_WIF} ${PRIV_CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + Get Range ${USER_KEY} ${PRIV_CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + Run Keyword And Expect Error * + ... Get Range ${OTHER_KEY} ${PRIV_CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + Run Keyword And Expect Error * + ... Get Range ${NEOFS_IR_WIF} ${PRIV_CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + Run Keyword And Expect Error * + ... Get Range ${NEOFS_SN_WIF} ${PRIV_CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 # Get Range Hash - Get Range Hash ${USER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} 0:256 - Run Keyword And Expect Error * - ... Get Range Hash ${OTHER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} 0:256 - Get Range Hash ${NEOFS_IR_WIF} ${PRIV_CID} ${S_OID_USER} ${EMPTY} 0:256 - Get Range Hash ${NEOFS_SN_WIF} ${PRIV_CID} ${S_OID_USER} ${EMPTY} 0:256 + Get Range hash ${USER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} 0:256 + Run Keyword And Expect Error * + ... Get Range Hash ${OTHER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} 0:256 + Get Range hash ${NEOFS_IR_WIF} ${PRIV_CID} ${S_OID_USER} ${EMPTY} 0:256 + Get Range hash ${NEOFS_SN_WIF} ${PRIV_CID} ${S_OID_USER} ${EMPTY} 0:256 # Search - @{S_OBJ_PRIV} = Create List ${S_OID_USER} ${S_OID_SYS_SN} - Search object ${USER_KEY} ${PRIV_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_PRIV} - Run Keyword And Expect Error * - ... Search object ${OTHER_KEY} ${PRIV_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_PRIV} - Search object ${NEOFS_IR_WIF} ${PRIV_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_PRIV} - Search object ${NEOFS_SN_WIF} ${PRIV_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_PRIV} + @{S_OBJ_PRIV} = Create List ${S_OID_USER} ${S_OID_SYS_SN} ${S_OID_SYS_IR} + Search Object ${USER_KEY} ${PRIV_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_PRIV} + Run Keyword And Expect Error * + ... Search object ${OTHER_KEY} ${PRIV_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_PRIV} + Search Object ${NEOFS_IR_WIF} ${PRIV_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_PRIV} + Search Object ${NEOFS_SN_WIF} ${PRIV_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_PRIV} # Head - Head object ${USER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} ${EMPTY} - Run Keyword And Expect Error * - ... Head object ${OTHER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} ${EMPTY} - Head object ${NEOFS_IR_WIF} ${PRIV_CID} ${S_OID_USER} ${EMPTY} ${EMPTY} - Head object ${NEOFS_SN_WIF} ${PRIV_CID} ${S_OID_USER} ${EMPTY} ${EMPTY} + Head Object ${USER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} ${EMPTY} + Run Keyword And Expect Error * + ... Head object ${OTHER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} ${EMPTY} + Head Object ${NEOFS_IR_WIF} ${PRIV_CID} ${S_OID_USER} ${EMPTY} ${EMPTY} + Head Object ${NEOFS_SN_WIF} ${PRIV_CID} ${S_OID_USER} ${EMPTY} ${EMPTY} # Delete - Run Keyword And Expect Error * - ... Delete object ${OTHER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} - Run Keyword And Expect Error * - ... Delete object ${NEOFS_IR_WIF} ${PRIV_CID} ${S_OID_USER} ${EMPTY} - Run Keyword And Expect Error * - ... Delete object ${NEOFS_SN_WIF} ${PRIV_CID} ${S_OID_USER} ${EMPTY} - Delete object ${USER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} + Run Keyword And Expect Error * + ... Delete object ${OTHER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} + Run Keyword And Expect Error * + ... Delete object ${NEOFS_IR_WIF} ${PRIV_CID} ${S_OID_USER} ${EMPTY} + Run Keyword And Expect Error * + ... Delete object ${NEOFS_SN_WIF} ${PRIV_CID} ${S_OID_USER} ${EMPTY} + Delete Object ${USER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} diff --git a/robot/testsuites/integration/acl/acl_basic_private_container_storagegroup.robot b/robot/testsuites/integration/acl/acl_basic_private_container_storagegroup.robot index 510f5f0c..8391f235 100644 --- a/robot/testsuites/integration/acl/acl_basic_private_container_storagegroup.robot +++ b/robot/testsuites/integration/acl/acl_basic_private_container_storagegroup.robot @@ -38,18 +38,18 @@ Check Private Container [Arguments] ${RUN_TYPE} ${USER_KEY} ${FILE_S} ${PRIV_CID} ${OTHER_KEY} # Put target object to use in storage groups - ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${PRIV_CID} ${EMPTY} ${EMPTY} + ${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} + ${SG_OID} = Put Storagegroup ${USER_KEY} ${PRIV_CID} ${EMPTY} ${S_OID_USER} + List Storagegroup ${USER_KEY} ${PRIV_CID} ${EMPTY} ${SG_OID} ${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} + Get Storagegroup ${USER_KEY} ${PRIV_CID} ${SG_OID} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS} + Delete Storagegroup ${USER_KEY} ${PRIV_CID} ${SG_OID} ${EMPTY} # "Others" group key @@ -63,25 +63,21 @@ Check Private Container ... Delete Storagegroup ${OTHER_KEY} ${PRIV_CID} ${SG_OID_INV} ${EMPTY} - # System group key (storage node) - ${SG_OID_1} = Put Storagegroup ${NEOFS_SN_WIF} ${PRIV_CID} ${EMPTY} ${S_OID_USER} - List Storagegroup ${NEOFS_SN_WIF} ${PRIV_CID} ${EMPTY} ${SG_OID_1} ${SG_OID_INV} + # System group key (Storage Node) + ${SG_OID_SN} = Put Storagegroup ${NEOFS_SN_WIF} ${PRIV_CID} ${EMPTY} ${S_OID_USER} + List Storagegroup ${NEOFS_SN_WIF} ${PRIV_CID} ${EMPTY} ${SG_OID_SN} ${SG_OID_INV} @{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${NEOFS_SN_WIF} ${PRIV_CID} ${S_OID_USER} ... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER} - Get Storagegroup ${NEOFS_SN_WIF} ${PRIV_CID} ${SG_OID_1} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS} + Get Storagegroup ${NEOFS_SN_WIF} ${PRIV_CID} ${SG_OID_SN} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS} Run Keyword And Expect Error * - ... Delete Storagegroup ${NEOFS_SN_WIF} ${PRIV_CID} ${SG_OID_1} ${EMPTY} + ... Delete Storagegroup ${NEOFS_SN_WIF} ${PRIV_CID} ${SG_OID_SN} ${EMPTY} - # System group key (Inner ring node) - Run Keyword And Expect Error * - ... Put Storagegroup ${NEOFS_IR_WIF} ${PRIV_CID} ${EMPTY} ${S_OID_USER} - Run Keyword And Expect Error * - ... List Storagegroup ${NEOFS_IR_WIF} ${PRIV_CID} ${EMPTY} ${SG_OID_INV} - - @{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${USER_KEY} ${PRIV_CID} ${S_OID_USER} + # System group key (Inner Ring Node) + ${SG_OID_IR} = Put Storagegroup ${NEOFS_IR_WIF} ${PRIV_CID} ${EMPTY} ${S_OID_USER} + List Storagegroup ${NEOFS_IR_WIF} ${PRIV_CID} ${EMPTY} ${SG_OID_SN} ${SG_OID_IR} ${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 ${NEOFS_IR_WIF} ${PRIV_CID} ${SG_OID_INV} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS} - + Get Storagegroup ${NEOFS_IR_WIF} ${PRIV_CID} ${SG_OID_IR} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS} Run Keyword And Expect Error * - ... Delete Storagegroup ${NEOFS_IR_WIF} ${PRIV_CID} ${SG_OID_INV} ${EMPTY} + ... Delete Storagegroup ${NEOFS_IR_WIF} ${PRIV_CID} ${SG_OID_IR} ${EMPTY} diff --git a/robot/testsuites/integration/acl/acl_basic_public_container.robot b/robot/testsuites/integration/acl/acl_basic_public_container.robot index a6378abd..d0e025a1 100644 --- a/robot/testsuites/integration/acl/acl_basic_public_container.robot +++ b/robot/testsuites/integration/acl/acl_basic_public_container.robot @@ -21,11 +21,11 @@ Basic ACL Operations for Public Container ${WALLET_OTH} ${ADDR_OTH} ${OTHER_KEY} = Prepare Wallet And Deposit ${PUBLIC_CID} = Create Public Container ${USER_KEY} - ${FILE_S} ${FILE_S_HASH} = Generate file ${SIMPLE_OBJ_SIZE} + ${FILE_S} ${FILE_S_HASH} = Generate file ${SIMPLE_OBJ_SIZE} Check Public Container ${USER_KEY} ${FILE_S} ${PUBLIC_CID} ${OTHER_KEY} ${PUBLIC_CID} = Create Public Container ${USER_KEY} - ${FILE_S} ${FILE_S_HASH} = Generate file ${COMPLEX_OBJ_SIZE} + ${FILE_S} ${FILE_S_HASH} = Generate file ${COMPLEX_OBJ_SIZE} Check Public Container ${USER_KEY} ${FILE_S} ${PUBLIC_CID} ${OTHER_KEY} [Teardown] Teardown acl_basic_public_container @@ -37,56 +37,60 @@ Check Public Container [Arguments] ${USER_KEY} ${FILE_S} ${PUBLIC_CID} ${OTHER_KEY} # 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 ${NEOFS_IR_WIF} ${FILE_S} ${PUBLIC_CID} ${EMPTY} ${EMPTY} - ${S_OID_SYS_SN} = Put object ${NEOFS_SN_WIF} ${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 ${NEOFS_IR_WIF} ${FILE_S} ${PUBLIC_CID} ${EMPTY} ${EMPTY} + ${S_OID_SYS_SN} = Put Object ${NEOFS_SN_WIF} ${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 ${NEOFS_IR_WIF} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} s_file_read - Get object ${NEOFS_SN_WIF} ${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 ${NEOFS_IR_WIF} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} s_file_read + Get Object ${NEOFS_SN_WIF} ${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 ${NEOFS_IR_WIF} ${PUBLIC_CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 - Get Range ${NEOFS_SN_WIF} ${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 + Run Keyword And Expect Error * + ... Get Range ${NEOFS_IR_WIF} ${PUBLIC_CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + Run Keyword And Expect Error * + ... Get Range ${NEOFS_SN_WIF} ${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 ${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 ${NEOFS_IR_WIF} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} 0:256 Get Range Hash ${NEOFS_SN_WIF} ${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} + @{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 ${NEOFS_IR_WIF} ${PUBLIC_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_PRIV} Search object ${NEOFS_SN_WIF} ${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 ${NEOFS_IR_WIF} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} ${EMPTY} - Head object ${NEOFS_SN_WIF} ${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 ${NEOFS_IR_WIF} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} ${EMPTY} + Head Object ${NEOFS_SN_WIF} ${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 ${NEOFS_IR_WIF} ${PUBLIC_CID} ${S_OID_OTHER} ${EMPTY} ${EMPTY} - Head object ${NEOFS_SN_WIF} ${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 ${NEOFS_IR_WIF} ${PUBLIC_CID} ${S_OID_OTHER} ${EMPTY} ${EMPTY} + Head Object ${NEOFS_SN_WIF} ${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 ${NEOFS_IR_WIF} ${PUBLIC_CID} ${S_OID_SYS_SN} ${EMPTY} ${EMPTY} - Head object ${NEOFS_SN_WIF} ${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 ${NEOFS_IR_WIF} ${PUBLIC_CID} ${S_OID_SYS_SN} ${EMPTY} ${EMPTY} + Head Object ${NEOFS_SN_WIF} ${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 ${NEOFS_IR_WIF} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} - Delete object ${NEOFS_SN_WIF} ${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} + Run Keyword And Expect Error * + ... Delete object ${NEOFS_IR_WIF} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} + Run Keyword And Expect Error * + ... Delete object ${NEOFS_SN_WIF} ${PUBLIC_CID} ${S_OID_OTHER} ${EMPTY} diff --git a/robot/testsuites/integration/acl/acl_basic_public_container_storagegroup.robot b/robot/testsuites/integration/acl/acl_basic_public_container_storagegroup.robot index eeb15a8c..0c30a0bd 100644 --- a/robot/testsuites/integration/acl/acl_basic_public_container_storagegroup.robot +++ b/robot/testsuites/integration/acl/acl_basic_public_container_storagegroup.robot @@ -3,6 +3,7 @@ Variables common.py Library neofs.py Library payment_neogo.py +Library contract_keywords.py Resource common_steps_acl_basic.robot Resource payment_operations.robot @@ -42,13 +43,26 @@ Check Public Container # 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} ${NEOFS_IR_WIF} ${NEOFS_SN_WIF} + @{ROLES_KEYS_PASS} = Create List ${USER_KEY} ${OTHER_KEY} + @{ROLES_KEYS_SYS} = Create List ${NEOFS_IR_WIF} ${NEOFS_SN_WIF} - 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} + FOR ${ROLE_KEY} IN @{ROLES_KEYS_PASS} + ${SG_OID_USERS} = Put Storagegroup ${ROLE_KEY} ${PUBLIC_CID} ${EMPTY} ${S_OID} + List Storagegroup ${ROLE_KEY} ${PUBLIC_CID} ${EMPTY} ${SG_OID_USERS} + @{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} + Get Storagegroup ${ROLE_KEY} ${PUBLIC_CID} ${SG_OID_USERS} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS} + Delete Storagegroup ${ROLE_KEY} ${PUBLIC_CID} ${SG_OID_USERS} ${EMPTY} + Tick Epoch + END + FOR ${ROLE_KEY} IN @{ROLES_KEYS_SYS} + ${SG_OID_SYS} = Put Storagegroup ${ROLE_KEY} ${PUBLIC_CID} ${EMPTY} ${S_OID} + List Storagegroup ${ROLE_KEY} ${PUBLIC_CID} ${EMPTY} ${SG_OID_SYS} + @{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_SYS} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS} + Run Keyword And Expect Error * + ... Delete Storagegroup ${ROLE_KEY} ${PUBLIC_CID} ${SG_OID_SYS} ${EMPTY} + Delete Storagegroup ${USER_KEY} ${PUBLIC_CID} ${SG_OID_SYS} ${EMPTY} + Tick Epoch END diff --git a/robot/testsuites/integration/acl/acl_basic_readonly_container.robot b/robot/testsuites/integration/acl/acl_basic_readonly_container.robot index 53744d43..cd0c5531 100644 --- a/robot/testsuites/integration/acl/acl_basic_readonly_container.robot +++ b/robot/testsuites/integration/acl/acl_basic_readonly_container.robot @@ -38,12 +38,11 @@ Check Read-Only Container [Arguments] ${RUN_TYPE} ${USER_KEY} ${FILE_S} ${READONLY_CID} ${OTHER_KEY} # Put - ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${READONLY_CID} ${EMPTY} ${EMPTY} + ${S_OID_USER} = Put Object ${USER_KEY} ${FILE_S} ${READONLY_CID} ${EMPTY} ${EMPTY} Run Keyword And Expect Error * - ... Put object ${OTHER_KEY} ${FILE_S} ${READONLY_CID} ${EMPTY} ${EMPTY} - Run Keyword And Expect Error * - ... Put object ${NEOFS_IR_WIF} ${FILE_S} ${READONLY_CID} ${EMPTY} ${EMPTY} - ${S_OID_SYS_SN} = Put object ${NEOFS_SN_WIF} ${FILE_S} ${READONLY_CID} ${EMPTY} ${EMPTY} + ... Put object ${OTHER_KEY} ${FILE_S} ${READONLY_CID} ${EMPTY} ${EMPTY} + ${S_OID_SYS_IR} = Put Object ${NEOFS_IR_WIF} ${FILE_S} ${READONLY_CID} ${EMPTY} ${EMPTY} + ${S_OID_SYS_SN} = Put object ${NEOFS_SN_WIF} ${FILE_S} ${READONLY_CID} ${EMPTY} ${EMPTY} # Storage group Operations (Put, List, Get, Delete) @@ -64,53 +63,54 @@ Check Read-Only Container Run Keyword And Expect Error * ... Delete Storagegroup ${OTHER_KEY} ${READONLY_CID} ${SG_OID_INV} ${EMPTY} - Run Keyword And Expect Error * - ... Put Storagegroup ${NEOFS_IR_WIF} ${READONLY_CID} ${EMPTY} ${S_OID_USER} - List Storagegroup ${NEOFS_IR_WIF} ${READONLY_CID} ${EMPTY} ${SG_OID_INV} + ${SG_OID_IR} = Put Storagegroup ${NEOFS_IR_WIF} ${READONLY_CID} ${EMPTY} ${S_OID_USER} + List Storagegroup ${NEOFS_IR_WIF} ${READONLY_CID} ${EMPTY} ${SG_OID_INV} ${SG_OID_IR} @{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 ${NEOFS_IR_WIF} ${READONLY_CID} ${SG_OID_INV} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS} + Get Storagegroup ${NEOFS_IR_WIF} ${READONLY_CID} ${SG_OID_IR} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS} Run Keyword And Expect Error * - ... Delete Storagegroup ${NEOFS_IR_WIF} ${READONLY_CID} ${SG_OID_INV} ${EMPTY} + ... Delete Storagegroup ${NEOFS_IR_WIF} ${READONLY_CID} ${SG_OID_IR} ${EMPTY} # Get - Get object ${USER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} s_file_read - Get object ${OTHER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} s_file_read - Get object ${NEOFS_IR_WIF} ${READONLY_CID} ${S_OID_USER} ${EMPTY} s_file_read - Get object ${NEOFS_SN_WIF} ${READONLY_CID} ${S_OID_USER} ${EMPTY} s_file_read + Get object ${USER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} s_file_read + Get Object ${OTHER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} s_file_read + Get Object ${NEOFS_IR_WIF} ${READONLY_CID} ${S_OID_USER} ${EMPTY} s_file_read + Get Object ${NEOFS_SN_WIF} ${READONLY_CID} ${S_OID_USER} ${EMPTY} s_file_read # Get Range - Get Range ${USER_KEY} ${READONLY_CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 - Get Range ${OTHER_KEY} ${READONLY_CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 - Get Range ${NEOFS_IR_WIF} ${READONLY_CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 - Get Range ${NEOFS_SN_WIF} ${READONLY_CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + Get Range ${USER_KEY} ${READONLY_CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + Get Range ${OTHER_KEY} ${READONLY_CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + Run Keyword And Expect Error * + ... Get Range ${NEOFS_IR_WIF} ${READONLY_CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + Run Keyword And Expect Error * + ... Get Range ${NEOFS_SN_WIF} ${READONLY_CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 # Get Range Hash - Get Range Hash ${USER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} 0:256 - Get Range Hash ${OTHER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} 0:256 - Get Range Hash ${NEOFS_IR_WIF} ${READONLY_CID} ${S_OID_USER} ${EMPTY} 0:256 - Get Range Hash ${NEOFS_SN_WIF} ${READONLY_CID} ${S_OID_USER} ${EMPTY} 0:256 + Get Range hash ${USER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} 0:256 + Get Range hash ${OTHER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} 0:256 + Get Range hash ${NEOFS_IR_WIF} ${READONLY_CID} ${S_OID_USER} ${EMPTY} 0:256 + Get Range hash ${NEOFS_SN_WIF} ${READONLY_CID} ${S_OID_USER} ${EMPTY} 0:256 # Search - @{S_OBJ_RO} = Create List ${S_OID_USER} ${S_OID_SYS_SN} - Search object ${USER_KEY} ${READONLY_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_RO} - Search object ${OTHER_KEY} ${READONLY_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_RO} - Search object ${NEOFS_IR_WIF} ${READONLY_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_RO} - Search object ${NEOFS_SN_WIF} ${READONLY_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_RO} + @{S_OBJ_RO} = Create List ${S_OID_USER} ${S_OID_SYS_SN} ${S_OID_SYS_IR} + Search Object ${USER_KEY} ${READONLY_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_RO} + Search Object ${OTHER_KEY} ${READONLY_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_RO} + Search Object ${NEOFS_IR_WIF} ${READONLY_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_RO} + Search Object ${NEOFS_SN_WIF} ${READONLY_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_RO} # Head - Head object ${USER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} ${EMPTY} - Head object ${OTHER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} ${EMPTY} - Head object ${NEOFS_IR_WIF} ${READONLY_CID} ${S_OID_USER} ${EMPTY} ${EMPTY} - Head object ${NEOFS_SN_WIF} ${READONLY_CID} ${S_OID_USER} ${EMPTY} ${EMPTY} + Head Object ${USER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} ${EMPTY} + Head Object ${OTHER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} ${EMPTY} + Head Object ${NEOFS_IR_WIF} ${READONLY_CID} ${S_OID_USER} ${EMPTY} ${EMPTY} + Head Object ${NEOFS_SN_WIF} ${READONLY_CID} ${S_OID_USER} ${EMPTY} ${EMPTY} # Delete - Run Keyword And Expect Error * - ... Delete object ${OTHER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} - Run Keyword And Expect Error * - ... Delete object ${NEOFS_IR_WIF} ${READONLY_CID} ${S_OID_USER} ${EMPTY} - Run Keyword And Expect Error * - ... Delete object ${NEOFS_SN_WIF} ${READONLY_CID} ${S_OID_USER} ${EMPTY} - Delete object ${USER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} + Run Keyword And Expect Error * + ... Delete object ${OTHER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} + Run Keyword And Expect Error * + ... Delete object ${NEOFS_IR_WIF} ${READONLY_CID} ${S_OID_USER} ${EMPTY} + Run Keyword And Expect Error * + ... Delete object ${NEOFS_SN_WIF} ${READONLY_CID} ${S_OID_USER} ${EMPTY} + Delete Object ${USER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} diff --git a/robot/testsuites/integration/acl/acl_basic_readonly_container_storagegroup.robot b/robot/testsuites/integration/acl/acl_basic_readonly_container_storagegroup.robot index 1d4c9064..051c0f05 100644 --- a/robot/testsuites/integration/acl/acl_basic_readonly_container_storagegroup.robot +++ b/robot/testsuites/integration/acl/acl_basic_readonly_container_storagegroup.robot @@ -39,7 +39,7 @@ Check Read-Only Container [Arguments] ${RUN_TYPE} ${USER_KEY} ${FILE_S} ${READONLY_CID} ${OTHER_KEY} # Put target object to use in storage groups - ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${READONLY_CID} ${EMPTY} ${EMPTY} + ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${READONLY_CID} ${EMPTY} ${EMPTY} # Storage group Operations (Put, List, Get, Delete) for Read-only container @@ -62,11 +62,10 @@ Check Read-Only Container ... Delete Storagegroup ${OTHER_KEY} ${READONLY_CID} ${SG_OID_INV} ${EMPTY} - Run Keyword And Expect Error * - ... Put Storagegroup ${NEOFS_IR_WIF} ${READONLY_CID} ${EMPTY} ${S_OID_USER} - List Storagegroup ${NEOFS_IR_WIF} ${READONLY_CID} ${EMPTY} ${SG_OID_INV} + ${SG_OID_IR} = Put Storagegroup ${NEOFS_IR_WIF} ${READONLY_CID} ${EMPTY} ${S_OID_USER} + List Storagegroup ${NEOFS_IR_WIF} ${READONLY_CID} ${EMPTY} ${SG_OID_INV} ${SG_OID_IR} @{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 ${NEOFS_IR_WIF} ${READONLY_CID} ${SG_OID_INV} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS} + Get Storagegroup ${NEOFS_IR_WIF} ${READONLY_CID} ${SG_OID_IR} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS} Run Keyword And Expect Error * ... Delete Storagegroup ${NEOFS_IR_WIF} ${READONLY_CID} ${SG_OID_INV} ${EMPTY} diff --git a/robot/testsuites/integration/acl/acl_bearer_compound.robot b/robot/testsuites/integration/acl/acl_bearer_compound.robot index b60f6921..9b906e4c 100644 --- a/robot/testsuites/integration/acl/acl_bearer_compound.robot +++ b/robot/testsuites/integration/acl/acl_bearer_compound.robot @@ -16,48 +16,48 @@ ${SYSTEM_KEY} = ${NEOFS_IR_WIF} *** Test cases *** BearerToken Operations for Сompound Operations - [Documentation] Testcase to validate NeoFS operations with BearerToken for Сompound Operations. - [Tags] ACL NeoFSCLI BearerToken - [Timeout] 20 min + [Documentation] Testcase to validate NeoFS operations with BearerToken for Сompound Operations. + [Tags] ACL NeoFSCLI BearerToken + [Timeout] 20 min - [Setup] Setup + [Setup] Setup ${WALLET} ${ADDR} ${USER_KEY} = Prepare Wallet And Deposit ${WALLET_OTH} ${ADDR_OTH} ${OTHER_KEY} = Prepare Wallet And Deposit - Prepare eACL Role rules + Prepare eACL Role rules - Log Check Bearer token with simple object - ${FILE_S} = Generate file ${SIMPLE_OBJ_SIZE} - Check Сompound Operations ${USER_KEY} ${OTHER_KEY} ${FILE_S} + Log Check Bearer token with simple object + ${FILE_S} = Generate file ${SIMPLE_OBJ_SIZE} + Check Сompound Operations ${USER_KEY} ${OTHER_KEY} ${FILE_S} - Log Check Bearer token with complex object - ${FILE_S} = Generate file ${COMPLEX_OBJ_SIZE} - Check Сompound Operations ${USER_KEY} ${OTHER_KEY} ${FILE_S} + Log Check Bearer token with complex object + ${FILE_S} = Generate file ${COMPLEX_OBJ_SIZE} + Check Сompound Operations ${USER_KEY} ${OTHER_KEY} ${FILE_S} - [Teardown] Teardown acl_bearer_compound + [Teardown] Teardown acl_bearer_compound *** Keywords *** Check Сompound Operations [Arguments] ${USER_KEY} ${OTHER_KEY} ${FILE_S} - Check Bearer Сompound Get ${OTHER_KEY} OTHERS ${EACL_DENY_ALL_OTHERS} ${FILE_S} ${USER_KEY} - Check Bearer Сompound Get ${USER_KEY} USER ${EACL_DENY_ALL_USER} ${FILE_S} ${USER_KEY} - Check Bearer Сompound Get ${SYSTEM_KEY} SYSTEM ${EACL_DENY_ALL_SYSTEM} ${FILE_S} ${USER_KEY} + Check Bearer Сompound Get ${OTHER_KEY} OTHERS ${EACL_DENY_ALL_OTHERS} ${FILE_S} ${USER_KEY} + Check Bearer Сompound Get ${USER_KEY} USER ${EACL_DENY_ALL_USER} ${FILE_S} ${USER_KEY} + Check Bearer Сompound Get ${SYSTEM_KEY} SYSTEM ${EACL_DENY_ALL_SYSTEM} ${FILE_S} ${USER_KEY} - Check Bearer Сompound Delete ${OTHER_KEY} OTHERS ${EACL_DENY_ALL_OTHERS} ${FILE_S} ${USER_KEY} - Check Bearer Сompound Delete ${USER_KEY} USER ${EACL_DENY_ALL_USER} ${FILE_S} ${USER_KEY} - Check Bearer Сompound Delete ${SYSTEM_KEY} SYSTEM ${EACL_DENY_ALL_SYSTEM} ${FILE_S} ${USER_KEY} + Check Bearer Сompound Delete ${OTHER_KEY} OTHERS ${EACL_DENY_ALL_OTHERS} ${FILE_S} ${USER_KEY} + Check Bearer Сompound Delete ${USER_KEY} USER ${EACL_DENY_ALL_USER} ${FILE_S} ${USER_KEY} + Check Bearer Сompound Delete ${SYSTEM_KEY} SYSTEM ${EACL_DENY_ALL_SYSTEM} ${FILE_S} ${USER_KEY} - Check Bearer Сompound Get Range Hash ${OTHER_KEY} OTHERS ${EACL_DENY_ALL_OTHERS} ${FILE_S} ${USER_KEY} - Check Bearer Сompound Get Range Hash ${USER_KEY} USER ${EACL_DENY_ALL_USER} ${FILE_S} ${USER_KEY} - Check Bearer Сompound Get Range Hash ${SYSTEM_KEY} SYSTEM ${EACL_DENY_ALL_SYSTEM} ${FILE_S} ${USER_KEY} + Check Bearer Сompound Get Range Hash ${OTHER_KEY} OTHERS ${EACL_DENY_ALL_OTHERS} ${FILE_S} ${USER_KEY} + Check Bearer Сompound Get Range Hash ${USER_KEY} USER ${EACL_DENY_ALL_USER} ${FILE_S} ${USER_KEY} + Check Bearer Сompound Get Range Hash ${SYSTEM_KEY} SYSTEM ${EACL_DENY_ALL_SYSTEM} ${FILE_S} ${USER_KEY} Check Bearer Сompound Get - [Arguments] ${KEY} ${DENY_GROUP} ${DENY_EACL} ${FILE_S} ${USER_KEY} + [Arguments] ${KEY} ${DENY_GROUP} ${DENY_EACL} ${FILE_S} ${USER_KEY} - ${CID} = Create Container Public ${USER_KEY} - ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} - @{S_OBJ_H} = Create List ${S_OID_USER} + ${CID} = Create Container Public ${USER_KEY} + ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} + @{S_OBJ_H} = Create List ${S_OID_USER} ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} @@ -77,18 +77,28 @@ Check Bearer Сompound Get ... Head object ${KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} Get object ${KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} local_file_eacl - Get Range ${KEY} ${CID} ${S_OID_USER} s_get_range ${EACL_TOKEN} 0:256 + IF "${KEY}" == "${NEOFS_IR_WIF}" + Run Keyword And Expect Error * + ... Get Range ${KEY} ${CID} ${S_OID_USER} s_get_range ${EACL_TOKEN} 0:256 + ELSE + Get Range ${KEY} ${CID} ${S_OID_USER} s_get_range ${EACL_TOKEN} 0:256 + END Get Range Hash ${KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} 0:256 Check Bearer Сompound Delete - [Arguments] ${KEY} ${DENY_GROUP} ${DENY_EACL} ${FILE_S} ${USER_KEY} + [Arguments] ${KEY} ${DENY_GROUP} ${DENY_EACL} ${FILE_S} ${USER_KEY} - ${CID} = Create Container Public ${USER_KEY} + ${CID} = Create Container Public ${USER_KEY} ${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} ${EMPTY} Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} - Delete object ${KEY} ${CID} ${D_OID_USER} ${EMPTY} + IF "${KEY}" == "${NEOFS_IR_WIF}" + Run Keyword And Expect Error * + ... Delete object ${KEY} ${CID} ${D_OID_USER} ${EMPTY} + ELSE + Delete object ${KEY} ${CID} ${D_OID_USER} ${EMPTY} + END Set eACL ${USER_KEY} ${CID} ${DENY_EACL} @@ -106,18 +116,18 @@ Check Bearer Сompound Delete Run Keyword And Expect Error * ... Put object ${KEY} ${FILE_S} ${CID} ${EACL_TOKEN} ${FILE_OTH_HEADER} - Delete object ${KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} + Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} Check Bearer Сompound Get Range Hash - [Arguments] ${KEY} ${DENY_GROUP} ${DENY_EACL} ${FILE_S} ${USER_KEY} + [Arguments] ${KEY} ${DENY_GROUP} ${DENY_EACL} ${FILE_S} ${USER_KEY} - ${CID} = Create Container Public ${USER_KEY} + ${CID} = Create Container Public ${USER_KEY} - ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} - Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} - Get Range Hash ${NEOFS_SN_WIF} ${CID} ${S_OID_USER} ${EMPTY} 0:256 + ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} + Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} + Get Range Hash ${NEOFS_SN_WIF} ${CID} ${S_OID_USER} ${EMPTY} 0:256 Set eACL ${USER_KEY} ${CID} ${DENY_EACL} # The current ACL cache lifetime is 30 sec 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 9e46579d..2344f2c3 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 @@ -43,7 +43,7 @@ Check eACL Deny and Allow All Bearer Filter Requst NotEqual ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${EMPTY} ${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} - @{S_OBJ_H} = Create List ${S_OID_USER} + @{S_OBJ_H} = Create List ${S_OID_USER} Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl diff --git a/robot/testsuites/integration/acl/acl_extended_actions_system.robot b/robot/testsuites/integration/acl/acl_extended_actions_system.robot index 2308d4a7..a57c3748 100644 --- a/robot/testsuites/integration/acl/acl_extended_actions_system.robot +++ b/robot/testsuites/integration/acl/acl_extended_actions_system.robot @@ -44,7 +44,7 @@ Check eACL Deny and Allow All System ${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} + @{S_OBJ_H} = Create List ${S_OID_USER} Put object ${NEOFS_IR_WIF} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} Put object ${NEOFS_SN_WIF} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} @@ -57,15 +57,19 @@ Check eACL Deny and Allow All System Head object ${NEOFS_IR_WIF} ${CID} ${S_OID_USER} ${EMPTY} Head object ${NEOFS_SN_WIF} ${CID} ${S_OID_USER} ${EMPTY} - - Get Range ${NEOFS_IR_WIF} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 - Get Range ${NEOFS_SN_WIF} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + + Run Keyword And Expect Error * + ... Get Range ${NEOFS_IR_WIF} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + Run Keyword And Expect Error * + ... Get Range ${NEOFS_SN_WIF} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 Get Range Hash ${NEOFS_IR_WIF} ${CID} ${S_OID_USER} ${EMPTY} 0:256 Get Range Hash ${NEOFS_SN_WIF} ${CID} ${S_OID_USER} ${EMPTY} 0:256 - Delete object ${NEOFS_IR_WIF} ${CID} ${D_OID_USER_S} ${EMPTY} - Delete object ${NEOFS_SN_WIF} ${CID} ${D_OID_USER_SN} ${EMPTY} + Run Keyword And Expect Error * + ... Delete object ${NEOFS_IR_WIF} ${CID} ${D_OID_USER_S} ${EMPTY} + Run Keyword And Expect Error * + ... Delete object ${NEOFS_SN_WIF} ${CID} ${D_OID_USER_SN} ${EMPTY} Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_SYSTEM} @@ -116,6 +120,9 @@ Check eACL Deny and Allow All System # The current ACL cache lifetime is 30 sec Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} + Delete object ${USER_KEY} ${CID} ${D_OID_USER_S} ${EMPTY} + Delete object ${USER_KEY} ${CID} ${D_OID_USER_SN} ${EMPTY} + ${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} @@ -131,11 +138,15 @@ Check eACL Deny and Allow All System Head object ${NEOFS_IR_WIF} ${CID} ${S_OID_USER} ${EMPTY} Head object ${NEOFS_SN_WIF} ${CID} ${S_OID_USER} ${EMPTY} - Get Range ${NEOFS_IR_WIF} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 - Get Range ${NEOFS_SN_WIF} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + Run Keyword And Expect Error * + ... Get Range ${NEOFS_IR_WIF} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + Run Keyword And Expect Error * + ... Get Range ${NEOFS_SN_WIF} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 Get Range Hash ${NEOFS_IR_WIF} ${CID} ${S_OID_USER} ${EMPTY} 0:256 Get Range Hash ${NEOFS_SN_WIF} ${CID} ${S_OID_USER} ${EMPTY} 0:256 - Delete object ${NEOFS_IR_WIF} ${CID} ${D_OID_USER_S} ${EMPTY} - Delete object ${NEOFS_SN_WIF} ${CID} ${D_OID_USER_SN} ${EMPTY} + Run Keyword And Expect Error * + ... Delete object ${NEOFS_IR_WIF} ${CID} ${D_OID_USER_S} ${EMPTY} + Run Keyword And Expect Error * + ... Delete object ${NEOFS_SN_WIF} ${CID} ${D_OID_USER_SN} ${EMPTY} diff --git a/robot/testsuites/integration/acl/acl_extended_compound.robot b/robot/testsuites/integration/acl/acl_extended_compound.robot index 4fbcc04c..191a3533 100644 --- a/robot/testsuites/integration/acl/acl_extended_compound.robot +++ b/robot/testsuites/integration/acl/acl_extended_compound.robot @@ -72,7 +72,12 @@ Check eACL Сompound Get ... Head object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl - Get Range ${KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + IF "${KEY}" == "${NEOFS_IR_WIF}" + Run Keyword And Expect Error * + ... Get Range ${KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + ELSE + Get Range ${KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 + END Get Range Hash ${KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 @@ -84,7 +89,12 @@ Check eACL Сompound Delete ${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} ${EMPTY} Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} - Delete object ${KEY} ${CID} ${D_OID_USER} ${EMPTY} + IF "${KEY}" == "${NEOFS_IR_WIF}" + Run Keyword And Expect Error * + ... Delete object ${KEY} ${CID} ${D_OID_USER} ${EMPTY} + ELSE + Delete object ${KEY} ${CID} ${D_OID_USER} ${EMPTY} + END Set eACL ${USER_KEY} ${CID} ${DENY_EACL} @@ -95,8 +105,12 @@ Check eACL Сompound Delete ... Head object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} Run Keyword And Expect Error * ... Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} - - Delete object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} + IF "${KEY}" == "${NEOFS_IR_WIF}" + Run Keyword And Expect Error * + ... Delete object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} + ELSE + Delete object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} + END diff --git a/robot/testsuites/integration/acl/acl_extended_deny_replication.robot b/robot/testsuites/integration/acl/acl_extended_deny_replication.robot index 348ed0c7..d6184e3b 100644 --- a/robot/testsuites/integration/acl/acl_extended_deny_replication.robot +++ b/robot/testsuites/integration/acl/acl_extended_deny_replication.robot @@ -37,7 +37,7 @@ eACL Deny Replication Operations ${FILE} = Generate file of bytes ${SIMPLE_OBJ_SIZE} - ${CID} = Create container ${WIF_USER} 0x0FFFFFFF ${FULL_PLACEMENT_RULE} + ${CID} = Create container ${WIF_USER} ${PUBLIC_ACL} ${FULL_PLACEMENT_RULE} Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL} ... Container Existing ${WIF_USER} ${CID} diff --git a/robot/testsuites/integration/acl/acl_extended_filters.robot b/robot/testsuites/integration/acl/acl_extended_filters.robot index 8fa2c223..276ecc7d 100644 --- a/robot/testsuites/integration/acl/acl_extended_filters.robot +++ b/robot/testsuites/integration/acl/acl_extended_filters.robot @@ -5,6 +5,7 @@ Library acl.py Library neofs.py Library payment_neogo.py Library Collections +Library contract_keywords.py Resource common_steps_acl_extended.robot Resource payment_operations.robot @@ -56,7 +57,7 @@ Check eACL MatchType String Equal Request Deny Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${PATH} - ${ID_value} = Get From Dictionary ${HEADER_DICT} ID + ${ID_value} = Get From Dictionary ${HEADER_DICT} ID Set eACL ${USER_KEY} ${CID} ${EACL_XHEADER_DENY_ALL} @@ -95,16 +96,16 @@ Check eACL MatchType String Equal Request Allow [Arguments] ${USER_KEY} ${OTHER_KEY} ${CID} = Create Container Public ${USER_KEY} - ${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} json_output=True + ${HEADER} = Head Object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} json_output=True &{HEADER_DICT} = Decode Object System Header Json ${HEADER} - Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${PATH} + Get Object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${PATH} - ${ID_value} = Get From Dictionary ${HEADER_DICT} ID + ${ID_value} = Get From Dictionary ${HEADER_DICT} ID - Set eACL ${USER_KEY} ${CID} ${EACL_XHEADER_ALLOW_ALL} + Set eACL ${USER_KEY} ${CID} ${EACL_XHEADER_ALLOW_ALL} # The current ACL cache lifetime is 30 sec Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} @@ -149,7 +150,7 @@ Check eACL MatchType String Equal Object Log Set eACL for Deny GET operation with StringEqual Object ID - ${ID_value} = Get From Dictionary ${HEADER_DICT} ID + ${ID_value} = Get From dictionary ${HEADER_DICT} ID ${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} @@ -194,7 +195,7 @@ Check eACL MatchType String Not Equal Object Get object ${OTHER_KEY} ${CID} ${S_OID_OTHER} ${EMPTY} ${PATH} Log Set eACL for Deny GET operation with StringNotEqual Object ID - ${ID_value} = Get From Dictionary ${HEADER_DICT} ID + ${ID_value} = Get From Dictionary ${HEADER_DICT} ID ${filters} = Create Dictionary headerType=OBJECT matchType=STRING_NOT_EQUAL key=$Object:objectID value=${ID_value} ${rule1} = Create Dictionary Operation=GET Access=DENY Role=OTHERS Filters=${filters} diff --git a/robot/testsuites/integration/acl/object_attributes/creation_epoch_filter.robot b/robot/testsuites/integration/acl/object_attributes/creation_epoch_filter.robot index b57547b4..dfccb983 100644 --- a/robot/testsuites/integration/acl/object_attributes/creation_epoch_filter.robot +++ b/robot/testsuites/integration/acl/object_attributes/creation_epoch_filter.robot @@ -51,7 +51,6 @@ Check $Object:creationEpoch Filter with MatchType String Not Equal ${EACL_CUSTOM} = Compose eACL Custom ${HEADER_DICT} STRING_NOT_EQUAL ${FILTER} DENY OTHERS Set eACL ${USER_KEY} ${CID} ${EACL_CUSTOM} - Run Keyword And Expect Error ${EACL_ERR_MSG} ... Get object ${OTHER_KEY} ${CID} ${S_OID} ${EMPTY} ${OBJECT_PATH} Get object ${OTHER_KEY} ${CID} ${S_OID_NEW} ${EMPTY} ${OBJECT_PATH} diff --git a/robot/testsuites/integration/acl/object_attributes/payload_length_filter.robot b/robot/testsuites/integration/acl/object_attributes/payload_length_filter.robot index 5ab53b17..442843fe 100644 --- a/robot/testsuites/integration/acl/object_attributes/payload_length_filter.robot +++ b/robot/testsuites/integration/acl/object_attributes/payload_length_filter.robot @@ -49,7 +49,6 @@ Check $Object:payloadLength Filter with MatchType String Not Equal &{HEADER_DICT} = Object Header Decoded ${USER_KEY} ${CID} ${S_OID} ${EACL_CUSTOM} = Compose eACL Custom ${HEADER_DICT} STRING_NOT_EQUAL ${FILTER} DENY OTHERS Set eACL ${USER_KEY} ${CID} ${EACL_CUSTOM} - Run Keyword And Expect Error ${EACL_ERR_MSG} ... Get object ${OTHER_KEY} ${CID} ${S_OID_0} ${EMPTY} ${OBJECT_PATH} diff --git a/robot/testsuites/integration/container/container_delete.robot b/robot/testsuites/integration/container/container_delete.robot index 4fe0aaa3..a1c71b28 100644 --- a/robot/testsuites/integration/container/container_delete.robot +++ b/robot/testsuites/integration/container/container_delete.robot @@ -5,6 +5,7 @@ Variables wellknown_acl.py Library neofs.py Library payment_neogo.py Library wallet_keywords.py +Library contract_keywords.py Resource setup_teardown.robot Resource payment_operations.robot @@ -14,28 +15,32 @@ ${CONTAINER_WAIT_INTERVAL} = 1 min *** Test Cases *** Delete Containers - [Documentation] Testcase to check if containers can be deleted. - [Tags] Container NeoFS NeoCLI - [Timeout] 10 min + [Documentation] Testcase to check if containers can be deleted. + [Tags] Container NeoFS NeoCLI + [Timeout] 10 min - [Setup] Setup + [Setup] Setup - ${WALLET} ${ADDR} ${USER_KEY} = Init Wallet with Address ${ASSETS_DIR} - Payment Operations ${ADDR} ${USER_KEY} - ${WALLET_OTH} ${ADDR_OTH} ${OTHER_KEY} = Init Wallet with Address ${ASSETS_DIR} - Payment Operations ${ADDR_OTH} ${OTHER_KEY} + ${WALLET} ${ADDR} ${USER_KEY} = Prepare Wallet And Deposit + ${WALLET_OTH} ${ADDR_OTH} ${OTHER_KEY} = Prepare Wallet And Deposit - ${CID} = Create container ${USER_KEY} ${PUBLIC_ACL} ${COMMON_PLACEMENT_RULE} - Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL} - ... Container Existing ${USER_KEY} ${CID} + ${CID} = Create container ${USER_KEY} ${PRIVATE_ACL_F} ${COMMON_PLACEMENT_RULE} + Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL} + ... Container Existing ${USER_KEY} ${CID} - Run Keyword And Expect Error * - ... Delete Container ${CID} ${OTHER_KEY} + ################################################################ + # No explicit error is expected upon container deletion attempt + ################################################################ + Delete Container ${CID} ${OTHER_KEY} + Tick Epoch + Get container attributes ${USER_KEY} ${CID} - Delete Container ${CID} ${USER_KEY} + Delete Container ${CID} ${USER_KEY} + Tick Epoch + Run Keyword And Expect Error * + ... Get container attributes ${USER_KEY} ${CID} - ${EXPECTED_ERROR} = Run Keyword And Expect Error * - ... Delete Container ${CID} ${USER_KEY} - Log Container cannot be deleted: ${EXPECTED_ERROR} + Log If one tries to delete an already deleted container, they should expect success. + Delete Container ${CID} ${USER_KEY} [Teardown] Teardown container_delete diff --git a/robot/testsuites/integration/container/container_session_token.robot b/robot/testsuites/integration/container/container_session_token.robot index 725e7a7b..8528438d 100644 --- a/robot/testsuites/integration/container/container_session_token.robot +++ b/robot/testsuites/integration/container/container_session_token.robot @@ -32,7 +32,7 @@ Session Token for Container Sign Session token ${SESSION_TOKEN} ${WALLET} ${SIGNED_FILE} - ${CID} = Create Container ${GEN_KEY} ${PRIVATE_ACL} ${COMMON_PLACEMENT_RULE} ${EMPTY} ${SIGNED_FILE} + ${CID} = Create Container ${GEN_KEY} ${PRIVATE_ACL_F} ${COMMON_PLACEMENT_RULE} ${EMPTY} ${SIGNED_FILE} Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL} ... Container Existing ${OWNER_KEY} ${CID} Run Keyword And Expect Error * diff --git a/robot/testsuites/integration/network/netmap_control_drop.robot b/robot/testsuites/integration/network/netmap_control_drop.robot index ad1a02e7..6f16f41d 100644 --- a/robot/testsuites/integration/network/netmap_control_drop.robot +++ b/robot/testsuites/integration/network/netmap_control_drop.robot @@ -30,10 +30,9 @@ Drop command in control group ${FILE_SIMPLE} = Generate file of bytes ${SIMPLE_OBJ_SIZE} ${FILE_COMPLEX} = Generate file of bytes ${COMPLEX_OBJ_SIZE} - ${WALLET} ${ADDR} ${USER_KEY} = Init Wallet with Address ${ASSETS_DIR} - Payment Operations ${ADDR} ${USER_KEY} + ${WALLET} ${ADDR} ${USER_KEY} = Prepare Wallet And Deposit - ${PRIV_CID} = Create container ${USER_KEY} ${PRIVATE_ACL} REP 1 CBF 1 SELECT 1 FROM * FILTER 'UN-LOCODE' EQ '${LOCODE}' AS LOC + ${PRIV_CID} = Create container ${USER_KEY} ${PRIVATE_ACL_F} REP 1 CBF 1 SELECT 1 FROM * FILTER 'UN-LOCODE' EQ '${LOCODE}' AS LOC Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL} ... Container Existing ${USER_KEY} ${PRIV_CID} @@ -43,15 +42,16 @@ Drop command in control group ${S_OID} = Put object ${USER_KEY} ${FILE_SIMPLE} ${PRIV_CID} ${EMPTY} ${EMPTY} Get object ${USER_KEY} ${PRIV_CID} ${S_OID} ${EMPTY} s_file_read - Head object ${NEOFS_IR_WIF} ${PRIV_CID} ${S_OID} ${EMPTY} ${EMPTY} + Head object ${USER_KEY} ${PRIV_CID} ${S_OID} ${EMPTY} ${EMPTY} Drop object ${NODE} ${WIF} ${PRIV_CID} ${S_OID} Wait Until Keyword Succeeds 3x ${SHARD_0_GC_SLEEP} ... Run Keyword And Expect Error Error:* - ... Get object ${USER_KEY} ${PRIV_CID} ${S_OID} ${EMPTY} s_file_read options='--ttl 1' - Run Keyword And Expect Error Error:* - ... Head object ${NEOFS_IR_WIF} ${PRIV_CID} ${S_OID} ${EMPTY} ${EMPTY} + ... Get object ${USER_KEY} ${PRIV_CID} ${S_OID} ${EMPTY} s_file_read options=--ttl 1 + Wait Until Keyword Succeeds 3x ${SHARD_0_GC_SLEEP} + ... Run Keyword And Expect Error Error:* + ... Head object ${USER_KEY} ${PRIV_CID} ${S_OID} ${EMPTY} ${EMPTY} options=--ttl 1 Drop object ${NODE} ${WIF} ${PRIV_CID} ${S_OID} @@ -61,12 +61,12 @@ Drop command in control group ${C_OID} = Put object ${USER_KEY} ${FILE_COMPLEX} ${PRIV_CID} ${EMPTY} ${EMPTY} Get object ${USER_KEY} ${PRIV_CID} ${C_OID} ${EMPTY} s_file_read - Head object ${NEOFS_IR_WIF} ${PRIV_CID} ${C_OID} ${EMPTY} ${EMPTY} + Head object ${USER_KEY} ${PRIV_CID} ${C_OID} ${EMPTY} ${EMPTY} Drop object ${NODE} ${WIF} ${PRIV_CID} ${C_OID} Get object ${USER_KEY} ${PRIV_CID} ${C_OID} ${EMPTY} s_file_read - Head object ${NEOFS_IR_WIF} ${PRIV_CID} ${C_OID} ${EMPTY} ${EMPTY} + Head object ${USER_KEY} ${PRIV_CID} ${C_OID} ${EMPTY} ${EMPTY} @{SPLIT_OIDS} = Get Split objects ${USER_KEY} ${PRIV_CID} ${C_OID} FOR ${CHILD_OID} IN @{SPLIT_OIDS} @@ -76,9 +76,10 @@ Drop command in control group Wait Until Keyword Succeeds 3x ${SHARD_0_GC_SLEEP} ... Run Keyword And Expect Error Error:* - ... Get object ${USER_KEY} ${PRIV_CID} ${C_OID} ${EMPTY} s_file_read options='--ttl 1' - Run Keyword And Expect Error Error:* - ... Head object ${NEOFS_IR_WIF} ${PRIV_CID} ${C_OID} ${EMPTY} ${EMPTY} + ... Get object ${USER_KEY} ${PRIV_CID} ${C_OID} ${EMPTY} s_file_read options=--ttl 1 + Wait Until Keyword Succeeds 3x ${SHARD_0_GC_SLEEP} + ... Run Keyword And Expect Error Error:* + ... Head object ${USER_KEY} ${PRIV_CID} ${C_OID} ${EMPTY} ${EMPTY} options=--ttl 1 [Teardown] Teardown netmap_control_drop diff --git a/robot/testsuites/integration/object/object_attributes.robot b/robot/testsuites/integration/object/object_attributes.robot index 34090e20..71f52428 100644 --- a/robot/testsuites/integration/object/object_attributes.robot +++ b/robot/testsuites/integration/object/object_attributes.robot @@ -29,7 +29,7 @@ Duplicated Object Attributes ${WALLET} ${ADDR} ${USER_KEY} = Init Wallet with Address ${ASSETS_DIR} Payment Operations ${ADDR} ${USER_KEY} - ${PUBLIC_CID} = Create container ${USER_KEY} ${PUBLIC_ACL} ${POLICY} ${EMPTY} + ${PUBLIC_CID} = Create container ${USER_KEY} ${PUBLIC_ACL_F} ${POLICY} ${EMPTY} ${FILE_S} = Generate file of bytes ${SIMPLE_OBJ_SIZE} diff --git a/robot/testsuites/integration/object/object_complex.robot b/robot/testsuites/integration/object/object_complex.robot index e868f4e6..0592650b 100644 --- a/robot/testsuites/integration/object/object_complex.robot +++ b/robot/testsuites/integration/object/object_complex.robot @@ -20,9 +20,8 @@ NeoFS Complex Object Operations [Setup] Setup - ${WALLET} ${ADDR} ${WIF} = Init Wallet with Address ${ASSETS_DIR} - Payment Operations ${ADDR} ${WIF} - Prepare container ${WIF} + ${WALLET} ${ADDR} ${WIF} = Prepare Wallet And Deposit + ${CID} = Prepare container ${WIF} ${FILE} = Generate file of bytes ${COMPLEX_OBJ_SIZE} ${FILE_HASH} = Get file hash ${FILE} @@ -37,11 +36,11 @@ NeoFS Complex Object Operations Validate storage policy for object ${WIF} 2 ${CID} ${H_OID} Validate storage policy for object ${WIF} 2 ${CID} ${H_OID_OTH} - @{S_OBJ_ALL} = Create List ${S_OID} ${H_OID} ${H_OID_OTH} - @{S_OBJ_H} = Create List ${H_OID} - @{S_OBJ_H_OTH} = Create List ${H_OID_OTH} + @{S_OBJ_ALL} = Create List ${S_OID} ${H_OID} ${H_OID_OTH} + @{S_OBJ_H} = Create List ${H_OID} + @{S_OBJ_H_OTH} = Create List ${H_OID_OTH} - Search object ${WIF} ${CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_ALL} + Search Object ${WIF} ${CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_ALL} ${GET_OBJ_S} = Get object ${WIF} ${CID} ${S_OID} ${EMPTY} s_file_read ${GET_OBJ_H} = Get object ${WIF} ${CID} ${H_OID} ${EMPTY} h_file_read diff --git a/robot/testsuites/integration/object/object_expiration.robot b/robot/testsuites/integration/object/object_expiration.robot index 0377c81c..1794cd7e 100644 --- a/robot/testsuites/integration/object/object_expiration.robot +++ b/robot/testsuites/integration/object/object_expiration.robot @@ -22,7 +22,7 @@ NeoFS Simple Object Operations ${WALLET} ${ADDR} ${WIF} = Init Wallet with Address ${ASSETS_DIR} Payment Operations ${ADDR} ${WIF} - Prepare container ${WIF} + ${CID} = Prepare container ${WIF} ${FILE} = Generate file of bytes ${SIMPLE_OBJ_SIZE} ${FILE_HASH} = Get file hash ${FILE} diff --git a/robot/testsuites/integration/object/object_simple.robot b/robot/testsuites/integration/object/object_simple.robot index bb11d87f..b6528413 100644 --- a/robot/testsuites/integration/object/object_simple.robot +++ b/robot/testsuites/integration/object/object_simple.robot @@ -22,7 +22,7 @@ NeoFS Simple Object Operations ${WALLET} ${ADDR} ${WIF} = Init Wallet with Address ${ASSETS_DIR} Payment Operations ${ADDR} ${WIF} - Prepare container ${WIF} + ${CID} = Prepare container ${WIF} ${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 5bcdd448..20c1eeeb 100644 --- a/robot/testsuites/integration/object/object_storagegroup_complex.robot +++ b/robot/testsuites/integration/object/object_storagegroup_complex.robot @@ -19,7 +19,7 @@ NeoFS Complex Storagegroup ${WALLET} ${ADDR} ${WIF} = Init Wallet with Address ${ASSETS_DIR} Payment Operations ${ADDR} ${WIF} - Prepare container ${WIF} + ${CID} = Prepare container ${WIF} ${FILE_S} = Generate file of bytes ${COMPLEX_OBJ_SIZE} ${FILE_HASH_S} = Get file hash ${FILE_S} diff --git a/robot/testsuites/integration/object/object_storagegroup_simple.robot b/robot/testsuites/integration/object/object_storagegroup_simple.robot index fc7c262c..dd0de121 100644 --- a/robot/testsuites/integration/object/object_storagegroup_simple.robot +++ b/robot/testsuites/integration/object/object_storagegroup_simple.robot @@ -19,7 +19,7 @@ NeoFS Simple Storagegroup ${WALLET} ${ADDR} ${WIF} = Init Wallet with Address ${ASSETS_DIR} Payment Operations ${ADDR} ${WIF} - Prepare container ${WIF} + ${CID} = Prepare container ${WIF} ${FILE_S} = Generate file of bytes ${SIMPLE_OBJ_SIZE} ${FILE_HASH_S} = Get file hash ${FILE_S} diff --git a/robot/testsuites/integration/services/http_gate.robot b/robot/testsuites/integration/services/http_gate.robot index 5c1885c5..52a5ea31 100644 --- a/robot/testsuites/integration/services/http_gate.robot +++ b/robot/testsuites/integration/services/http_gate.robot @@ -1,5 +1,6 @@ *** Settings *** Variables common.py +Variables wellknown_acl.py Library neofs.py Library payment_neogo.py @@ -7,6 +8,7 @@ Library gates.py Library wallet_keywords.py Library rpc_call_keywords.py +Resource payment_operations.robot Resource setup_teardown.robot *** Variables *** @@ -22,20 +24,10 @@ NeoFS HTTP Gateway [Timeout] 5 min [Setup] Setup - ${WALLET} ${ADDR} ${WIF} = Init Wallet with Address ${ASSETS_DIR} - ${TX} = Transfer Mainnet Gas ${MAINNET_WALLET_WIF} ${ADDR} ${TRANSFER_AMOUNT} + + ${WALLET} ${ADDR} ${WIF} = Prepare Wallet And Deposit - Wait Until Keyword Succeeds ${MAINNET_TIMEOUT} ${MAINNET_BLOCK_TIME} - ... Transaction accepted in block ${TX} - - ${MAINNET_BALANCE} = Get Mainnet Balance ${ADDR} - Should Be Equal As Numbers ${MAINNET_BALANCE} ${TRANSFER_AMOUNT} - - ${TX_DEPOSIT} = NeoFS Deposit ${WIF} ${DEPOSIT_AMOUNT} - Wait Until Keyword Succeeds ${MAINNET_TIMEOUT} ${MAINNET_BLOCK_TIME} - ... Transaction accepted in block ${TX_DEPOSIT} - - ${CID} = Create container ${WIF} 0x0FFFFFFF ${PLACEMENT_RULE} + ${CID} = Create container ${WIF} ${PUBLIC_ACL} ${PLACEMENT_RULE} Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL} ... Container Existing ${WIF} ${CID} diff --git a/robot/testsuites/integration/services/s3_gate_bucket.robot b/robot/testsuites/integration/services/s3_gate_bucket.robot index 1636efa3..25b85c51 100644 --- a/robot/testsuites/integration/services/s3_gate_bucket.robot +++ b/robot/testsuites/integration/services/s3_gate_bucket.robot @@ -7,12 +7,14 @@ Library payment_neogo.py Library gates.py Library wallet_keywords.py Library contract_keywords.py +Library Process Resource setup_teardown.robot +Resource payment_operations.robot *** Variables *** -${DEPOSIT_AMOUNT} = ${5} -${WIF} = ${MAINNET_WALLET_WIF} +${DEPOSIT} = ${30} +${WIF} = ${MAINNET_WALLET_WIF} ${DEPOSIT_TIMEOUT}= 30s *** Test cases *** @@ -22,11 +24,7 @@ Buckets in NeoFS S3 Gateway [Setup] Setup - ${WALLET} ${ADDR} = Init Wallet from WIF ${ASSETS_DIR} ${WIF} - ${TX_DEPOSIT} = NeoFS Deposit ${WIF} ${DEPOSIT_AMOUNT} - Wait Until Keyword Succeeds ${DEPOSIT_TIMEOUT} ${MAINNET_BLOCK_TIME} - ... Transaction accepted in block ${TX_DEPOSIT} - + ${WALLET} ${ADDR} ${WIF} = Prepare Wallet And Deposit ${FILE_S3} = Generate file of bytes ${COMPLEX_OBJ_SIZE} ${FILE_S3_NAME} = Get file name ${FILE_S3} @@ -68,5 +66,3 @@ Buckets in NeoFS S3 Gateway List Should Not Contain Value ${BUCKET_LIST} ${NEW_BUCKET_EMPTY} [Teardown] Teardown s3_gate_bucket - - diff --git a/robot/variables/wellknown_acl.py b/robot/variables/wellknown_acl.py index 92c75791..256851ed 100644 --- a/robot/variables/wellknown_acl.py +++ b/robot/variables/wellknown_acl.py @@ -1,5 +1,9 @@ -PUBLIC_ACL = "0x1FFFFFFF" -PRIVATE_ACL = "0x18888888" -READONLY_ACL = "0x1FFF88FF" +# ACLs with set F flag +PUBLIC_ACL_F = "0x1FBFBFFF" +PRIVATE_ACL_F = "0x1C8C8CCC" +READONLY_ACL_F = "0x1FBF8CFF" + +# ACLs without F flag set +PUBLIC_ACL = "0x0FBFBFFF" INACCESSIBLE_ACL = "0x40000000" STICKYBIT_PUB_ACL = "0x3FFFFFFF"