2020-12-11 11:35:02 +00:00
|
|
|
*** Settings ***
|
2021-12-09 10:58:51 +00:00
|
|
|
Variables common.py
|
|
|
|
|
|
|
|
Library Collections
|
2022-03-14 08:39:24 +00:00
|
|
|
Library OperatingSystem
|
|
|
|
|
2022-04-25 09:53:20 +00:00
|
|
|
Library container.py
|
2022-03-14 08:39:24 +00:00
|
|
|
Library s3_gate.py
|
2022-05-20 11:18:14 +00:00
|
|
|
Library utility_keywords.py
|
2021-12-09 10:58:51 +00:00
|
|
|
|
2022-03-14 08:39:24 +00:00
|
|
|
Resource payment_operations.robot
|
2022-02-01 13:42:41 +00:00
|
|
|
Resource setup_teardown.robot
|
2021-12-09 10:58:51 +00:00
|
|
|
|
2021-06-01 12:07:31 +00:00
|
|
|
*** Variables ***
|
2022-03-14 08:39:24 +00:00
|
|
|
@{INCLUDE_SVC} = s3_gate coredns
|
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
|
|
|
|
2022-03-14 08:39:24 +00:00
|
|
|
[Setup] Setup
|
2022-01-10 11:02:57 +00:00
|
|
|
Make Up ${INCLUDE_SVC}
|
2020-12-11 11:35:02 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
2020-12-11 11:35:02 +00:00
|
|
|
|
2022-05-20 11:18:14 +00:00
|
|
|
${FILE_S3} ${FILE_S3_HASH} = Generate file ${COMPLEX_OBJ_SIZE}
|
2022-03-14 08:39:24 +00:00
|
|
|
${_} ${S3_OBJECT_KEY} = Split Path ${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
|
|
|
|
2022-04-25 09:53:20 +00:00
|
|
|
@{CONTAINERS_LIST} = List Containers ${WALLET}
|
|
|
|
List Should Contain Value ${CONTAINERS_LIST} ${CID}
|
2020-12-11 11:35:02 +00:00
|
|
|
|
2021-04-26 10:30:40 +00:00
|
|
|
${S3_CLIENT} = Config S3 client ${ACCESS_KEY_ID} ${SEC_ACCESS_KEY}
|
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}
|
2022-03-14 08:39:24 +00:00
|
|
|
Head object S3 ${S3_CLIENT} ${NEW_BUCKET} ${S3_OBJECT_KEY}
|
2021-09-02 12:17:55 +00:00
|
|
|
Put object S3 ${S3_CLIENT} ${NEW_BUCKET_2} ${FILE_S3}
|
2022-03-14 08:39:24 +00:00
|
|
|
Head object S3 ${S3_CLIENT} ${NEW_BUCKET_2} ${S3_OBJECT_KEY}
|
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}
|
2022-03-14 08:39:24 +00:00
|
|
|
List Should Contain Value ${LIST_S3_OBJECTS} ${S3_OBJECT_KEY}
|
2021-09-02 12:17:55 +00:00
|
|
|
${LIST_S3_OBJECTS_2} = List objects S3 ${S3_CLIENT} ${NEW_BUCKET_2}
|
2022-03-14 08:39:24 +00:00
|
|
|
List Should Contain Value ${LIST_S3_OBJECTS_2} ${S3_OBJECT_KEY}
|
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}
|
2022-03-14 08:39:24 +00:00
|
|
|
List Should Contain Value ${LIST_V2_S3_OBJECTS} ${S3_OBJECT_KEY}
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2022-03-14 08:39:24 +00:00
|
|
|
${OBJ_PATH} = Get object S3 ${S3_CLIENT} ${NEW_BUCKET} ${S3_OBJECT_KEY}
|
|
|
|
Verify file hash ${OBJ_PATH} ${FILE_S3_HASH}
|
2022-03-15 11:58:59 +00:00
|
|
|
${HASH} = Get file hash ${OBJ_PATH}
|
|
|
|
Should Be Equal ${FILE_S3_HASH} ${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
|
|
|
|
|
2022-03-14 08:39:24 +00:00
|
|
|
${COPIED_OBJ_PATH} = Copy object S3 ${S3_CLIENT} ${NEW_BUCKET} ${S3_OBJECT_KEY}
|
2022-04-25 09:53:20 +00:00
|
|
|
${LIST_S3_OBJECTS} = List objects S3 ${S3_CLIENT} ${NEW_BUCKET}
|
2022-03-14 08:39:24 +00:00
|
|
|
List Should Contain Value ${LIST_S3_OBJECTS} ${COPIED_OBJ_PATH}
|
|
|
|
${COPIED_OBJ_PATH_2} = Copy object S3 ${S3_CLIENT} ${NEW_BUCKET_2} ${S3_OBJECT_KEY}
|
2022-04-25 09:53:20 +00:00
|
|
|
${LIST_S3_OBJECTS_2} = List objects S3 ${S3_CLIENT} ${NEW_BUCKET_2}
|
2022-03-14 08:39:24 +00:00
|
|
|
List Should Contain Value ${LIST_S3_OBJECTS_2} ${COPIED_OBJ_PATH_2}
|
2020-12-11 11:35:02 +00:00
|
|
|
|
2022-03-14 08:39:24 +00:00
|
|
|
Delete object S3 ${S3_CLIENT} ${NEW_BUCKET} ${S3_OBJECT_KEY}
|
2021-09-02 12:17:55 +00:00
|
|
|
${LIST_S3_OBJECTS} = List objects S3 ${S3_CLIENT} ${NEW_BUCKET}
|
2022-03-14 08:39:24 +00:00
|
|
|
List Should Not Contain Value ${LIST_S3_OBJECTS} ${S3_OBJECT_KEY}
|
2020-12-11 11:35:02 +00:00
|
|
|
|
2021-12-09 10:58:51 +00:00
|
|
|
[Teardown] Teardown s3_gate_object
|