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-02-08 05:05:17 +00:00
|
|
|
Library ../${RESOURCES}/neofs.py
|
|
|
|
Library ../${RESOURCES}/payment_neogo.py
|
|
|
|
Library ../${RESOURCES}/gates.py
|
2021-06-01 12:07:31 +00:00
|
|
|
Library ${KEYWORDS}/wallet_keywords.py
|
2021-06-01 12:07:31 +00:00
|
|
|
|
|
|
|
Resource ../${RESOURCES}/setup_teardown.robot
|
2020-12-11 11:35:02 +00:00
|
|
|
|
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-04-26 10:30:40 +00:00
|
|
|
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
|
2020-12-11 11:35:02 +00:00
|
|
|
[Documentation] Execute operations 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
|
|
|
|
2021-04-02 14:29:41 +00:00
|
|
|
${FILE_FS} = Generate file of bytes ${COMPLEX_OBJ_SIZE}
|
2020-12-11 11:35:02 +00:00
|
|
|
${FILE_FS_HASH} = Get file hash ${FILE_FS}
|
2021-04-26 10:30:40 +00:00
|
|
|
${FILE_FS_NAME} = Get file name ${FILE_FS}
|
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
|
|
|
${S3_BUCKET} = Create Bucket S3 ${S3_CLIENT}
|
|
|
|
|
2021-04-26 10:30:40 +00:00
|
|
|
${LIST_S3_BUCKETS} = List buckets S3 ${S3_CLIENT}
|
2020-12-11 11:35:02 +00:00
|
|
|
List Should Contain Value ${LIST_S3_BUCKETS} ${BUCKET}
|
2021-08-16 09:28:43 +00:00
|
|
|
List Should Contain Value ${LIST_S3_BUCKETS} ${S3_BUCKET}
|
2020-12-11 11:35:02 +00:00
|
|
|
|
2021-08-16 09:28:43 +00:00
|
|
|
${OID_S3} = Put object S3 ${S3_CLIENT} ${S3_BUCKET} ${FILE_S3}
|
|
|
|
Head object S3 ${S3_CLIENT} ${S3_BUCKET} ${FILE_S3_NAME}
|
2020-12-11 11:35:02 +00:00
|
|
|
|
2021-06-01 12:07:31 +00:00
|
|
|
${OID_FS} = Put object ${WIF} ${FILE_FS} ${CID} ${EMPTY} ${EMPTY}
|
|
|
|
Head object ${WIF} ${CID} ${OID_FS} ${EMPTY}
|
2021-08-16 09:28:43 +00:00
|
|
|
${LIST_S3_OBJECTS} = List objects S3 ${S3_CLIENT} ${S3_BUCKET}
|
2020-12-11 11:35:02 +00:00
|
|
|
List Should Contain Value ${LIST_S3_OBJECTS} ${FILE_S3_NAME}
|
|
|
|
|
2021-08-16 09:28:43 +00:00
|
|
|
${LIST_V2_S3_OBJECTS} = List objects S3 v2 ${S3_CLIENT} ${S3_BUCKET}
|
2020-12-11 11:35:02 +00:00
|
|
|
List Should Contain Value ${LIST_V2_S3_OBJECTS} ${FILE_S3_NAME}
|
|
|
|
List Should Contain Value ${LIST_V2_S3_OBJECTS} ${FILE_S3_NAME}
|
|
|
|
|
2021-08-16 09:28:43 +00:00
|
|
|
Get object S3 ${S3_CLIENT} ${S3_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-08-16 09:28:43 +00:00
|
|
|
Copy object S3 ${S3_CLIENT} ${S3_BUCKET} ${FILE_S3_NAME} NewName
|
|
|
|
${LIST_S3_OBJECTS} = List objects S3 ${S3_CLIENT} ${S3_BUCKET}
|
2020-12-11 11:35:02 +00:00
|
|
|
List Should Contain Value ${LIST_S3_OBJECTS} NewName
|
|
|
|
|
|
|
|
Delete object S3 ${S3_CLIENT} ${BUCKET} ${FILE_S3_NAME}
|
2021-08-16 09:28:43 +00:00
|
|
|
${LIST_S3_OBJECTS} = List objects S3 ${S3_CLIENT} ${S3_BUCKET}
|
2020-12-11 11:35:02 +00:00
|
|
|
List Should Not Contain Value ${LIST_S3_OBJECTS} FILE_S3_NAME
|
|
|
|
|