2021-02-08 05:05:17 +00:00
|
|
|
*** Settings ***
|
2021-12-09 10:58:51 +00:00
|
|
|
Variables common.py
|
2021-09-08 17:31:52 +00:00
|
|
|
|
2022-05-19 10:54:07 +00:00
|
|
|
Library acl.py
|
|
|
|
Library container.py
|
2022-03-15 11:58:59 +00:00
|
|
|
Library neofs_verbs.py
|
2022-05-20 11:15:25 +00:00
|
|
|
Library utility_keywords.py
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2021-06-24 13:51:59 +00:00
|
|
|
Resource common_steps_acl_extended.robot
|
2021-12-09 10:58:51 +00:00
|
|
|
Resource payment_operations.robot
|
|
|
|
Resource setup_teardown.robot
|
|
|
|
Resource eacl_tables.robot
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2021-06-30 21:18:37 +00:00
|
|
|
*** Variables ***
|
2022-03-15 11:58:59 +00:00
|
|
|
&{USER_HEADER} = key1=1 key2=abc
|
|
|
|
&{ANOTHER_HEADER} = key1=oth key2=oth
|
2022-06-13 20:33:09 +00:00
|
|
|
${DEPOSIT} = ${30}
|
2021-06-30 21:18:37 +00:00
|
|
|
|
2021-02-08 05:05:17 +00:00
|
|
|
|
|
|
|
*** Test cases ***
|
|
|
|
Extended ACL Operations
|
|
|
|
[Documentation] Testcase to validate NeoFS operations with extended ACL.
|
2022-03-15 11:58:59 +00:00
|
|
|
[Tags] ACL eACL
|
2021-02-08 05:05:17 +00:00
|
|
|
[Timeout] 20 min
|
|
|
|
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
|
|
${WALLET_OTH} ${_} ${_} = Prepare Wallet And Deposit
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
Log Check extended ACL with simple object
|
2022-05-20 11:15:25 +00:00
|
|
|
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
2022-05-19 10:54:07 +00:00
|
|
|
Check Сompound Operations ${WALLET} ${WALLET_OTH} ${FILE_S}
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
Log Check extended ACL with complex object
|
2022-05-20 11:15:25 +00:00
|
|
|
${FILE_S} ${_} = Generate file ${COMPLEX_OBJ_SIZE}
|
2022-02-01 13:42:41 +00:00
|
|
|
Check Сompound Operations ${WALLET} ${WALLET_OTH} ${FILE_S}
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2021-04-26 10:30:40 +00:00
|
|
|
|
|
|
|
|
2021-02-08 05:05:17 +00:00
|
|
|
*** Keywords ***
|
|
|
|
|
|
|
|
|
2021-04-26 10:30:40 +00:00
|
|
|
Check Сompound Operations
|
2022-02-01 13:42:41 +00:00
|
|
|
[Arguments] ${WALLET} ${WALLET_OTH} ${FILE_S}
|
|
|
|
|
2022-06-13 20:33:09 +00:00
|
|
|
Transfer Mainnet Gas ${IR_WALLET_PATH} ${DEPOSIT + 1} wallet_password=${IR_WALLET_PASS}
|
|
|
|
NeoFS Deposit ${IR_WALLET_PATH} ${DEPOSIT} wallet_password=${IR_WALLET_PASS}
|
2022-02-01 13:42:41 +00:00
|
|
|
|
2022-06-13 20:33:09 +00:00
|
|
|
Check eACL Сompound Get ${WALLET_OTH} ${EACL_COMPOUND_GET_OTHERS} ${FILE_S} ${WALLET}
|
|
|
|
Check eACL Сompound Get ${WALLET} ${EACL_COMPOUND_GET_USER} ${FILE_S} ${WALLET}
|
|
|
|
#Check eACL Сompound Get ${IR_WALLET_PATH} ${EACL_COMPOUND_GET_SYSTEM} ${FILE_S} ${WALLET}
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2022-06-13 20:33:09 +00:00
|
|
|
Check eACL Сompound Delete ${WALLET_OTH} ${EACL_COMPOUND_DELETE_OTHERS} ${FILE_S} ${WALLET}
|
|
|
|
Check eACL Сompound Delete ${WALLET} ${EACL_COMPOUND_DELETE_USER} ${FILE_S} ${WALLET}
|
|
|
|
#Check eACL Сompound Delete ${IR_WALLET_PATH} ${EACL_COMPOUND_DELETE_SYSTEM} ${FILE_S} ${WALLET}
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2022-06-13 20:33:09 +00:00
|
|
|
Check eACL Сompound Get Range Hash ${WALLET_OTH} ${EACL_COMPOUND_GET_HASH_OTHERS} ${FILE_S} ${WALLET}
|
|
|
|
Check eACL Сompound Get Range Hash ${WALLET} ${EACL_COMPOUND_GET_HASH_USER} ${FILE_S} ${WALLET}
|
|
|
|
#Check eACL Сompound Get Range Hash ${IR_WALLET_PATH} ${EACL_COMPOUND_GET_HASH_SYSTEM} ${FILE_S} ${WALLET}
|
2021-02-08 05:05:17 +00:00
|
|
|
|
|
|
|
Check eACL Сompound Get
|
2022-06-13 20:33:09 +00:00
|
|
|
[Arguments] ${WALLET} ${DENY_EACL} ${FILE_S} ${USER_WALLET}
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2022-05-19 10:54:07 +00:00
|
|
|
${CID} = Create Container ${USER_WALLET} basic_acl=eacl-public-read-write
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
${S_OID_USER} = Put object ${USER_WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
|
|
Put object ${WALLET} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
|
|
|
|
Get object ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
|
|
Set eACL ${USER_WALLET} ${CID} ${DENY_EACL}
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-04-02 14:29:41 +00:00
|
|
|
# The current ACL cache lifetime is 30 sec
|
|
|
|
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
|
|
|
2021-02-08 05:05:17 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Head object ${WALLET} ${CID} ${S_OID_USER}
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
Get object ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
2022-06-13 20:33:09 +00:00
|
|
|
IF "${WALLET}" == "${IR_WALLET_PATH}"
|
2021-12-16 06:51:26 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-08-02 15:47:10 +00:00
|
|
|
... Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256
|
2021-12-16 06:51:26 +00:00
|
|
|
ELSE
|
2022-08-02 15:47:10 +00:00
|
|
|
Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256
|
2021-12-16 06:51:26 +00:00
|
|
|
END
|
2022-02-01 13:42:41 +00:00
|
|
|
Get Range Hash ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|
2021-02-08 05:05:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
Check eACL Сompound Delete
|
2022-06-13 20:33:09 +00:00
|
|
|
[Arguments] ${WALLET} ${DENY_EACL} ${FILE_S} ${USER_WALLET}
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2022-05-19 10:54:07 +00:00
|
|
|
${CID} = Create Container ${USER_WALLET} basic_acl=eacl-public-read-write
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
${S_OID_USER} = Put object ${USER_WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
|
|
${D_OID_USER} = Put object ${USER_WALLET} ${FILE_S} ${CID}
|
|
|
|
Put object ${WALLET} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
|
2022-06-13 20:33:09 +00:00
|
|
|
IF "${WALLET}" == "${IR_WALLET_PATH}"
|
2021-12-16 06:51:26 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Delete object ${WALLET} ${CID} ${D_OID_USER}
|
2021-12-16 06:51:26 +00:00
|
|
|
ELSE
|
2022-02-01 13:42:41 +00:00
|
|
|
Delete object ${WALLET} ${CID} ${D_OID_USER}
|
2021-12-16 06:51:26 +00:00
|
|
|
END
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
Set eACL ${USER_WALLET} ${CID} ${DENY_EACL}
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-04-02 14:29:41 +00:00
|
|
|
# The current ACL cache lifetime is 30 sec
|
|
|
|
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
|
|
|
2021-02-08 05:05:17 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Head object ${WALLET} ${CID} ${S_OID_USER}
|
2021-02-08 05:05:17 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Put object ${WALLET} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
|
2022-06-13 20:33:09 +00:00
|
|
|
IF "${WALLET}" == "${IR_WALLET_PATH}"
|
2021-12-16 06:51:26 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Delete object ${WALLET} ${CID} ${S_OID_USER}
|
2021-12-16 06:51:26 +00:00
|
|
|
ELSE
|
2022-02-01 13:42:41 +00:00
|
|
|
Delete object ${WALLET} ${CID} ${S_OID_USER}
|
2021-12-16 06:51:26 +00:00
|
|
|
END
|
2021-02-08 05:05:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
Check eACL Сompound Get Range Hash
|
2022-06-13 20:33:09 +00:00
|
|
|
[Arguments] ${WALLET} ${DENY_EACL} ${FILE_S} ${USER_WALLET}
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2022-05-19 10:54:07 +00:00
|
|
|
${CID} = Create Container ${USER_WALLET} basic_acl=eacl-public-read-write
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
${S_OID_USER} = Put object ${USER_WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
|
|
Put object ${WALLET} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
|
2022-06-13 20:33:09 +00:00
|
|
|
Get Range Hash ${IR_WALLET_PATH} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
Set eACL ${USER_WALLET} ${CID} ${DENY_EACL}
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-04-02 14:29:41 +00:00
|
|
|
# The current ACL cache lifetime is 30 sec
|
|
|
|
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
|
|
|
2021-02-08 05:05:17 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-08-02 15:47:10 +00:00
|
|
|
... Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256
|
2021-02-08 05:05:17 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Get object ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
Get Range Hash ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|