2020-11-30 10:33:05 +00:00
|
|
|
# -*- coding: robot -*-
|
|
|
|
|
|
|
|
*** Settings ***
|
2020-12-16 11:19:24 +00:00
|
|
|
Variables ../../variables/common.py
|
2020-11-30 10:33:05 +00:00
|
|
|
|
|
|
|
|
2020-12-16 11:19:24 +00:00
|
|
|
Library Collections
|
|
|
|
Library ${RESOURCES}/neofs.py
|
|
|
|
Library ${RESOURCES}/payment_neogo.py
|
|
|
|
Library ${RESOURCES}/gates.py
|
|
|
|
|
|
|
|
|
|
|
|
*** Variables ***
|
|
|
|
# wallet that has assets in selectel mainnet
|
|
|
|
${WALLET_ROOT} = wallets/selectel_mainnet_wallet.json
|
2020-11-30 10:33:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
*** Test cases ***
|
|
|
|
|
|
|
|
NeoFS Storage Smoke
|
2020-12-16 11:19:24 +00:00
|
|
|
[Documentation] Creates container and does PUT, GET and LIST on it via CLI and via HTTP Gate
|
|
|
|
[Timeout] 5 min
|
|
|
|
|
|
|
|
# user.key, container owner
|
|
|
|
${PRIV_KEY} = Form WIF from String 1dd37fba80fec4e6a6f13fd708d8dcb3b29def768017052f6c930fa1c5d90bbb
|
|
|
|
|
|
|
|
${WALLET} = Init wallet
|
|
|
|
|
|
|
|
Generate wallet from WIF ${WALLET} ${PRIV_KEY}
|
|
|
|
${ADDR} = Dump Address ${WALLET}
|
|
|
|
Dump PrivKey ${WALLET} ${ADDR}
|
2021-03-09 10:08:40 +00:00
|
|
|
${SCRIPT_HASH} = Get ScriptHash ${PRIV_KEY}
|
2020-12-16 11:19:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
${TX} = Transfer Mainnet Gas ${WALLET_ROOT} NbTiM6h8r99kpRtb428XcsUk1TzKed2gTc ${ADDR} 2 one
|
|
|
|
Wait Until Keyword Succeeds 2 min 15 sec
|
|
|
|
... Transaction accepted in block ${TX}
|
|
|
|
|
|
|
|
Get Transaction ${TX}
|
|
|
|
|
|
|
|
|
|
|
|
${TX_DEPOSIT} = NeoFS Deposit ${WALLET} ${ADDR} ${SCRIPT_HASH} 1
|
|
|
|
Wait Until Keyword Succeeds 1 min 15 sec
|
|
|
|
... Transaction accepted in block ${TX_DEPOSIT}
|
|
|
|
Get Transaction ${TX_DEPOSIT}
|
|
|
|
Get Balance ${PRIV_KEY}
|
|
|
|
|
|
|
|
${CID}
|
|
|
|
... ${BUCKET}
|
|
|
|
... ${ACCESS_KEY_ID}
|
|
|
|
... ${SEC_ACCESS_KEY}
|
|
|
|
... ${OWNER_PRIV_KEY} = Init S3 Credentials ${PRIV_KEY} keys/s3_selectel_hcs.pub.key
|
|
|
|
|
|
|
|
${S3_CLIENT} = Config S3 client ${ACCESS_KEY_ID} ${SEC_ACCESS_KEY}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
${CONTEINERS_LIST} = Container List ${PRIV_KEY}
|
|
|
|
List Should Contain Value ${CONTEINERS_LIST} ${CID}
|
|
|
|
|
2021-04-02 14:29:41 +00:00
|
|
|
${FILE_S3} = Generate file of bytes ${SIMPLE_OBJ_SIZE}
|
2020-12-16 11:19:24 +00:00
|
|
|
${FILE_S3_HASH} = Get file hash ${FILE_S3}
|
|
|
|
${FILE_S3_NAME} = Get file name ${FILE_S3}
|
|
|
|
|
2021-04-02 14:29:41 +00:00
|
|
|
${FILE_FS} = Generate file of bytes ${SIMPLE_OBJ_SIZE}
|
2020-12-16 11:19:24 +00:00
|
|
|
${FILE_FS_HASH} = Get file hash ${FILE_FS}
|
|
|
|
${FILE_FS_NAME} = Get file name ${FILE_FS}
|
|
|
|
|
2021-02-10 18:53:26 +00:00
|
|
|
${OID_FS} = Put object ${PRIV_KEY} ${FILE_FS} ${CID} ${EMPTY} ${EMPTY}
|
2020-12-16 11:19:24 +00:00
|
|
|
Put object S3 ${S3_CLIENT} ${BUCKET} ${FILE_S3}
|
|
|
|
|
|
|
|
${OID_LIST_S3} = Search object ${PRIV_KEY} ${CID} ${EMPTY} ${EMPTY} FileName=${FILE_S3_NAME}
|
|
|
|
${OID_S3} = Get From List ${OID_LIST_S3} 0
|
2020-11-30 10:33:05 +00:00
|
|
|
|
2021-02-10 18:53:26 +00:00
|
|
|
Get object ${PRIV_KEY} ${CID} ${OID_FS} ${EMPTY} s_file_read
|
2020-12-16 11:19:24 +00:00
|
|
|
Get object S3 ${S3_CLIENT} ${BUCKET} ${FILE_FS_NAME} fs_obj_get_s3
|
|
|
|
${FILEPATH_FS} = Get via HTTP Gate ${CID} ${OID_FS}
|
2020-11-30 10:33:05 +00:00
|
|
|
|
2020-12-16 11:19:24 +00:00
|
|
|
Verify file hash fs_obj_get_s3 ${FILE_FS_HASH}
|
|
|
|
Verify file hash s_file_read ${FILE_FS_HASH}
|
|
|
|
Verify file hash ${FILEPATH_FS} ${FILE_FS_HASH}
|
2020-11-30 10:33:05 +00:00
|
|
|
|
2021-02-10 18:53:26 +00:00
|
|
|
Get object ${PRIV_KEY} ${CID} ${OID_S3} ${EMPTY} s_file_read
|
2020-12-16 11:19:24 +00:00
|
|
|
Get object S3 ${S3_CLIENT} ${BUCKET} ${FILE_S3_NAME} s3_obj_get_s3
|
|
|
|
${FILEPATH_S3} = Get via HTTP Gate ${CID} ${OID_S3}
|
2020-11-30 10:33:05 +00:00
|
|
|
|
2020-12-16 11:19:24 +00:00
|
|
|
Verify file hash s3_obj_get_s3 ${FILE_S3_HASH}
|
|
|
|
Verify file hash s_file_read ${FILE_S3_HASH}
|
|
|
|
Verify file hash ${FILEPATH_S3} ${FILE_S3_HASH}
|
2020-11-30 10:33:05 +00:00
|
|
|
|
2021-04-02 14:29:41 +00:00
|
|
|
[Teardown] Cleanup Files
|