2020-11-29 04:28:01 +00:00
|
|
|
*** Settings ***
|
2021-12-09 10:58:51 +00:00
|
|
|
Variables common.py
|
|
|
|
Variables wellknown_acl.py
|
2020-11-29 04:28:01 +00:00
|
|
|
|
2022-04-25 09:53:20 +00:00
|
|
|
Library container.py
|
2022-07-04 19:49:14 +00:00
|
|
|
Library epoch.py
|
2022-03-15 11:58:59 +00:00
|
|
|
Library neofs_verbs.py
|
2022-07-05 10:17:36 +00:00
|
|
|
Library node_management.py
|
2022-05-26 09:44:13 +00:00
|
|
|
Library storage_policy.py
|
2022-05-20 11:18:14 +00:00
|
|
|
Library utility_keywords.py
|
2020-11-29 04:28:01 +00:00
|
|
|
|
2022-04-25 09:53:20 +00:00
|
|
|
Library Collections
|
|
|
|
|
2021-12-09 10:58:51 +00:00
|
|
|
Resource payment_operations.robot
|
|
|
|
Resource setup_teardown.robot
|
2021-06-01 12:07:31 +00:00
|
|
|
|
2021-05-04 09:27:43 +00:00
|
|
|
*** Variables ***
|
2021-07-20 11:10:13 +00:00
|
|
|
${EXPECTED_COPIES} = ${2}
|
2021-05-04 09:27:43 +00:00
|
|
|
|
2020-11-29 04:28:01 +00:00
|
|
|
*** Test cases ***
|
2020-11-29 04:30:45 +00:00
|
|
|
NeoFS Object Replication
|
|
|
|
[Documentation] Testcase to validate NeoFS object replication.
|
2022-04-25 09:53:20 +00:00
|
|
|
[Tags] Migration Replication
|
2021-04-02 14:29:41 +00:00
|
|
|
[Timeout] 25 min
|
2020-11-29 04:28:01 +00:00
|
|
|
|
2021-06-01 12:07:31 +00:00
|
|
|
[Setup] Setup
|
2022-03-15 11:58:59 +00:00
|
|
|
|
2021-11-08 09:57:19 +00:00
|
|
|
Log Check replication mechanism
|
2022-05-26 09:44:13 +00:00
|
|
|
Check Replication
|
2022-03-15 11:58:59 +00:00
|
|
|
Log Check Sticky Bit with SYSTEM Group via replication mechanism
|
2021-11-08 09:57:19 +00:00
|
|
|
Check Replication ${STICKYBIT_PUB_ACL}
|
|
|
|
|
|
|
|
[Teardown] Teardown replication
|
|
|
|
|
|
|
|
*** Keywords ***
|
|
|
|
Check Replication
|
2022-05-26 09:44:13 +00:00
|
|
|
[Arguments] ${ACL}=${EMPTY}
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
2022-04-25 09:53:20 +00:00
|
|
|
${CID} = Create Container ${WALLET} basic_acl=${ACL}
|
2020-12-02 23:08:05 +00:00
|
|
|
|
2022-05-20 11:18:14 +00:00
|
|
|
${FILE} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
2020-11-29 04:28:01 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
${S_OID} = Put Object ${WALLET} ${FILE} ${CID}
|
2022-05-26 09:44:13 +00:00
|
|
|
|
|
|
|
${COPIES} = Get Object Copies Simple ${WALLET} ${CID} ${S_OID}
|
|
|
|
Should Be Equal ${EXPECTED_COPIES} ${COPIES}
|
2020-11-29 04:28:01 +00:00
|
|
|
|
2022-05-26 13:40:18 +00:00
|
|
|
@{NODES_OBJ} = Get Nodes With Object ${WALLET} ${CID} ${S_OID}
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2022-05-26 13:40:18 +00:00
|
|
|
@{NODES_OBJ_STOPPED} = Stop Nodes 1 ${NODES_OBJ}
|
2022-05-26 09:44:13 +00:00
|
|
|
@{NETMAP} = Convert To List ${NEOFS_NETMAP}
|
|
|
|
Remove Values From List ${NETMAP} ${NODES_OBJ_STOPPED}
|
2021-07-20 11:10:13 +00:00
|
|
|
|
|
|
|
# We expect that during two epochs the missed copy will be replicated.
|
|
|
|
FOR ${i} IN RANGE 2
|
2022-05-26 09:44:13 +00:00
|
|
|
${COPIES} = Get Object Copies Simple ${WALLET} ${CID} ${S_OID}
|
2021-07-20 11:10:13 +00:00
|
|
|
${PASSED} = Run Keyword And Return Status
|
2022-05-26 09:44:13 +00:00
|
|
|
... Should Be Equal ${EXPECTED_COPIES} ${COPIES}
|
2021-07-20 11:10:13 +00:00
|
|
|
Exit For Loop If ${PASSED}
|
|
|
|
Tick Epoch
|
2022-05-26 09:44:13 +00:00
|
|
|
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
2021-07-20 11:10:13 +00:00
|
|
|
END
|
2022-05-26 09:44:13 +00:00
|
|
|
Run Keyword Unless ${PASSED} Fail
|
|
|
|
... Storage policy for object ${S_OID} in container ${CID} isn't valid
|
2021-07-20 11:10:13 +00:00
|
|
|
|
2022-05-26 13:40:18 +00:00
|
|
|
Start Nodes ${NODES_OBJ_STOPPED}
|
2021-07-20 11:10:13 +00:00
|
|
|
Tick Epoch
|
|
|
|
|
|
|
|
# We have 2 or 3 copies. Expected behaviour: during two epochs potential 3rd copy should be removed.
|
|
|
|
FOR ${i} IN RANGE 2
|
2022-05-26 09:44:13 +00:00
|
|
|
${COPIES} = Get Object Copies Simple ${WALLET} ${CID} ${S_OID}
|
2021-07-20 11:10:13 +00:00
|
|
|
${PASSED} = Run Keyword And Return Status
|
2022-05-26 09:44:13 +00:00
|
|
|
... Should Be Equal ${EXPECTED_COPIES} ${COPIES}
|
2021-07-20 11:10:13 +00:00
|
|
|
Exit For Loop If ${PASSED}
|
|
|
|
Tick Epoch
|
2022-05-26 09:44:13 +00:00
|
|
|
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
2021-07-20 11:10:13 +00:00
|
|
|
END
|
2022-05-26 09:44:13 +00:00
|
|
|
Run Keyword Unless ${PASSED} Fail
|
|
|
|
... Storage policy for object ${S_OID} in container ${CID} isn't valid
|