2020-07-14 00:05:22 +00:00
|
|
|
*** Settings ***
|
2021-12-09 10:58:51 +00:00
|
|
|
Variables common.py
|
2020-07-14 00:05:22 +00:00
|
|
|
|
2022-05-24 15:00:26 +00:00
|
|
|
Library container.py
|
2021-09-27 20:41:21 +00:00
|
|
|
Library contract_keywords.py
|
2022-05-26 09:44:13 +00:00
|
|
|
Library neofs.py
|
|
|
|
Library neofs_verbs.py
|
|
|
|
Library storage_policy.py
|
2022-05-20 11:18:14 +00:00
|
|
|
Library utility_keywords.py
|
2021-06-01 12:07:31 +00:00
|
|
|
|
2022-05-26 09:44:13 +00:00
|
|
|
Library Collections
|
|
|
|
|
2021-09-27 20:41:21 +00:00
|
|
|
Resource payment_operations.robot
|
|
|
|
Resource setup_teardown.robot
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-07-20 11:10:13 +00:00
|
|
|
*** Variables ***
|
|
|
|
${CLEANUP_TIMEOUT} = 10s
|
2022-03-15 11:58:59 +00:00
|
|
|
&{FILE_USR_HEADER} = key1=1 key2=abc
|
|
|
|
|
2020-07-14 00:05:22 +00:00
|
|
|
|
|
|
|
*** Test cases ***
|
|
|
|
NeoFS Simple Object Operations
|
|
|
|
[Documentation] Testcase to validate NeoFS operations with simple object.
|
2022-03-15 11:58:59 +00:00
|
|
|
[Tags] Object
|
2021-04-06 14:18:48 +00:00
|
|
|
[Timeout] 10 min
|
2020-07-14 00:05:22 +00:00
|
|
|
|
2021-06-01 12:07:31 +00:00
|
|
|
[Setup] Setup
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2022-05-24 15:00:26 +00:00
|
|
|
${WALLET} ${ADDR} ${_} = Prepare Wallet And Deposit
|
|
|
|
${CID} = Create container ${WALLET}
|
2020-11-27 00:33:11 +00:00
|
|
|
|
2022-05-20 11:18:14 +00:00
|
|
|
${FILE} ${FILE_HASH} = Generate file ${SIMPLE_OBJ_SIZE}
|
2020-11-27 00:33:11 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
${S_OID} = Put object ${WALLET} ${FILE} ${CID}
|
|
|
|
${H_OID} = Put object ${WALLET} ${FILE} ${CID} user_headers=${FILE_USR_HEADER}
|
2020-07-14 00:05:22 +00:00
|
|
|
|
2022-05-26 09:44:13 +00:00
|
|
|
${COPIES} = Get Simple Object Copies ${WALLET} ${CID} ${S_OID}
|
|
|
|
Should Be Equal As Numbers 2 ${COPIES}
|
|
|
|
${COPIES} = Get Simple Object Copies ${WALLET} ${CID} ${H_OID}
|
|
|
|
Should Be Equal As Numbers 2 ${COPIES}
|
2020-11-27 00:33:11 +00:00
|
|
|
|
2022-05-26 09:44:13 +00:00
|
|
|
@{S_OBJ_ALL} = Create List ${S_OID} ${H_OID}
|
2021-06-01 12:07:31 +00:00
|
|
|
@{S_OBJ_H} = Create List ${H_OID}
|
2020-07-14 00:05:22 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
${GET_OBJ_S} = Get object ${WALLET} ${CID} ${S_OID}
|
|
|
|
${GET_OBJ_H} = Get object ${WALLET} ${CID} ${H_OID}
|
2022-03-15 11:58:59 +00:00
|
|
|
|
|
|
|
${FILE_HASH_S} = Get file hash ${GET_OBJ_S}
|
|
|
|
${FILE_HASH_H} = Get file hash ${GET_OBJ_H}
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2022-03-15 11:58:59 +00:00
|
|
|
Should Be Equal ${FILE_HASH_S} ${FILE_HASH}
|
|
|
|
Should Be Equal ${FILE_HASH_H} ${FILE_HASH}
|
2020-11-27 00:33:11 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
Get Range Hash ${WALLET} ${CID} ${S_OID} ${EMPTY} 0:10
|
|
|
|
Get Range Hash ${WALLET} ${CID} ${H_OID} ${EMPTY} 0:10
|
2020-11-27 00:33:11 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
Get Range ${WALLET} ${CID} ${S_OID} s_get_range ${EMPTY} 0:10
|
|
|
|
Get Range ${WALLET} ${CID} ${H_OID} h_get_range ${EMPTY} 0:10
|
2020-11-27 00:33:11 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
Search object ${WALLET} ${CID} expected_objects_list=${S_OBJ_ALL}
|
|
|
|
Search object ${WALLET} ${CID} filters=${FILE_USR_HEADER} expected_objects_list=${S_OBJ_H}
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
Head object ${WALLET} ${CID} ${S_OID}
|
|
|
|
&{RESPONSE} = Head object ${WALLET} ${CID} ${H_OID}
|
2022-03-15 11:58:59 +00:00
|
|
|
Dictionary Should Contain Sub Dictionary
|
|
|
|
... ${RESPONSE}[header][attributes]
|
|
|
|
... ${FILE_USR_HEADER}
|
|
|
|
... msg="There are no User Headers in HEAD response"
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
${TOMBSTONE_S} = Delete object ${WALLET} ${CID} ${S_OID}
|
|
|
|
${TOMBSTONE_H} = Delete object ${WALLET} ${CID} ${H_OID}
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
Verify Head tombstone ${WALLET} ${CID} ${TOMBSTONE_S} ${S_OID} ${ADDR}
|
|
|
|
Verify Head tombstone ${WALLET} ${CID} ${TOMBSTONE_H} ${H_OID} ${ADDR}
|
2020-11-27 00:33:11 +00:00
|
|
|
|
2021-07-20 11:10:13 +00:00
|
|
|
Tick Epoch
|
|
|
|
# we assume that during this time objects must be deleted
|
|
|
|
Sleep ${CLEANUP_TIMEOUT}
|
2021-04-26 10:30:40 +00:00
|
|
|
|
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Get object ${WALLET} ${CID} ${S_OID} ${EMPTY} ${GET_OBJ_S}
|
2020-11-27 00:33:11 +00:00
|
|
|
|
2021-04-26 10:30:40 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Get object ${WALLET} ${CID} ${H_OID} ${EMPTY} ${GET_OBJ_H}
|
2020-12-02 23:08:05 +00:00
|
|
|
|
2021-06-01 12:07:31 +00:00
|
|
|
[Teardown] Teardown object_simple
|