2021-02-08 05:05:17 +00:00
|
|
|
*** Settings ***
|
2021-04-26 10:30:40 +00:00
|
|
|
Variables ../../../variables/common.py
|
2021-02-08 05:05:17 +00:00
|
|
|
Library ../${RESOURCES}/neofs.py
|
|
|
|
Library ../${RESOURCES}/payment_neogo.py
|
2021-04-26 10:30:40 +00:00
|
|
|
Library ../${RESOURCES}/utility_keywords.py
|
2021-02-08 05:05:17 +00:00
|
|
|
|
|
|
|
Resource common_steps_acl_basic.robot
|
|
|
|
|
|
|
|
|
|
|
|
*** Test cases ***
|
|
|
|
Basic ACL Operations for Read-Only Container
|
|
|
|
[Documentation] Testcase to validate NeoFS operations with ACL for Read-Only Container.
|
|
|
|
[Tags] ACL NeoFS NeoCLI
|
|
|
|
[Timeout] 20 min
|
|
|
|
|
2021-04-26 10:30:40 +00:00
|
|
|
[Setup] Create Temporary Directory
|
|
|
|
|
2021-02-08 05:05:17 +00:00
|
|
|
Generate Keys
|
|
|
|
|
|
|
|
Create Containers
|
2021-04-02 14:29:41 +00:00
|
|
|
Generate file ${SIMPLE_OBJ_SIZE}
|
2021-02-16 11:56:52 +00:00
|
|
|
Check Read-Only Container Simple
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-02-08 05:05:17 +00:00
|
|
|
Create Containers
|
2021-04-02 14:29:41 +00:00
|
|
|
Generate file ${COMPLEX_OBJ_SIZE}
|
2021-02-16 11:56:52 +00:00
|
|
|
Check Read-Only Container Complex
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2021-04-26 10:30:40 +00:00
|
|
|
[Teardown] Cleanup
|
|
|
|
|
2021-02-08 05:05:17 +00:00
|
|
|
|
|
|
|
*** Keywords ***
|
|
|
|
|
|
|
|
|
|
|
|
Check Read-Only Container
|
2021-02-16 11:56:52 +00:00
|
|
|
[Arguments] ${RUN_TYPE}
|
2021-02-08 05:05:17 +00:00
|
|
|
|
|
|
|
# Put
|
2021-02-10 18:53:26 +00:00
|
|
|
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${READONLY_CID} ${EMPTY} ${EMPTY}
|
2021-02-08 05:05:17 +00:00
|
|
|
Run Keyword And Expect Error *
|
2021-02-10 18:53:26 +00:00
|
|
|
... Put object ${OTHER_KEY} ${FILE_S} ${READONLY_CID} ${EMPTY} ${EMPTY}
|
2021-02-08 05:05:17 +00:00
|
|
|
Run Keyword And Expect Error *
|
2021-02-10 18:53:26 +00:00
|
|
|
... Put object ${SYSTEM_KEY_IR} ${FILE_S} ${READONLY_CID} ${EMPTY} ${EMPTY}
|
|
|
|
${S_OID_SYS_SN} = Put object ${SYSTEM_KEY_SN} ${FILE_S} ${READONLY_CID} ${EMPTY} ${EMPTY}
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2021-02-16 11:56:52 +00:00
|
|
|
|
|
|
|
# Storage group Operations (Put, List, Get, Delete)
|
|
|
|
${SG_OID_INV} = Put Storagegroup ${USER_KEY} ${READONLY_CID} ${EMPTY} ${S_OID_USER}
|
|
|
|
${SG_OID_1} = Put Storagegroup ${USER_KEY} ${READONLY_CID} ${EMPTY} ${S_OID_USER}
|
2021-04-02 14:29:41 +00:00
|
|
|
List Storagegroup ${USER_KEY} ${READONLY_CID} ${EMPTY} ${SG_OID_1} ${SG_OID_INV}
|
2021-02-16 11:56:52 +00:00
|
|
|
@{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${USER_KEY} ${READONLY_CID} ${S_OID_USER}
|
2021-04-26 10:30:40 +00:00
|
|
|
... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER}
|
2021-04-02 14:29:41 +00:00
|
|
|
Get Storagegroup ${USER_KEY} ${READONLY_CID} ${SG_OID_1} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS}
|
|
|
|
Delete Storagegroup ${USER_KEY} ${READONLY_CID} ${SG_OID_1} ${EMPTY}
|
2021-02-16 11:56:52 +00:00
|
|
|
|
|
|
|
Run Keyword And Expect Error *
|
|
|
|
... Put Storagegroup ${OTHER_KEY} ${READONLY_CID} ${EMPTY} ${S_OID_USER}
|
2021-04-02 14:29:41 +00:00
|
|
|
List Storagegroup ${OTHER_KEY} ${READONLY_CID} ${EMPTY} ${SG_OID_INV}
|
2021-02-16 11:56:52 +00:00
|
|
|
@{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${USER_KEY} ${READONLY_CID} ${S_OID_USER}
|
2021-04-26 10:30:40 +00:00
|
|
|
... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER}
|
2021-04-02 14:29:41 +00:00
|
|
|
Get Storagegroup ${OTHER_KEY} ${READONLY_CID} ${SG_OID_INV} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS}
|
2021-02-16 11:56:52 +00:00
|
|
|
Run Keyword And Expect Error *
|
2021-04-02 14:29:41 +00:00
|
|
|
... Delete Storagegroup ${OTHER_KEY} ${READONLY_CID} ${SG_OID_INV} ${EMPTY}
|
2021-02-16 11:56:52 +00:00
|
|
|
|
|
|
|
Run Keyword And Expect Error *
|
|
|
|
... Put Storagegroup ${SYSTEM_KEY_IR} ${READONLY_CID} ${EMPTY} ${S_OID_USER}
|
2021-04-02 14:29:41 +00:00
|
|
|
List Storagegroup ${SYSTEM_KEY_IR} ${READONLY_CID} ${EMPTY} ${SG_OID_INV}
|
2021-02-16 11:56:52 +00:00
|
|
|
@{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${USER_KEY} ${READONLY_CID} ${S_OID_USER}
|
2021-04-26 10:30:40 +00:00
|
|
|
... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER}
|
2021-04-02 14:29:41 +00:00
|
|
|
Get Storagegroup ${SYSTEM_KEY_IR} ${READONLY_CID} ${SG_OID_INV} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS}
|
2021-02-16 11:56:52 +00:00
|
|
|
Run Keyword And Expect Error *
|
2021-04-02 14:29:41 +00:00
|
|
|
... Delete Storagegroup ${SYSTEM_KEY_IR} ${READONLY_CID} ${SG_OID_INV} ${EMPTY}
|
2021-02-16 11:56:52 +00:00
|
|
|
|
2021-02-08 05:05:17 +00:00
|
|
|
# Get
|
2021-02-10 18:53:26 +00:00
|
|
|
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
|
2021-04-26 10:30:40 +00:00
|
|
|
Get object ${SYSTEM_KEY_IR} ${READONLY_CID} ${S_OID_USER} ${EMPTY} s_file_read
|
2021-02-10 18:53:26 +00:00
|
|
|
Get object ${SYSTEM_KEY_SN} ${READONLY_CID} ${S_OID_USER} ${EMPTY} s_file_read
|
2021-02-08 05:05:17 +00:00
|
|
|
|
|
|
|
# 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 ${SYSTEM_KEY_IR} ${READONLY_CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
|
|
|
|
Get Range ${SYSTEM_KEY_SN} ${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 ${SYSTEM_KEY_IR} ${READONLY_CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
|
|
Get Range Hash ${SYSTEM_KEY_SN} ${READONLY_CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
|
|
|
|
|
|
# Search
|
2021-04-26 10:30:40 +00:00
|
|
|
@{S_OBJ_RO} = Create List ${S_OID_USER} ${S_OID_SYS_SN}
|
2021-02-08 05:05:17 +00:00
|
|
|
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 ${SYSTEM_KEY_IR} ${READONLY_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_RO}
|
|
|
|
Search object ${SYSTEM_KEY_SN} ${READONLY_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_RO}
|
|
|
|
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-02-08 05:05:17 +00:00
|
|
|
# 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 ${SYSTEM_KEY_IR} ${READONLY_CID} ${S_OID_USER} ${EMPTY} ${EMPTY}
|
|
|
|
Head object ${SYSTEM_KEY_SN} ${READONLY_CID} ${S_OID_USER} ${EMPTY} ${EMPTY}
|
|
|
|
|
|
|
|
# Delete
|
2021-04-26 10:30:40 +00:00
|
|
|
Run Keyword And Expect Error *
|
2021-02-08 05:05:17 +00:00
|
|
|
... Delete object ${OTHER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY}
|
2021-04-26 10:30:40 +00:00
|
|
|
Run Keyword And Expect Error *
|
2021-02-08 05:05:17 +00:00
|
|
|
... Delete object ${SYSTEM_KEY_IR} ${READONLY_CID} ${S_OID_USER} ${EMPTY}
|
2021-04-26 10:30:40 +00:00
|
|
|
Run Keyword And Expect Error *
|
2021-02-08 05:05:17 +00:00
|
|
|
... Delete object ${SYSTEM_KEY_SN} ${READONLY_CID} ${S_OID_USER} ${EMPTY}
|
|
|
|
Delete object ${USER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Cleanup
|
2021-04-26 10:30:40 +00:00
|
|
|
Cleanup Files
|