2020-12-11 11:35:02 +00:00
|
|
|
*** Settings ***
|
2021-02-08 05:05:17 +00:00
|
|
|
Variables ../../../variables/common.py
|
2020-12-11 11:35:02 +00:00
|
|
|
Library Collections
|
2021-09-02 12:17:55 +00:00
|
|
|
Library neofs.py
|
|
|
|
Library payment_neogo.py
|
|
|
|
Library gates.py
|
|
|
|
Library wallet_keywords.py
|
|
|
|
Library contract_keywords.py
|
2020-12-11 11:35:02 +00:00
|
|
|
|
2021-09-02 12:17:55 +00:00
|
|
|
Resource setup_teardown.robot
|
2021-06-01 12:07:31 +00:00
|
|
|
*** Variables ***
|
|
|
|
${DEPOSIT_AMOUNT} = ${5}
|
2021-06-30 21:18:37 +00:00
|
|
|
${WIF} = ${MAINNET_WALLET_WIF}
|
2020-12-11 11:35:02 +00:00
|
|
|
|
|
|
|
*** Test cases ***
|
2021-09-02 12:17:55 +00:00
|
|
|
Objects in NeoFS S3 Gateway
|
2021-08-16 09:28:43 +00:00
|
|
|
# TODO: check uploading an s3 object via neofs-cli and a neofs object via s3-gate
|
2021-09-02 12:17:55 +00:00
|
|
|
[Documentation] Execute operations with objects via S3 Gate
|
2021-08-16 09:28:43 +00:00
|
|
|
[Timeout] 10 min
|
2020-12-11 11:35:02 +00:00
|
|
|
|
2021-06-01 12:07:31 +00:00
|
|
|
[Setup] Setup
|
2020-12-11 11:35:02 +00:00
|
|
|
|
2021-06-01 12:07:31 +00:00
|
|
|
${WALLET} ${ADDR} = Init Wallet from WIF ${ASSETS_DIR} ${WIF}
|
2021-06-01 12:07:31 +00:00
|
|
|
${TX_DEPOSIT} = NeoFS Deposit ${WIF} ${DEPOSIT_AMOUNT}
|
2020-12-11 11:35:02 +00:00
|
|
|
Wait Until Keyword Succeeds 1 min 15 sec
|
|
|
|
... Transaction accepted in block ${TX_DEPOSIT}
|
|
|
|
|
2021-04-02 14:29:41 +00:00
|
|
|
${FILE_S3} = Generate file of bytes ${COMPLEX_OBJ_SIZE}
|
2020-12-11 11:35:02 +00:00
|
|
|
${FILE_S3_HASH} = Get file hash ${FILE_S3}
|
2021-04-26 10:30:40 +00:00
|
|
|
${FILE_S3_NAME} = Get file name ${FILE_S3}
|
2020-12-11 11:35:02 +00:00
|
|
|
|
|
|
|
${CID}
|
|
|
|
... ${BUCKET}
|
2021-04-26 10:30:40 +00:00
|
|
|
... ${ACCESS_KEY_ID}
|
|
|
|
... ${SEC_ACCESS_KEY}
|
2021-08-16 09:28:43 +00:00
|
|
|
... ${OWNER_PRIV_KEY} = Init S3 Credentials ${WALLET}
|
2020-12-11 11:35:02 +00:00
|
|
|
|
2021-06-01 12:07:31 +00:00
|
|
|
${CONTEINERS_LIST} = Container List ${WIF}
|
2020-12-11 11:35:02 +00:00
|
|
|
List Should Contain Value ${CONTEINERS_LIST} ${CID}
|
|
|
|
|
2021-04-26 10:30:40 +00:00
|
|
|
${S3_CLIENT} = Config S3 client ${ACCESS_KEY_ID} ${SEC_ACCESS_KEY}
|
2021-08-16 09:28:43 +00:00
|
|
|
|
2020-12-11 11:35:02 +00:00
|
|
|
|
2021-09-02 12:17:55 +00:00
|
|
|
${NEW_BUCKET} = Create Bucket S3 ${S3_CLIENT}
|
|
|
|
${NEW_BUCKET_2} = Create Bucket S3 ${S3_CLIENT}
|
|
|
|
|
|
|
|
Put object S3 ${S3_CLIENT} ${NEW_BUCKET} ${FILE_S3}
|
|
|
|
Head object S3 ${S3_CLIENT} ${NEW_BUCKET} ${FILE_S3_NAME}
|
|
|
|
Put object S3 ${S3_CLIENT} ${NEW_BUCKET_2} ${FILE_S3}
|
|
|
|
Head object S3 ${S3_CLIENT} ${NEW_BUCKET_2} ${FILE_S3_NAME}
|
2020-12-11 11:35:02 +00:00
|
|
|
|
2021-09-02 12:17:55 +00:00
|
|
|
${LIST_S3_OBJECTS} = List objects S3 ${S3_CLIENT} ${NEW_BUCKET}
|
2020-12-11 11:35:02 +00:00
|
|
|
List Should Contain Value ${LIST_S3_OBJECTS} ${FILE_S3_NAME}
|
2021-09-02 12:17:55 +00:00
|
|
|
${LIST_S3_OBJECTS_2} = List objects S3 ${S3_CLIENT} ${NEW_BUCKET_2}
|
|
|
|
List Should Contain Value ${LIST_S3_OBJECTS_2} ${FILE_S3_NAME}
|
2020-12-11 11:35:02 +00:00
|
|
|
|
2021-09-02 12:17:55 +00:00
|
|
|
${LIST_V2_S3_OBJECTS} = List objects S3 v2 ${S3_CLIENT} ${NEW_BUCKET}
|
2020-12-11 11:35:02 +00:00
|
|
|
List Should Contain Value ${LIST_V2_S3_OBJECTS} ${FILE_S3_NAME}
|
2021-09-02 12:17:55 +00:00
|
|
|
|
|
|
|
Get object S3 ${S3_CLIENT} ${NEW_BUCKET} ${FILE_S3_NAME} s3_obj_get_s3
|
2021-04-26 10:30:40 +00:00
|
|
|
|
|
|
|
Verify file hash s3_obj_get_s3 ${FILE_S3_HASH}
|
2020-12-11 11:35:02 +00:00
|
|
|
|
2021-09-02 12:17:55 +00:00
|
|
|
#TODO: Solve the issue on CopyObject #260 https://github.com/nspcc-dev/neofs-s3-gw/issues/260
|
|
|
|
|
|
|
|
Copy object S3 ${S3_CLIENT} ${NEW_BUCKET} ${FILE_S3_NAME} NewName
|
|
|
|
${LIST_S3_OBJECTS} = List objects S3 ${S3_CLIENT} ${NEW_BUCKET}
|
2020-12-11 11:35:02 +00:00
|
|
|
List Should Contain Value ${LIST_S3_OBJECTS} NewName
|
2021-09-02 12:17:55 +00:00
|
|
|
Copy object S3 ${S3_CLIENT} ${NEW_BUCKET_2} ${FILE_S3_NAME} NewName_2
|
|
|
|
${LIST_S3_OBJECTS_2} = List objects S3 ${S3_CLIENT} ${NEW_BUCKET_2}
|
|
|
|
List Should Contain Value ${LIST_S3_OBJECTS_2} NewName_2
|
2020-12-11 11:35:02 +00:00
|
|
|
|
2021-09-02 12:17:55 +00:00
|
|
|
Delete object S3 ${S3_CLIENT} ${NEW_BUCKET} ${FILE_S3_NAME}
|
|
|
|
${LIST_S3_OBJECTS} = List objects S3 ${S3_CLIENT} ${NEW_BUCKET}
|
|
|
|
List Should Not Contain Value ${LIST_S3_OBJECTS} ${FILE_S3_NAME}
|
2020-12-11 11:35:02 +00:00
|
|
|
|
2021-09-02 12:17:55 +00:00
|
|
|
[Teardown] Teardown s3_gate_object
|