2020-12-04 12:28:59 +00:00
|
|
|
*** Settings ***
|
2021-12-09 10:58:51 +00:00
|
|
|
Variables common.py
|
2021-12-16 06:51:26 +00:00
|
|
|
Variables wellknown_acl.py
|
2021-04-26 17:48:43 +00:00
|
|
|
|
2021-09-27 20:41:21 +00:00
|
|
|
Library neofs.py
|
2022-03-15 11:58:59 +00:00
|
|
|
Library neofs_verbs.py
|
2022-03-11 16:08:14 +00:00
|
|
|
Library http_gate.py
|
2020-12-04 12:28:59 +00:00
|
|
|
|
2021-12-16 06:51:26 +00:00
|
|
|
Resource payment_operations.robot
|
2021-09-27 20:41:21 +00:00
|
|
|
Resource setup_teardown.robot
|
2021-06-01 12:07:31 +00:00
|
|
|
|
2021-05-04 09:27:43 +00:00
|
|
|
*** Variables ***
|
2021-08-16 09:28:43 +00:00
|
|
|
${PLACEMENT_RULE} = REP 1 IN X CBF 1 SELECT 1 FROM * AS X
|
2021-09-03 11:51:57 +00:00
|
|
|
${CONTAINER_WAIT_INTERVAL} = 1 min
|
2022-01-10 11:02:57 +00:00
|
|
|
@{INCLUDE_SVC} = http_gate
|
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
|
|
|
|
|
2022-03-11 16:08:14 +00:00
|
|
|
[Setup] Setup
|
2022-01-10 11:02:57 +00:00
|
|
|
Make Up ${INCLUDE_SVC}
|
2022-03-11 16:08:14 +00:00
|
|
|
|
2021-12-16 06:51:26 +00:00
|
|
|
${WALLET} ${ADDR} ${WIF} = Prepare Wallet And Deposit
|
2020-12-04 12:28:59 +00:00
|
|
|
|
2021-12-16 06:51:26 +00:00
|
|
|
${CID} = Create container ${WIF} ${PUBLIC_ACL} ${PLACEMENT_RULE}
|
2021-09-03 11:51:57 +00:00
|
|
|
Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL}
|
2021-06-01 12:07:31 +00:00
|
|
|
... 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
|
|
|
|
2022-03-15 11:58:59 +00:00
|
|
|
${S_OID} = Put object ${WIF} ${FILE} ${CID}
|
|
|
|
${L_OID} = Put object ${WIF} ${FILE_L} ${CID}
|
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
|
|
|
|
2022-03-15 11:58:59 +00:00
|
|
|
${PLAIN_FILE_HASH} = Get file hash ${GET_OBJ_S}
|
|
|
|
${GATE_FILE_HASH} = Get file hash ${FILEPATH}
|
|
|
|
Should Be Equal ${FILE_HASH} ${PLAIN_FILE_HASH}
|
|
|
|
Should Be Equal ${FILE_HASH} ${GATE_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
|
|
|
|
2022-03-15 11:58:59 +00:00
|
|
|
${PLAIN_FILE_HASH} = Get file hash ${GET_OBJ_L}
|
|
|
|
${GATE_FILE_HASH} = Get file hash ${FILEPATH}
|
|
|
|
Should Be Equal ${FILE_L_HASH} ${PLAIN_FILE_HASH}
|
|
|
|
Should Be Equal ${FILE_L_HASH} ${GATE_FILE_HASH}
|
2020-12-29 19:55:33 +00:00
|
|
|
|
2021-06-01 12:07:31 +00:00
|
|
|
[Teardown] Teardown http_gate
|