2021-02-10 18:53:26 +00:00
|
|
|
*** Settings ***
|
|
|
|
Variables ../../../variables/common.py
|
|
|
|
|
|
|
|
Library ../${RESOURCES}/neofs.py
|
|
|
|
Library ../${RESOURCES}/payment_neogo.py
|
|
|
|
Resource common_steps_object.robot
|
|
|
|
|
|
|
|
|
|
|
|
*** Test cases ***
|
|
|
|
NeoFS Simple Storagegroup
|
|
|
|
[Documentation] Testcase to validate NeoFS operations with Storagegroup.
|
|
|
|
[Tags] Object NeoFS NeoCLI
|
|
|
|
[Timeout] 20 min
|
|
|
|
|
|
|
|
${WALLET} = Init wallet
|
|
|
|
Generate wallet ${WALLET}
|
|
|
|
${ADDR} = Dump Address ${WALLET}
|
|
|
|
${PRIV_KEY} = Dump PrivKey ${WALLET} ${ADDR}
|
|
|
|
${TX} = Transfer Mainnet Gas wallets/wallet.json NTrezR3C4X8aMLVg7vozt5wguyNfFhwuFx ${ADDR} 15
|
|
|
|
Wait Until Keyword Succeeds 1 min 15 sec
|
|
|
|
... Transaction accepted in block ${TX}
|
|
|
|
Get Transaction ${TX}
|
2021-02-20 14:05:03 +00:00
|
|
|
Expected Mainnet Balance ${ADDR} 15
|
2021-02-10 18:53:26 +00:00
|
|
|
|
2021-03-09 10:08:40 +00:00
|
|
|
${SCRIPT_HASH} = Get ScriptHash ${PRIV_KEY}
|
2021-02-10 18:53:26 +00:00
|
|
|
|
|
|
|
${TX_DEPOSIT} = NeoFS Deposit ${WALLET} ${ADDR} ${SCRIPT_HASH} 10
|
|
|
|
Wait Until Keyword Succeeds 1 min 15 sec
|
|
|
|
... Transaction accepted in block ${TX_DEPOSIT}
|
|
|
|
Get Transaction ${TX_DEPOSIT}
|
|
|
|
|
|
|
|
${BALANCE} = Wait Until Keyword Succeeds 5 min 1 min
|
|
|
|
... Expected Balance ${PRIV_KEY} 0 10
|
|
|
|
|
|
|
|
${CID} = Create container ${PRIV_KEY}
|
|
|
|
Container Existing ${PRIV_KEY} ${CID}
|
|
|
|
|
|
|
|
${FILE_S} = Generate file of bytes 1024
|
|
|
|
${FILE_HASH_S} = Get file hash ${FILE_S}
|
|
|
|
|
|
|
|
|
|
|
|
# Put two Simple Object
|
|
|
|
${S_OID_1} = Put object ${PRIV_KEY} ${FILE_S} ${CID} ${EMPTY} ${EMPTY}
|
|
|
|
${S_OID_2} = Put object ${PRIV_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
|
|
|
|
|
|
|
|
@{S_OBJ_ALL} = Create List ${S_OID_1} ${S_OID_2}
|
|
|
|
|
|
|
|
Log Storage group with 1 object
|
2021-02-16 11:56:52 +00:00
|
|
|
${SG_OID_1} = Put Storagegroup ${PRIV_KEY} ${CID} ${EMPTY} ${S_OID_1}
|
2021-02-10 18:53:26 +00:00
|
|
|
List Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_1}
|
|
|
|
Get Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_1} 1024 ${S_OID_1}
|
|
|
|
${Tombstone} = Delete Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_1}
|
|
|
|
Verify Head tombstone ${PRIV_KEY} ${CID} ${Tombstone} ${SG_OID_1} ${ADDR}
|
|
|
|
Run Keyword And Expect Error *
|
|
|
|
... Get Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_1} 1024 ${S_OID_1}
|
|
|
|
List Storagegroup ${PRIV_KEY} ${CID} @{EMPTY}
|
|
|
|
|
|
|
|
|
|
|
|
Log Storage group with 2 objects
|
2021-02-16 11:56:52 +00:00
|
|
|
${SG_OID_2} = Put Storagegroup ${PRIV_KEY} ${CID} ${EMPTY} @{S_OBJ_ALL}
|
2021-02-10 18:53:26 +00:00
|
|
|
List Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_2}
|
|
|
|
Get Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_2} 2048 @{S_OBJ_ALL}
|
|
|
|
${Tombstone} = Delete Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_2}
|
|
|
|
Verify Head tombstone ${PRIV_KEY} ${CID} ${Tombstone} ${SG_OID_2} ${ADDR}
|
|
|
|
Run Keyword And Expect Error *
|
|
|
|
... Get Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_2} 2048 @{S_OBJ_ALL}
|
|
|
|
List Storagegroup ${PRIV_KEY} ${CID} @{EMPTY}
|
|
|
|
|
|
|
|
Log Incorrect input
|
|
|
|
|
|
|
|
Run Keyword And Expect Error *
|
2021-02-16 11:56:52 +00:00
|
|
|
... Put Storagegroup ${PRIV_KEY} ${CID} ${EMPTY} ${UNEXIST_OID}
|
2021-02-10 18:53:26 +00:00
|
|
|
Run Keyword And Expect Error *
|
|
|
|
... Delete Storagegroup ${PRIV_KEY} ${CID} ${UNEXIST_OID}
|
|
|
|
|
2021-03-29 10:18:24 +00:00
|
|
|
[Teardown] Cleanup
|
2021-02-10 18:53:26 +00:00
|
|
|
|
|
|
|
*** Keywords ***
|
|
|
|
|
|
|
|
Cleanup
|
2021-03-29 10:18:24 +00:00
|
|
|
Create List
|
2021-02-11 21:34:44 +00:00
|
|
|
Get Docker Logs object_storage_group_simple
|
2021-02-10 18:53:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|