2021-02-08 05:05:17 +00:00
|
|
|
*** Settings ***
|
2021-12-09 10:58:51 +00:00
|
|
|
Variables common.py
|
|
|
|
|
2022-05-17 10:25:15 +00:00
|
|
|
Library container.py
|
2022-03-15 11:58:59 +00:00
|
|
|
Library neofs_verbs.py
|
2022-05-19 11:10:00 +00:00
|
|
|
Library utility_keywords.py
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2021-12-09 10:58:51 +00:00
|
|
|
Resource payment_operations.robot
|
|
|
|
Resource setup_teardown.robot
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2022-06-13 20:33:09 +00:00
|
|
|
*** Variables ***
|
|
|
|
${DEPOSIT} = ${30}
|
2022-07-08 10:10:20 +00:00
|
|
|
${EACL_ERROR_MSG} = code = 2048 message = access to object operation denied
|
2021-02-08 05:05:17 +00:00
|
|
|
|
|
|
|
*** Test cases ***
|
|
|
|
Basic ACL Operations for Private Container
|
|
|
|
[Documentation] Testcase to validate NeoFS operations with ACL for Private Container.
|
2022-03-15 11:58:59 +00:00
|
|
|
[Tags] ACL
|
2021-02-08 05:05:17 +00:00
|
|
|
[Timeout] 20 min
|
|
|
|
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2022-06-13 20:33:09 +00:00
|
|
|
Check Private Container Simple
|
|
|
|
Check Private Container Complex
|
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 ***
|
|
|
|
|
|
|
|
Check Private Container
|
2022-06-13 20:33:09 +00:00
|
|
|
[Arguments] ${COMPLEXITY}
|
|
|
|
|
|
|
|
${FILE_S} ${_} = Run Keyword If """${COMPLEXITY}""" == """Simple"""
|
|
|
|
... Generate file ${SIMPLE_OBJ_SIZE}
|
|
|
|
... ELSE
|
|
|
|
... Generate file ${COMPLEX_OBJ_SIZE}
|
|
|
|
|
|
|
|
${USER_WALLET}
|
|
|
|
... ${_}
|
|
|
|
... ${_} = Prepare Wallet And Deposit
|
|
|
|
${WALLET_OTH}
|
|
|
|
... ${_}
|
|
|
|
... ${_} = Prepare Wallet And Deposit
|
|
|
|
|
|
|
|
${PRIV_CID} = Create Container ${USER_WALLET}
|
|
|
|
|
|
|
|
Transfer Mainnet Gas ${STORAGE_WALLET_PATH} ${DEPOSIT + 1}
|
|
|
|
NeoFS Deposit ${STORAGE_WALLET_PATH} ${DEPOSIT}
|
|
|
|
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
|
|
|
# Put
|
|
|
|
${S_OID_USER} = Put Object ${USER_WALLET} ${FILE_S} ${PRIV_CID}
|
|
|
|
Run Keyword And Expect Error *
|
|
|
|
... Put object ${WALLET_OTH} ${FILE_S} ${PRIV_CID}
|
2022-07-08 10:10:20 +00:00
|
|
|
${ERR} = Run Keyword And Expect Error *
|
|
|
|
... Put Object ${IR_WALLET_PATH} ${FILE_S} ${PRIV_CID} wallet_config=${IR_WALLET_CONFIG}
|
|
|
|
Should Contain ${ERR} ${EACL_ERROR_MSG}
|
2022-06-13 20:33:09 +00:00
|
|
|
${S_OID_SYS_SN} = Put Object ${STORAGE_WALLET_PATH} ${FILE_S} ${PRIV_CID}
|
2021-02-08 05:05:17 +00:00
|
|
|
|
|
|
|
# Get
|
2022-02-01 13:42:41 +00:00
|
|
|
Get Object ${USER_WALLET} ${PRIV_CID} ${S_OID_USER} ${EMPTY} s_file_read
|
|
|
|
Run Keyword And Expect Error *
|
|
|
|
... Get object ${WALLET_OTH} ${PRIV_CID} ${S_OID_USER} ${EMPTY} s_file_read
|
2022-06-13 20:33:09 +00:00
|
|
|
Get Object ${IR_WALLET_PATH} ${PRIV_CID} ${S_OID_USER} ${EMPTY} s_file_read wallet_config=${IR_WALLET_CONFIG}
|
|
|
|
Get Object ${STORAGE_WALLET_PATH} ${PRIV_CID} ${S_OID_USER} ${EMPTY} s_file_read
|
2021-02-08 05:05:17 +00:00
|
|
|
|
|
|
|
# Get Range
|
2022-08-02 15:47:10 +00:00
|
|
|
Get Range ${USER_WALLET} ${PRIV_CID} ${S_OID_USER} 0:256
|
2021-12-16 06:51:26 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-08-02 15:47:10 +00:00
|
|
|
... Get Range ${WALLET_OTH} ${PRIV_CID} ${S_OID_USER} 0:256
|
2021-12-16 06:51:26 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-08-02 15:47:10 +00:00
|
|
|
... Get Range ${IR_WALLET_PATH} ${PRIV_CID} ${S_OID_USER} 0:256 wallet_config=${IR_WALLET_CONFIG}
|
2021-12-16 06:51:26 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-08-02 15:47:10 +00:00
|
|
|
... Get Range ${STORAGE_WALLET_PATH} ${PRIV_CID} ${S_OID_USER} 0:256
|
2021-02-08 05:05:17 +00:00
|
|
|
|
|
|
|
# Get Range Hash
|
2022-02-01 13:42:41 +00:00
|
|
|
Get Range hash ${USER_WALLET} ${PRIV_CID} ${S_OID_USER} ${EMPTY} 0:256
|
2021-12-16 06:51:26 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Get Range Hash ${WALLET_OTH} ${PRIV_CID} ${S_OID_USER} ${EMPTY} 0:256
|
2022-06-13 20:33:09 +00:00
|
|
|
# TODO: always fails for complex object
|
|
|
|
#Get Range hash ${IR_WALLET_PATH} ${PRIV_CID} ${S_OID_USER} ${EMPTY} 0:256 wallet_config=${IR_WALLET_CONFIG}
|
|
|
|
Get Range hash ${STORAGE_WALLET_PATH} ${PRIV_CID} ${S_OID_USER} ${EMPTY} 0:256
|
2021-02-08 05:05:17 +00:00
|
|
|
|
|
|
|
# Search
|
2022-07-08 10:10:20 +00:00
|
|
|
@{S_OBJ_PRIV} = Create List ${S_OID_USER} ${S_OID_SYS_SN}
|
2022-02-01 13:42:41 +00:00
|
|
|
Search Object ${USER_WALLET} ${PRIV_CID} keys=--root expected_objects_list=${S_OBJ_PRIV}
|
2021-12-16 06:51:26 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Search object ${WALLET_OTH} ${PRIV_CID} keys=--root expected_objects_list=${S_OBJ_PRIV}
|
2022-06-13 20:33:09 +00:00
|
|
|
Search Object ${IR_WALLET_PATH} ${PRIV_CID} keys=--root expected_objects_list=${S_OBJ_PRIV} wallet_config=${IR_WALLET_CONFIG}
|
|
|
|
Search Object ${STORAGE_WALLET_PATH} ${PRIV_CID} keys=--root expected_objects_list=${S_OBJ_PRIV}
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-02-08 05:05:17 +00:00
|
|
|
# Head
|
2022-02-01 13:42:41 +00:00
|
|
|
Head Object ${USER_WALLET} ${PRIV_CID} ${S_OID_USER}
|
2021-12-16 06:51:26 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Head object ${WALLET_OTH} ${PRIV_CID} ${S_OID_USER}
|
2022-06-13 20:33:09 +00:00
|
|
|
Head Object ${IR_WALLET_PATH} ${PRIV_CID} ${S_OID_USER} wallet_config=${IR_WALLET_CONFIG}
|
|
|
|
Head Object ${STORAGE_WALLET_PATH} ${PRIV_CID} ${S_OID_USER}
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2021-04-26 10:30:40 +00:00
|
|
|
|
|
|
|
# Delete
|
2021-12-16 06:51:26 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Delete object ${WALLET_OTH} ${PRIV_CID} ${S_OID_USER}
|
2021-12-16 06:51:26 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-06-13 20:33:09 +00:00
|
|
|
... Delete object ${IR_WALLET_PATH} ${PRIV_CID} ${S_OID_USER} wallet_config=${IR_WALLET_CONFIG}
|
2021-12-16 06:51:26 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-06-13 20:33:09 +00:00
|
|
|
... Delete object ${STORAGE_WALLET_PATH} ${PRIV_CID} ${S_OID_USER}
|
2022-02-01 13:42:41 +00:00
|
|
|
Delete Object ${USER_WALLET} ${PRIV_CID} ${S_OID_USER}
|