2020-12-04 12:28:59 +00:00
|
|
|
*** Settings ***
|
2021-02-08 05:05:17 +00:00
|
|
|
Variables ../../../variables/common.py
|
2021-04-26 17:48:43 +00:00
|
|
|
|
2021-02-08 05:05:17 +00:00
|
|
|
Library ../${RESOURCES}/neofs.py
|
|
|
|
Library ../${RESOURCES}/payment_neogo.py
|
|
|
|
Library ../${RESOURCES}/gates.py
|
2021-04-26 10:30:40 +00:00
|
|
|
Library ../${RESOURCES}/utility_keywords.py
|
2021-05-07 12:14:37 +00:00
|
|
|
Library ${KEYWORDS}/wallet_keywords.py
|
|
|
|
Library ${KEYWORDS}/rpc_call_keywords.py
|
2020-12-04 12:28:59 +00:00
|
|
|
|
2021-05-04 09:27:43 +00:00
|
|
|
*** Variables ***
|
2021-06-01 12:07:31 +00:00
|
|
|
${PLACEMENT_RULE} = "REP 1 IN X CBF 1 SELECT 1 FROM * AS X"
|
|
|
|
${TRANSFER_AMOUNT} = ${6}
|
|
|
|
${DEPOSIT_AMOUNT} = ${5}
|
2020-12-04 12:28:59 +00:00
|
|
|
|
|
|
|
*** Test cases ***
|
|
|
|
|
2021-04-26 10:30:40 +00:00
|
|
|
NeoFS HTTP Gateway
|
2020-12-04 12:28:59 +00:00
|
|
|
[Documentation] Creates container and does PUT, GET via HTTP Gate
|
|
|
|
[Timeout] 5 min
|
|
|
|
|
2021-04-26 10:30:40 +00:00
|
|
|
[Setup] Create Temporary Directory
|
2021-06-01 12:07:31 +00:00
|
|
|
${WALLET} ${ADDR} ${WIF} = Init Wallet with Address ${TEMP_DIR}
|
|
|
|
${TX} = Transfer Mainnet Gas ${MAINNET_WALLET_WIF} ${ADDR} ${TRANSFER_AMOUNT}
|
2020-12-04 12:28:59 +00:00
|
|
|
|
2021-06-01 12:07:31 +00:00
|
|
|
Wait Until Keyword Succeeds ${MAINNET_TIMEOUT} ${MAINNET_BLOCK_TIME}
|
2020-12-04 12:28:59 +00:00
|
|
|
... Transaction accepted in block ${TX}
|
2021-05-07 12:14:37 +00:00
|
|
|
|
2021-06-01 12:07:31 +00:00
|
|
|
${MAINNET_BALANCE} = Get Mainnet Balance ${ADDR}
|
|
|
|
Should Be Equal As Numbers ${MAINNET_BALANCE} ${TRANSFER_AMOUNT}
|
2020-12-04 12:28:59 +00:00
|
|
|
|
2021-06-01 12:07:31 +00:00
|
|
|
${TX_DEPOSIT} = NeoFS Deposit ${WIF} ${DEPOSIT_AMOUNT}
|
|
|
|
Wait Until Keyword Succeeds ${MAINNET_TIMEOUT} ${MAINNET_BLOCK_TIME}
|
2020-12-04 12:28:59 +00:00
|
|
|
... Transaction accepted in block ${TX_DEPOSIT}
|
|
|
|
|
2021-06-01 12:07:31 +00:00
|
|
|
${CID} = Create container ${WIF} public ${PLACEMENT_RULE}
|
|
|
|
Wait Until Keyword Succeeds 2 min 30 sec
|
|
|
|
... Container Existing ${WIF} ${CID}
|
2020-12-04 12:28:59 +00:00
|
|
|
|
2021-04-02 14:29:41 +00:00
|
|
|
${FILE} = Generate file of bytes ${SIMPLE_OBJ_SIZE}
|
|
|
|
${FILE_L} = Generate file of bytes ${COMPLEX_OBJ_SIZE}
|
2020-12-04 12:28:59 +00:00
|
|
|
${FILE_HASH} = Get file hash ${FILE}
|
2020-12-29 19:55:33 +00:00
|
|
|
${FILE_L_HASH} = Get file hash ${FILE_L}
|
2020-12-04 12:28:59 +00:00
|
|
|
|
2021-06-01 12:07:31 +00:00
|
|
|
${S_OID} = Put object ${WIF} ${FILE} ${CID} ${EMPTY} ${EMPTY}
|
|
|
|
${L_OID} = Put object ${WIF} ${FILE_L} ${CID} ${EMPTY} ${EMPTY}
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2020-12-04 12:28:59 +00:00
|
|
|
# By request from Service team - try to GET object from the node without object
|
|
|
|
|
2021-06-01 12:07:31 +00:00
|
|
|
@{GET_NODE_LIST} = Get nodes without object ${WIF} ${CID} ${S_OID}
|
2020-12-04 12:28:59 +00:00
|
|
|
${NODE} = Evaluate random.choice($GET_NODE_LIST) random
|
|
|
|
|
2021-06-01 12:07:31 +00:00
|
|
|
${GET_OBJ_S} = Get object ${WIF} ${CID} ${S_OID} ${EMPTY} s_file_read ${NODE}
|
|
|
|
${FILEPATH} = Get via HTTP Gate ${CID} ${S_OID}
|
2020-12-04 12:28:59 +00:00
|
|
|
|
2021-04-26 10:30:40 +00:00
|
|
|
Verify file hash ${GET_OBJ_S} ${FILE_HASH}
|
|
|
|
Verify file hash ${FILEPATH} ${FILE_HASH}
|
2020-12-29 19:55:33 +00:00
|
|
|
|
2021-06-01 12:07:31 +00:00
|
|
|
@{GET_NODE_LIST} = Get nodes without object ${WIF} ${CID} ${L_OID}
|
2020-12-29 19:55:33 +00:00
|
|
|
${NODE} = Evaluate random.choice($GET_NODE_LIST) random
|
|
|
|
|
2021-06-01 12:07:31 +00:00
|
|
|
${GET_OBJ_L} = Get object ${WIF} ${CID} ${L_OID} ${EMPTY} l_file_read ${NODE}
|
|
|
|
${FILEPATH} = Get via HTTP Gate ${CID} ${L_OID}
|
2020-12-29 19:55:33 +00:00
|
|
|
|
2021-04-26 10:30:40 +00:00
|
|
|
Verify file hash ${GET_OBJ_L} ${FILE_L_HASH}
|
|
|
|
Verify file hash ${FILEPATH} ${FILE_L_HASH}
|
2020-12-29 19:55:33 +00:00
|
|
|
|
2021-04-26 10:30:40 +00:00
|
|
|
[Teardown] Cleanup
|
2020-12-29 19:55:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*** Keywords ***
|
|
|
|
|
|
|
|
Cleanup
|
2021-04-26 10:30:40 +00:00
|
|
|
Cleanup Files
|
|
|
|
Get Docker Logs http_gate
|