2021-04-06 14:18:48 +00:00
|
|
|
*** Settings ***
|
2021-12-09 10:58:51 +00:00
|
|
|
Variables common.py
|
2021-04-06 14:18:48 +00:00
|
|
|
|
2022-03-15 11:58:59 +00:00
|
|
|
Library neofs_verbs.py
|
2022-05-24 15:00:26 +00:00
|
|
|
Library container.py
|
2022-07-04 19:49:14 +00:00
|
|
|
Library epoch.py
|
2022-05-20 11:18:14 +00:00
|
|
|
Library utility_keywords.py
|
2021-06-01 12:07:31 +00:00
|
|
|
|
2021-09-27 20:41:21 +00:00
|
|
|
Resource payment_operations.robot
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-07-20 11:10:13 +00:00
|
|
|
*** Variables ***
|
|
|
|
${CLEANUP_TIMEOUT} = 10s
|
2021-04-06 14:18:48 +00:00
|
|
|
|
|
|
|
*** Test cases ***
|
|
|
|
NeoFS Simple Object Operations
|
|
|
|
[Documentation] Testcase to validate NeoFS object expiration option.
|
|
|
|
[Tags] Object NeoFS NeoCLI
|
|
|
|
[Timeout] 20 min
|
|
|
|
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2022-05-24 15:00:26 +00:00
|
|
|
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
|
|
${CID} = Create container ${WALLET}
|
2021-04-06 14:18:48 +00:00
|
|
|
|
2022-05-20 11:18:14 +00:00
|
|
|
${FILE} ${FILE_HASH} = Generate File ${SIMPLE_OBJ_SIZE}
|
2021-07-20 11:10:13 +00:00
|
|
|
${EPOCH} = Get Epoch
|
2021-04-06 14:18:48 +00:00
|
|
|
|
|
|
|
${EPOCH_PRE} = Evaluate ${EPOCH}-1
|
|
|
|
${EPOCH_NEXT} = Evaluate ${EPOCH}+1
|
|
|
|
${EPOCH_POST} = Evaluate ${EPOCH}+1000
|
|
|
|
|
|
|
|
# Failed on attempt to create epoch from the past
|
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Put object ${WALLET} ${FILE} ${CID} options= --attributes __NEOFS__EXPIRATION_EPOCH=${EPOCH_PRE}
|
2021-04-06 14:18:48 +00:00
|
|
|
|
|
|
|
# Put object with different expiration epoch numbers (current, next, and from the distant future)
|
2022-02-01 13:42:41 +00:00
|
|
|
${OID_CUR} = Put object ${WALLET} ${FILE} ${CID} options= --attributes __NEOFS__EXPIRATION_EPOCH=${EPOCH}
|
|
|
|
${OID_NXT} = Put object ${WALLET} ${FILE} ${CID} options= --attributes __NEOFS__EXPIRATION_EPOCH=${EPOCH_NEXT}
|
|
|
|
${OID_PST} = Put object ${WALLET} ${FILE} ${CID} options= --attributes __NEOFS__EXPIRATION_EPOCH=${EPOCH_POST}
|
2021-04-06 14:18:48 +00:00
|
|
|
|
|
|
|
# Check objects for existence
|
2022-02-01 13:42:41 +00:00
|
|
|
Get object ${WALLET} ${CID} ${OID_CUR} ${EMPTY} file_read_cur
|
|
|
|
Get object ${WALLET} ${CID} ${OID_NXT} ${EMPTY} file_read_nxt
|
|
|
|
Get object ${WALLET} ${CID} ${OID_PST} ${EMPTY} file_read_pst
|
2021-04-06 14:18:48 +00:00
|
|
|
|
2021-07-20 11:10:13 +00:00
|
|
|
# Increment epoch to check that expired objects (OID_CUR) will be removed
|
|
|
|
Tick Epoch
|
|
|
|
# we assume that during this time objects must be deleted
|
|
|
|
Sleep ${CLEANUP_TIMEOUT}
|
2021-04-06 14:18:48 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Get object ${WALLET} ${CID} ${OID_CUR} ${EMPTY} file_read
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-04-06 14:18:48 +00:00
|
|
|
# Check that correct object with expiration in the future is existed
|
2022-02-01 13:42:41 +00:00
|
|
|
Get object ${WALLET} ${CID} ${OID_NXT} ${EMPTY} file_read
|
|
|
|
Get object ${WALLET} ${CID} ${OID_PST} ${EMPTY} file_read_pst
|
2021-04-06 14:18:48 +00:00
|
|
|
|
2021-07-20 11:10:13 +00:00
|
|
|
# Increment one more epoch to check that expired object (OID_NXT) will be removed
|
|
|
|
Tick Epoch
|
|
|
|
# we assume that during this time objects must be deleted
|
|
|
|
Sleep ${CLEANUP_TIMEOUT}
|
2021-04-06 14:18:48 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Get object ${WALLET} ${CID} ${OID_NXT} ${EMPTY} file_read
|
2021-04-06 14:18:48 +00:00
|
|
|
|
|
|
|
# Check that correct object with expiration in the distant future is existed
|
2022-02-01 13:42:41 +00:00
|
|
|
Get object ${WALLET} ${CID} ${OID_PST} ${EMPTY} file_read_pst
|
2021-04-06 14:18:48 +00:00
|
|
|
|