2021-04-26 17:48:43 +00:00
|
|
|
*** Settings ***
|
|
|
|
Variables ../../../variables/common.py
|
|
|
|
|
2021-09-27 20:41:21 +00:00
|
|
|
Library acl.py
|
|
|
|
|
2021-02-08 05:05:17 +00:00
|
|
|
*** Variables ***
|
|
|
|
${FILE_USR_HEADER} = key1=1,key2=abc
|
|
|
|
${FILE_USR_HEADER_DEL} = key1=del,key2=del
|
|
|
|
${FILE_OTH_HEADER} = key1=oth,key2=oth
|
2021-08-31 15:16:19 +00:00
|
|
|
${CONTAINER_WAIT_INTERVAL} = 1 min
|
2021-02-08 05:05:17 +00:00
|
|
|
|
|
|
|
*** Keywords ***
|
|
|
|
|
|
|
|
Create Container Public
|
2021-09-08 17:31:52 +00:00
|
|
|
[Arguments] ${USER_KEY}
|
2021-02-08 05:05:17 +00:00
|
|
|
Log Create Public Container
|
2021-08-24 11:13:36 +00:00
|
|
|
${PUBLIC_CID_GEN} = Create container ${USER_KEY} 0x4FFFFFFF ${COMMON_PLACEMENT_RULE}
|
2021-08-31 15:16:19 +00:00
|
|
|
Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL}
|
|
|
|
... Container Existing ${USER_KEY} ${PUBLIC_CID_GEN}
|
2021-02-08 05:05:17 +00:00
|
|
|
[Return] ${PUBLIC_CID_GEN}
|
2021-04-26 17:48:43 +00:00
|
|
|
|
|
|
|
|
2021-02-08 05:05:17 +00:00
|
|
|
Generate files
|
|
|
|
[Arguments] ${SIZE}
|
2021-09-27 20:41:21 +00:00
|
|
|
|
2021-02-08 05:05:17 +00:00
|
|
|
${FILE_S_GEN_1} = Generate file of bytes ${SIZE}
|
|
|
|
${FILE_S_GEN_2} = Generate file of bytes ${SIZE}
|
|
|
|
Set Global Variable ${FILE_S} ${FILE_S_GEN_1}
|
|
|
|
Set Global Variable ${FILE_S_2} ${FILE_S_GEN_2}
|
2021-04-26 17:48:43 +00:00
|
|
|
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2021-04-02 14:29:41 +00:00
|
|
|
|
|
|
|
Check eACL Deny and Allow All
|
2021-09-08 17:31:52 +00:00
|
|
|
[Arguments] ${KEY} ${DENY_EACL} ${ALLOW_EACL} ${USER_KEY}
|
2021-04-02 14:29:41 +00:00
|
|
|
|
2021-09-08 17:31:52 +00:00
|
|
|
${CID} = Create Container Public ${USER_KEY}
|
2021-04-26 17:48:43 +00:00
|
|
|
${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}
|
2021-08-31 15:16:19 +00:00
|
|
|
@{S_OBJ_H} = Create List ${S_OID_USER}
|
2021-04-02 14:29:41 +00:00
|
|
|
|
2021-04-26 17:48:43 +00:00
|
|
|
Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
|
|
|
|
|
2021-04-02 14:29:41 +00:00
|
|
|
Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
2021-04-26 17:48:43 +00:00
|
|
|
Search object ${KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
|
|
|
|
Head object ${KEY} ${CID} ${S_OID_USER} ${EMPTY}
|
|
|
|
|
2021-04-02 14:29:41 +00:00
|
|
|
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}
|
|
|
|
|
2021-06-24 13:51:59 +00:00
|
|
|
Set eACL ${USER_KEY} ${CID} ${DENY_EACL}
|
2021-04-02 14:29:41 +00:00
|
|
|
|
|
|
|
# The current ACL cache lifetime is 30 sec
|
|
|
|
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
|
|
|
|
|
|
Run Keyword And Expect Error *
|
2021-04-26 17:48:43 +00:00
|
|
|
... Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
|
2021-04-02 14:29:41 +00:00
|
|
|
Run Keyword And Expect Error *
|
|
|
|
... Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
|
|
Run Keyword And Expect Error *
|
2021-04-26 17:48:43 +00:00
|
|
|
... Search object ${KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
|
2021-04-02 14:29:41 +00:00
|
|
|
Run Keyword And Expect Error *
|
2021-04-26 17:48:43 +00:00
|
|
|
... Head object ${KEY} ${CID} ${S_OID_USER} ${EMPTY}
|
2021-04-02 14:29:41 +00:00
|
|
|
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}
|
|
|
|
|
2021-06-24 13:51:59 +00:00
|
|
|
Set eACL ${USER_KEY} ${CID} ${ALLOW_EACL}
|
2021-04-02 14:29:41 +00:00
|
|
|
|
|
|
|
# The current ACL cache lifetime is 30 sec
|
|
|
|
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
2021-04-26 17:48:43 +00:00
|
|
|
|
|
|
|
Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
|
2021-04-02 14:29:41 +00:00
|
|
|
Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
2021-04-26 17:48:43 +00:00
|
|
|
Search object ${KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
|
|
|
|
Head object ${KEY} ${CID} ${S_OID_USER} ${EMPTY}
|
2021-04-02 14:29:41 +00:00
|
|
|
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}
|
|
|
|
|