2021-02-08 05:05:17 +00:00
|
|
|
*** Settings ***
|
2021-12-09 10:58:51 +00:00
|
|
|
Variables common.py
|
|
|
|
|
|
|
|
Library neofs.py
|
2022-03-15 11:58:59 +00:00
|
|
|
Library neofs_verbs.py
|
2021-12-09 10:58:51 +00:00
|
|
|
Library payment_neogo.py
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2021-06-01 12:07:31 +00:00
|
|
|
Resource common_steps_acl_basic.robot
|
2021-12-09 10:58:51 +00:00
|
|
|
Resource payment_operations.robot
|
|
|
|
Resource setup_teardown.robot
|
2022-04-07 18:48:03 +00:00
|
|
|
Resource complex_object_operations.robot
|
2021-02-08 05:05:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
*** Test cases ***
|
|
|
|
Basic ACL Operations for Read-Only Container
|
|
|
|
[Documentation] Testcase to validate NeoFS operations with ACL for Read-Only Container.
|
2022-03-15 11:58:59 +00:00
|
|
|
[Tags] ACL
|
2021-02-08 05:05:17 +00:00
|
|
|
[Timeout] 20 min
|
|
|
|
|
2021-06-01 12:07:31 +00:00
|
|
|
[Setup] Setup
|
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
|
|
|
${READONLY_CID} = Create Read-Only Container ${WALLET}
|
2022-03-15 11:58:59 +00:00
|
|
|
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
2022-02-01 13:42:41 +00:00
|
|
|
Check Read-Only Container Simple ${WALLET} ${FILE_S} ${READONLY_CID} ${WALLET_OTH}
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
${READONLY_CID} = Create Read-Only Container ${WALLET}
|
2022-03-15 11:58:59 +00:00
|
|
|
${FILE_S} ${_} = Generate file ${COMPLEX_OBJ_SIZE}
|
2022-02-01 13:42:41 +00:00
|
|
|
Check Read-Only Container Complex ${WALLET} ${FILE_S} ${READONLY_CID} ${WALLET_OTH}
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2021-06-01 12:07:31 +00:00
|
|
|
[Teardown] Teardown acl_basic_readonly_container
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-02-08 05:05:17 +00:00
|
|
|
|
|
|
|
*** Keywords ***
|
|
|
|
|
|
|
|
Check Read-Only Container
|
2022-02-01 13:42:41 +00:00
|
|
|
[Arguments] ${RUN_TYPE} ${USER_WALLET} ${FILE_S} ${READONLY_CID} ${WALLET_OTH}
|
|
|
|
|
|
|
|
${WALLET_SN} ${ADDR_SN} = Prepare Wallet with WIF And Deposit ${NEOFS_SN_WIF}
|
|
|
|
${WALLET_IR} ${ADDR_IR} = Prepare Wallet with WIF And Deposit ${NEOFS_IR_WIF}
|
2021-02-08 05:05:17 +00:00
|
|
|
|
|
|
|
# Put
|
2022-02-01 13:42:41 +00:00
|
|
|
${S_OID_USER} = Put Object ${USER_WALLET} ${FILE_S} ${READONLY_CID}
|
2021-02-08 05:05:17 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Put object ${WALLET_OTH} ${FILE_S} ${READONLY_CID}
|
|
|
|
${S_OID_SYS_IR} = Put Object ${WALLET_IR} ${FILE_S} ${READONLY_CID}
|
|
|
|
${S_OID_SYS_SN} = Put object ${WALLET_SN} ${FILE_S} ${READONLY_CID}
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2021-02-16 11:56:52 +00:00
|
|
|
|
|
|
|
# Storage group Operations (Put, List, Get, Delete)
|
2022-02-01 13:42:41 +00:00
|
|
|
${SG_OID_INV} = Put Storagegroup ${USER_WALLET} ${READONLY_CID} ${EMPTY} ${S_OID_USER}
|
|
|
|
${SG_OID_1} = Put Storagegroup ${USER_WALLET} ${READONLY_CID} ${EMPTY} ${S_OID_USER}
|
|
|
|
List Storagegroup ${USER_WALLET} ${READONLY_CID} ${EMPTY} ${SG_OID_1} ${SG_OID_INV}
|
2022-04-07 18:48:03 +00:00
|
|
|
@{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex"
|
2022-02-01 13:42:41 +00:00
|
|
|
... Get Object Parts By Link Object ${USER_WALLET} ${READONLY_CID} ${S_OID_USER}
|
2022-04-07 18:48:03 +00:00
|
|
|
... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER}
|
2022-02-01 13:42:41 +00:00
|
|
|
Get Storagegroup ${USER_WALLET} ${READONLY_CID} ${SG_OID_1} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS}
|
|
|
|
Delete Storagegroup ${USER_WALLET} ${READONLY_CID} ${SG_OID_1} ${EMPTY}
|
2021-02-16 11:56:52 +00:00
|
|
|
|
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Put Storagegroup ${WALLET_OTH} ${READONLY_CID} ${EMPTY} ${S_OID_USER}
|
|
|
|
List Storagegroup ${WALLET_OTH} ${READONLY_CID} ${EMPTY} ${SG_OID_INV}
|
2022-04-07 18:48:03 +00:00
|
|
|
@{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex"
|
2022-02-01 13:42:41 +00:00
|
|
|
... Get Object Parts By Link Object ${USER_WALLET} ${READONLY_CID} ${S_OID_USER}
|
2022-04-07 18:48:03 +00:00
|
|
|
... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER}
|
2022-02-01 13:42:41 +00:00
|
|
|
Get Storagegroup ${WALLET_OTH} ${READONLY_CID} ${SG_OID_INV} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS}
|
2021-02-16 11:56:52 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Delete Storagegroup ${WALLET_OTH} ${READONLY_CID} ${SG_OID_INV} ${EMPTY}
|
2021-02-16 11:56:52 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
${SG_OID_IR} = Put Storagegroup ${WALLET_IR} ${READONLY_CID} ${EMPTY} ${S_OID_USER}
|
|
|
|
List Storagegroup ${WALLET_IR} ${READONLY_CID} ${EMPTY} ${SG_OID_INV} ${SG_OID_IR}
|
2022-04-07 18:48:03 +00:00
|
|
|
@{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex"
|
2022-02-01 13:42:41 +00:00
|
|
|
... Get Object Parts By Link Object ${USER_WALLET} ${READONLY_CID} ${S_OID_USER}
|
2022-04-07 18:48:03 +00:00
|
|
|
... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER}
|
2022-02-01 13:42:41 +00:00
|
|
|
Get Storagegroup ${WALLET_IR} ${READONLY_CID} ${SG_OID_IR} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS}
|
2021-02-16 11:56:52 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Delete Storagegroup ${WALLET_IR} ${READONLY_CID} ${SG_OID_IR} ${EMPTY}
|
2021-02-16 11:56:52 +00:00
|
|
|
|
2021-02-08 05:05:17 +00:00
|
|
|
# Get
|
2022-02-01 13:42:41 +00:00
|
|
|
Get object ${USER_WALLET} ${READONLY_CID} ${S_OID_USER} ${EMPTY} s_file_read
|
|
|
|
Get Object ${WALLET_OTH} ${READONLY_CID} ${S_OID_USER} ${EMPTY} s_file_read
|
|
|
|
Get Object ${WALLET_IR} ${READONLY_CID} ${S_OID_USER} ${EMPTY} s_file_read
|
|
|
|
Get Object ${WALLET_SN} ${READONLY_CID} ${S_OID_USER} ${EMPTY} s_file_read
|
2021-02-08 05:05:17 +00:00
|
|
|
|
|
|
|
# Get Range
|
2022-02-01 13:42:41 +00:00
|
|
|
Get Range ${USER_WALLET} ${READONLY_CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
|
|
|
|
Get Range ${WALLET_OTH} ${READONLY_CID} ${S_OID_USER} s_get_range ${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 ${WALLET_IR} ${READONLY_CID} ${S_OID_USER} s_get_range ${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 ${WALLET_SN} ${READONLY_CID} ${S_OID_USER} s_get_range ${EMPTY} 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} ${READONLY_CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
|
|
Get Range hash ${WALLET_OTH} ${READONLY_CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
|
|
Get Range hash ${WALLET_IR} ${READONLY_CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
|
|
Get Range hash ${WALLET_SN} ${READONLY_CID} ${S_OID_USER} ${EMPTY} 0:256
|
2021-02-08 05:05:17 +00:00
|
|
|
|
|
|
|
# Search
|
2021-12-16 06:51:26 +00:00
|
|
|
@{S_OBJ_RO} = Create List ${S_OID_USER} ${S_OID_SYS_SN} ${S_OID_SYS_IR}
|
2022-02-01 13:42:41 +00:00
|
|
|
Search Object ${USER_WALLET} ${READONLY_CID} keys=--root expected_objects_list=${S_OBJ_RO}
|
|
|
|
Search Object ${WALLET_OTH} ${READONLY_CID} keys=--root expected_objects_list=${S_OBJ_RO}
|
|
|
|
Search Object ${WALLET_IR} ${READONLY_CID} keys=--root expected_objects_list=${S_OBJ_RO}
|
|
|
|
Search Object ${WALLET_SN} ${READONLY_CID} keys=--root expected_objects_list=${S_OBJ_RO}
|
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} ${READONLY_CID} ${S_OID_USER}
|
|
|
|
Head Object ${WALLET_OTH} ${READONLY_CID} ${S_OID_USER}
|
|
|
|
Head Object ${WALLET_IR} ${READONLY_CID} ${S_OID_USER}
|
|
|
|
Head Object ${WALLET_SN} ${READONLY_CID} ${S_OID_USER}
|
2021-02-08 05:05:17 +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} ${READONLY_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
|
|
|
... Delete object ${WALLET_IR} ${READONLY_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
|
|
|
... Delete object ${WALLET_SN} ${READONLY_CID} ${S_OID_USER}
|
|
|
|
Delete Object ${USER_WALLET} ${READONLY_CID} ${S_OID_USER}
|