diff --git a/robot/resources/lib/python_keywords/storage_group.py b/robot/resources/lib/python_keywords/storage_group.py index 0706ac70..d31e410f 100644 --- a/robot/resources/lib/python_keywords/storage_group.py +++ b/robot/resources/lib/python_keywords/storage_group.py @@ -32,7 +32,7 @@ def put_storagegroup(wallet: str, cid: str, objects: list, bearer_token: str = " cmd = ( f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} ' f'--wallet {wallet} --config {wallet_config} ' - f'storagegroup put --cid {cid} ' + f'storagegroup put --cid {cid} --lifetime 5 ' f'--members {",".join(objects)} ' f'{"--bearer " + bearer_token if bearer_token else ""}' ) diff --git a/robot/resources/lib/robot/storage_group.robot b/robot/resources/lib/robot/storage_group.robot index 1a1ff63c..802feed0 100644 --- a/robot/resources/lib/robot/storage_group.robot +++ b/robot/resources/lib/robot/storage_group.robot @@ -76,21 +76,26 @@ Run Storage Group Operations On Other's Behalf In RO Container Run Storage Group Operations On System's Behalf In RO Container - [Arguments] ${CID} ${OBJECTS} ${OBJ_COMPLEXITY} - [Documentation] ${CID}: ID of read-only container + [Arguments] ${OWNER_WALLET} ${CID} ${OBJECTS} ${OBJ_COMPLEXITY} + [Documentation] ${OWNER_WALLET} wallet of container owner + ... ${CID}: ID of read-only container ... ${OBJECTS}: list of Object IDs to include into the Storage Group ... ${OBJ_COMPLEXITY}: [Complex|Simple] ... - ... In this keyword we create Storage Group on Inner Ring's key behalf - ... and include an Object created on behalf of some user. We expect - ... that System key is granted to make all operations except DELETE. + ... We expect that System key is granted to make GET and LIST. Transfer Mainnet Gas ${IR_WALLET_PATH} ${DEPOSIT + 1} wallet_password=${IR_WALLET_PASS} NeoFS Deposit ${IR_WALLET_PATH} ${DEPOSIT} wallet_password=${IR_WALLET_PASS} - ${SG} = Put Storagegroup ${IR_WALLET_PATH} ${CID} ${OBJECTS} wallet_config=${IR_WALLET_CONFIG} + ${SG} = Put Storagegroup ${OWNER_WALLET} ${CID} ${OBJECTS} + + ${ERR} = Run Keyword And Expect Error * + ... Put Storagegroup ${IR_WALLET_PATH} ${CID} ${OBJECTS} wallet_config=${IR_WALLET_CONFIG} + Should Contain ${ERR} ${PERMISSION_ERROR} + Verify List Storage Group ${IR_WALLET_PATH} ${CID} ${SG} WALLET_CFG=${IR_WALLET_CONFIG} Verify Get Storage Group ${IR_WALLET_PATH} ${CID} ${SG} ${OBJECTS} ${OBJ_COMPLEXITY} WALLET_CFG=${IR_WALLET_CONFIG} + ${ERR} = Run Keyword And Expect Error * ... Delete Storagegroup ${IR_WALLET_PATH} ${CID} ${SG} wallet_config=${IR_WALLET_CONFIG} Should Contain ${ERR} ${PERMISSION_ERROR} diff --git a/robot/testsuites/integration/acl/storage_group/basic_private_container_sg.robot b/robot/testsuites/integration/acl/storage_group/basic_private_container_sg.robot index d974d3cc..af03e733 100644 --- a/robot/testsuites/integration/acl/storage_group/basic_private_container_sg.robot +++ b/robot/testsuites/integration/acl/storage_group/basic_private_container_sg.robot @@ -48,4 +48,4 @@ Check Private Container # In private container, Inner Ring is allowed to read (Storage Group List and Get), # so using here keyword for read-only container. Run Storage Group Operations On System's Behalf In RO Container - ... ${PRIV_CID} ${OBJECTS} ${COMPLEXITY} + ... ${USER_WALLET} ${PRIV_CID} ${OBJECTS} ${COMPLEXITY} diff --git a/robot/testsuites/integration/acl/storage_group/basic_public_container_sg.robot b/robot/testsuites/integration/acl/storage_group/basic_public_container_sg.robot index 1b8dfe04..7b297031 100644 --- a/robot/testsuites/integration/acl/storage_group/basic_public_container_sg.robot +++ b/robot/testsuites/integration/acl/storage_group/basic_public_container_sg.robot @@ -43,6 +43,6 @@ Check Public Container Run Storage Group Operations And Expect Success ... ${WALLET_OTH} ${PUBLIC_CID} ${OBJECTS} ${RUN_TYPE} - # System isn't allowed to DELETE in Public Container + # System isn't allowed to PUT and DELETE in Public Container Run Storage Group Operations On System's Behalf In RO Container - ... ${PUBLIC_CID} ${OBJECTS} ${RUN_TYPE} + ... ${USER_WALLET} ${PUBLIC_CID} ${OBJECTS} ${RUN_TYPE} diff --git a/robot/testsuites/integration/acl/storage_group/basic_readonly_container_sg.robot b/robot/testsuites/integration/acl/storage_group/basic_readonly_container_sg.robot index 788ce507..691c2156 100644 --- a/robot/testsuites/integration/acl/storage_group/basic_readonly_container_sg.robot +++ b/robot/testsuites/integration/acl/storage_group/basic_readonly_container_sg.robot @@ -52,4 +52,4 @@ Check Read-Only Container ... ${USER_WALLET} ${READONLY_CID} ${OBJECTS} ${COMPLEXITY} Run Storage Group Operations On System's Behalf in RO Container - ... ${READONLY_CID} ${OBJECTS} ${COMPLEXITY} + ... ${USER_WALLET} ${READONLY_CID} ${OBJECTS} ${COMPLEXITY}