2021-10-07 11:28:31 +00:00
|
|
|
*** Settings ***
|
2021-12-09 10:58:51 +00:00
|
|
|
Variables common.py
|
2021-10-07 11:28:31 +00:00
|
|
|
|
2022-05-26 09:44:13 +00:00
|
|
|
Library acl.py
|
2022-04-25 09:53:20 +00:00
|
|
|
Library container.py
|
2022-05-26 09:44:13 +00:00
|
|
|
Library contract_keywords.py
|
2021-10-07 11:28:31 +00:00
|
|
|
Library neofs.py
|
2022-03-15 11:58:59 +00:00
|
|
|
Library neofs_verbs.py
|
2022-05-26 09:44:13 +00:00
|
|
|
Library storage_policy.py
|
2022-05-20 11:15:25 +00:00
|
|
|
Library utility_keywords.py
|
2022-04-25 09:53:20 +00:00
|
|
|
|
2021-12-09 10:58:51 +00:00
|
|
|
Resource eacl_tables.robot
|
2021-10-07 11:28:31 +00:00
|
|
|
Resource common_steps_acl_bearer.robot
|
|
|
|
Resource payment_operations.robot
|
|
|
|
Resource setup_teardown.robot
|
|
|
|
Resource storage.robot
|
|
|
|
|
|
|
|
*** Variables ***
|
|
|
|
${FULL_PLACEMENT_RULE} = REP 4 IN X CBF 1 SELECT 4 FROM * AS X
|
|
|
|
${EXPECTED_COPIES} = ${4}
|
|
|
|
|
|
|
|
*** Test cases ***
|
|
|
|
eACL Deny Replication Operations
|
|
|
|
[Documentation] Testcase to validate NeoFS replication with eACL deny rules.
|
2022-04-25 09:53:20 +00:00
|
|
|
[Tags] ACL Replication
|
2021-10-07 11:28:31 +00:00
|
|
|
[Timeout] 20 min
|
|
|
|
|
|
|
|
[Setup] Setup
|
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
${_} ${NODE} ${WIF_STORAGE} = Get control endpoint with wif
|
|
|
|
${WALLET_STORAGE} ${_} = Prepare Wallet with WIF And Deposit ${WIF_STORAGE}
|
2021-10-07 11:28:31 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
2021-11-01 10:12:55 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
# https://github.com/nspcc-dev/neofs-node/issues/881
|
2021-11-01 10:12:55 +00:00
|
|
|
|
2022-05-20 11:15:25 +00:00
|
|
|
${FILE} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
|
|
${CID} = Create container ${WALLET} basic_acl=eacl-public-read-write rule=${FULL_PLACEMENT_RULE}
|
2022-04-25 09:53:20 +00:00
|
|
|
Prepare eACL Role rules ${CID}
|
2021-10-07 11:28:31 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
${OID} = Put object ${WALLET} ${FILE} ${CID}
|
2021-10-07 11:28:31 +00:00
|
|
|
|
2022-05-26 09:44:13 +00:00
|
|
|
${COPIES} = Get Object Copies Simple ${WALLET} ${CID} ${OID}
|
|
|
|
Should Be Equal As Numbers ${EXPECTED_COPIES} ${COPIES}
|
2021-10-07 11:28:31 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
Set eACL ${WALLET} ${CID} ${EACL_DENY_ALL_USER}
|
2021-11-01 10:12:55 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
Run Keyword And Expect Error *
|
|
|
|
... Put object ${WALLET} ${FILE} ${CID}
|
2021-10-07 11:28:31 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
# Drop object to check replication
|
|
|
|
Drop object ${NODE} ${WALLET_STORAGE} ${CID} ${OID}
|
2021-10-07 11:28:31 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
Tick Epoch
|
2022-05-26 09:44:13 +00:00
|
|
|
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
2021-10-07 11:28:31 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
# We assume that during one epoch object should be replicated
|
2022-05-26 09:44:13 +00:00
|
|
|
${COPIES} = Get Object Copies Simple ${WALLET_STORAGE} ${CID} ${OID}
|
|
|
|
Should Be Equal As Numbers ${EXPECTED_COPIES} ${COPIES}
|
|
|
|
... msg="Dropped object should be replicated in one epoch"
|
2022-02-01 13:42:41 +00:00
|
|
|
|
|
|
|
[Teardown] Teardown acl_deny_replication
|