frostfs-testcases/robot/testsuites/integration/services/s3_gate_bucket.robot
Elizaveta Chichindaeva 0d86352cbe [#163] Setup and Teardown restart dev-env
Signed-off-by: Elizaveta Chichindaeva <elizaveta@nspcc.ru>
2022-02-04 19:08:31 +03:00

70 lines
2.8 KiB
Text

*** Settings ***
Variables common.py
Library Collections
Library neofs.py
Library payment_neogo.py
Library gates.py
Library wallet_keywords.py
Library contract_keywords.py
Library Process
Resource setup_teardown.robot
Resource payment_operations.robot
*** Variables ***
${DEPOSIT} = ${30}
${WIF} = ${MAINNET_WALLET_WIF}
${DEPOSIT_TIMEOUT}= 30s
@{INCLUDE_SVC} = s3_gate
*** 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} ${ADDR} ${WIF} = Prepare Wallet And Deposit
${FILE_S3} = Generate file of bytes ${COMPLEX_OBJ_SIZE}
${FILE_S3_NAME} = Get file name ${FILE_S3}
${CID}
... ${BUCKET}
... ${ACCESS_KEY_ID}
... ${SEC_ACCESS_KEY}
... ${OWNER_PRIV_KEY} = Init S3 Credentials ${WALLET}
${CONTEINERS_LIST} = Container List ${WIF}
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}
HeadBucket S3 ${BUCKET} ${S3_CLIENT}
HeadBucket S3 ${NEW_BUCKET} ${S3_CLIENT}
Put object S3 ${S3_CLIENT} ${NEW_BUCKET} ${FILE_S3}
Head object S3 ${S3_CLIENT} ${NEW_BUCKET} ${FILE_S3_NAME}
${LIST_S3_OBJECTS} = List objects S3 ${S3_CLIENT} ${NEW_BUCKET}
List Should Contain Value ${LIST_S3_OBJECTS} ${FILE_S3_NAME}
Run Keyword and Expect Error *
... Delete Bucket S3 ${S3_CLIENT} ${NEW_BUCKET}
HeadBucket S3 ${NEW_BUCKET} ${S3_CLIENT}
Delete Bucket S3 ${S3_CLIENT} ${NEW_BUCKET_EMPTY}
Tick Epoch
Run Keyword And Expect Error *
... HeadBucket S3 ${NEW_BUCKET_EMPTY} ${S3_CLIENT}
${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