[#115] Sticky Bit with SYSTEM group
Signed-off-by: Elizaveta Chichindaeva <elizaveta@nspcc.ru>
This commit is contained in:
parent
075ddfbd43
commit
dcab3a5745
4 changed files with 29 additions and 14 deletions
|
@ -722,7 +722,7 @@ def verify_file_hash(filename, expected_hash):
|
||||||
|
|
||||||
|
|
||||||
@keyword('Put object')
|
@keyword('Put object')
|
||||||
def put_object(private_key: str, path: str, cid: str, bearer: str, user_headers: str,
|
def put_object(private_key: str, path: str, cid: str, bearer: str, user_headers: str="",
|
||||||
endpoint: str="", options: str="" ):
|
endpoint: str="", options: str="" ):
|
||||||
logger.info("Going to put the object")
|
logger.info("Going to put the object")
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
*** Settings ***
|
*** Settings ***
|
||||||
Variables ../../../variables/common.py
|
Variables ../../../variables/common.py
|
||||||
|
Variables ../../../variables/acl.py
|
||||||
|
|
||||||
Library Collections
|
Library Collections
|
||||||
Library ../${RESOURCES}/payment_neogo.py
|
Library ../${RESOURCES}/payment_neogo.py
|
||||||
|
@ -10,6 +11,7 @@ Library contract_keywords.py
|
||||||
|
|
||||||
Resource ../${RESOURCES}/payment_operations.robot
|
Resource ../${RESOURCES}/payment_operations.robot
|
||||||
Resource ../${RESOURCES}/setup_teardown.robot
|
Resource ../${RESOURCES}/setup_teardown.robot
|
||||||
|
Resource common.robot
|
||||||
|
|
||||||
*** Variables ***
|
*** Variables ***
|
||||||
${PLACEMENT_RULE} = REP 2 IN X CBF 1 SELECT 4 FROM * AS X
|
${PLACEMENT_RULE} = REP 2 IN X CBF 1 SELECT 4 FROM * AS X
|
||||||
|
@ -25,20 +27,30 @@ NeoFS Object Replication
|
||||||
|
|
||||||
[Setup] Setup
|
[Setup] Setup
|
||||||
|
|
||||||
|
Log Check replication mechanism
|
||||||
|
Check Replication ${EMPTY}
|
||||||
|
Log Check Sticky Bit with SYSTEM Group via replication mechanism
|
||||||
|
Check Replication ${STICKYBIT_PUB_ACL}
|
||||||
|
|
||||||
|
[Teardown] Teardown replication
|
||||||
|
|
||||||
|
*** Keywords ***
|
||||||
|
Check Replication
|
||||||
|
[Arguments] ${ACL}
|
||||||
|
|
||||||
${WALLET} ${ADDR} ${WIF} = Init Wallet with Address ${ASSETS_DIR}
|
${WALLET} ${ADDR} ${WIF} = Init Wallet with Address ${ASSETS_DIR}
|
||||||
Payment Operations ${ADDR} ${WIF}
|
Payment Operations ${ADDR} ${WIF}
|
||||||
|
${CID} = Create Container ${WIF} ${ACL} ${PLACEMENT_RULE}
|
||||||
|
Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL}
|
||||||
|
... Container Existing ${WIF} ${CID}
|
||||||
|
|
||||||
${CID} = Create container ${WIF} ${EMPTY} ${PLACEMENT_RULE}
|
${FILE} = Generate file of bytes ${SIMPLE_OBJ_SIZE}
|
||||||
Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL}
|
${FILE_HASH} = Get file hash ${FILE}
|
||||||
... Container Existing ${WIF} ${CID}
|
|
||||||
|
|
||||||
${FILE} = Generate file of bytes ${SIMPLE_OBJ_SIZE}
|
${S_OID} = Put Object ${WIF} ${FILE} ${CID} ${EMPTY} ${EMPTY}
|
||||||
${FILE_HASH} = Get file hash ${FILE}
|
Validate storage policy for object ${WIF} ${EXPECTED_COPIES} ${CID} ${S_OID}
|
||||||
|
|
||||||
${S_OID} = Put object ${WIF} ${FILE} ${CID} ${EMPTY} ${EMPTY}
|
@{NODES_OBJ} = Get nodes with Object ${WIF} ${CID} ${S_OID}
|
||||||
Validate storage policy for object ${WIF} ${EXPECTED_COPIES} ${CID} ${S_OID}
|
|
||||||
|
|
||||||
@{NODES_OBJ} = Get nodes with object ${WIF} ${CID} ${S_OID}
|
|
||||||
${NODES_LOG_TIME} = Get Nodes Log Latest Timestamp
|
${NODES_LOG_TIME} = Get Nodes Log Latest Timestamp
|
||||||
|
|
||||||
@{NODES_OBJ_STOPPED} = Stop nodes 1 @{NODES_OBJ}
|
@{NODES_OBJ_STOPPED} = Stop nodes 1 @{NODES_OBJ}
|
||||||
|
@ -49,7 +61,7 @@ NeoFS Object Replication
|
||||||
FOR ${i} IN RANGE 2
|
FOR ${i} IN RANGE 2
|
||||||
${PASSED} = Run Keyword And Return Status
|
${PASSED} = Run Keyword And Return Status
|
||||||
... Validate storage policy for object ${WIF} ${EXPECTED_COPIES}
|
... Validate storage policy for object ${WIF} ${EXPECTED_COPIES}
|
||||||
... ${CID} ${S_OID} ${EMPTY} ${NETMAP}
|
... ${CID} ${S_OID} ${EMPTY} ${NETMAP}
|
||||||
Exit For Loop If ${PASSED}
|
Exit For Loop If ${PASSED}
|
||||||
Tick Epoch
|
Tick Epoch
|
||||||
Sleep ${CHECK_INTERVAL}
|
Sleep ${CHECK_INTERVAL}
|
||||||
|
@ -70,5 +82,4 @@ NeoFS Object Replication
|
||||||
END
|
END
|
||||||
Run Keyword Unless ${PASSED} Fail Keyword failed: Validate storage policy for object ${S_OID} in container ${CID}
|
Run Keyword Unless ${PASSED} Fail Keyword failed: Validate storage policy for object ${S_OID} in container ${CID}
|
||||||
|
|
||||||
|
|
||||||
[Teardown] Teardown replication
|
[Teardown] Teardown replication
|
||||||
|
|
|
@ -2,3 +2,4 @@ PUBLIC_ACL = "0x1FFFFFFF"
|
||||||
PRIVATE_ACL = "0x18888888"
|
PRIVATE_ACL = "0x18888888"
|
||||||
READONLY_ACL = "0x1FFF88FF"
|
READONLY_ACL = "0x1FFF88FF"
|
||||||
INACCESSIBLE_ACL = "0x40000000"
|
INACCESSIBLE_ACL = "0x40000000"
|
||||||
|
STICKYBIT_PUB_ACL = "0x3FFFFFFF"
|
||||||
|
|
|
@ -20,6 +20,9 @@ MAINNET_BLOCK_TIME = os.getenv('MAINNET_BLOCK_TIME', "15s")
|
||||||
MAINNET_TIMEOUT = os.getenv('MAINNET_TIMEOUT', "1min")
|
MAINNET_TIMEOUT = os.getenv('MAINNET_TIMEOUT', "1min")
|
||||||
MORPH_BLOCK_TIME = os.getenv("MORPH_BLOCK_TIME", '1s')
|
MORPH_BLOCK_TIME = os.getenv("MORPH_BLOCK_TIME", '1s')
|
||||||
NEOFS_CONTRACT_CACHE_TIMEOUT = os.getenv("NEOFS_CONTRACT_CACHE_TIMEOUT", "30s")
|
NEOFS_CONTRACT_CACHE_TIMEOUT = os.getenv("NEOFS_CONTRACT_CACHE_TIMEOUT", "30s")
|
||||||
|
|
||||||
|
#TODO: change to NEOFS_STORAGE_DEFAULT_GC_REMOVER_SLEEP_INTERVAL
|
||||||
|
|
||||||
SHARD_0_GC_SLEEP = os.getenv("NEOFS_STORAGE_SHARD_0_GC_REMOVER_SLEEP_INTERVAL", "1m")
|
SHARD_0_GC_SLEEP = os.getenv("NEOFS_STORAGE_SHARD_0_GC_REMOVER_SLEEP_INTERVAL", "1m")
|
||||||
|
|
||||||
NEOFS_IR_WIF = os.getenv("NEOFS_IR_WIF", "KxyjQ8eUa4FHt3Gvioyt1Wz29cTUrE4eTqX3yFSk1YFCsPL8uNsY")
|
NEOFS_IR_WIF = os.getenv("NEOFS_IR_WIF", "KxyjQ8eUa4FHt3Gvioyt1Wz29cTUrE4eTqX3yFSk1YFCsPL8uNsY")
|
||||||
|
|
Loading…
Reference in a new issue