frostfs-testcases/robot/testsuites/integration/services/s3_gate_bucket.robot
anastasia prasolova 7abb2761c9 [#184] finally got rid of neofs.py
Signed-off-by: anastasia prasolova <anastasia@nspcc.ru>
2022-07-06 15:30:27 +03:00

67 lines
2.7 KiB
Text

*** Settings ***
Variables common.py
Library Collections
Library OperatingSystem
Library container.py
Library s3_gate.py
Library epoch.py
Library utility_keywords.py
Resource setup_teardown.robot
Resource payment_operations.robot
*** Variables ***
@{INCLUDE_SVC} = s3_gate coredns
*** Test cases ***
Buckets in NeoFS S3 Gateway
[Documentation] Execute operations with bucket via S3 Gate
[Timeout] 10 min
[Setup] Setup
Make Up ${INCLUDE_SVC}
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
${FILE_S3} ${_} = Generate file ${COMPLEX_OBJ_SIZE}
${_} ${S3_OBJECT_KEY} = Split Path ${FILE_S3}
${CID}
... ${BUCKET}
... ${ACCESS_KEY_ID}
... ${SEC_ACCESS_KEY}
... ${OWNER_PRIV_KEY} = Init S3 Credentials ${WALLET}
@{CONTEINERS_LIST} = List Containers ${WALLET}
List Should Contain Value ${CONTEINERS_LIST} ${CID}
${S3_CLIENT} = Config S3 client ${ACCESS_KEY_ID} ${SEC_ACCESS_KEY}
${NEW_BUCKET} = Create Bucket S3 ${S3_CLIENT}
${NEW_BUCKET_EMPTY} = Create Bucket S3 ${S3_CLIENT}
Head bucket S3 ${S3_CLIENT} ${BUCKET}
Head bucket S3 ${S3_CLIENT} ${NEW_BUCKET}
Put object S3 ${S3_CLIENT} ${NEW_BUCKET} ${FILE_S3}
Head object S3 ${S3_CLIENT} ${NEW_BUCKET} ${S3_OBJECT_KEY}
${LIST_S3_OBJECTS} = List objects S3 ${S3_CLIENT} ${NEW_BUCKET}
List Should Contain Value ${LIST_S3_OBJECTS} ${S3_OBJECT_KEY}
Run Keyword and Expect Error *
... Delete Bucket S3 ${S3_CLIENT} ${NEW_BUCKET}
Head bucket S3 ${S3_CLIENT} ${NEW_BUCKET}
Delete Bucket S3 ${S3_CLIENT} ${NEW_BUCKET_EMPTY}
Tick Epoch
Run Keyword And Expect Error *
... Head bucket S3 ${S3_CLIENT} ${NEW_BUCKET_EMPTY}
${BUCKET_LIST} = List Buckets S3 ${S3_CLIENT}
Tick Epoch
List Should Contain Value ${BUCKET_LIST} ${NEW_BUCKET}
List Should Not Contain Value ${BUCKET_LIST} ${NEW_BUCKET_EMPTY}
[Teardown] Teardown s3_gate_bucket