forked from TrueCloudLab/frostfs-testcases
Waiting for container to appear in network; decrease complex object size
Signed-off-by: anastasia prasolova <anastasia@nspcc.ru>
This commit is contained in:
parent
fe99c143aa
commit
be281428b5
11 changed files with 53 additions and 27 deletions
|
@ -18,7 +18,7 @@ BearerToken Operations with Filter OID NotEqual
|
|||
|
||||
[Setup] Setup
|
||||
|
||||
Generate eACL Keys
|
||||
Generate Keys
|
||||
Prepare eACL Role rules
|
||||
|
||||
Log Check Bearer token with simple object
|
||||
|
|
|
@ -2,20 +2,26 @@
|
|||
Variables ../../../variables/common.py
|
||||
Variables ../../../variables/acl.py
|
||||
|
||||
*** Variables ***
|
||||
${CONTAINER_WAIT_INTERVAL} = 1 min
|
||||
|
||||
*** Keywords ***
|
||||
|
||||
Create Containers
|
||||
Log Create Private Container
|
||||
${PRIV_CID_GEN} = Create container ${USER_KEY} ${PRIVATE_ACL} ${COMMON_PLACEMENT_RULE}
|
||||
Container Existing ${USER_KEY} ${PRIV_CID_GEN}
|
||||
Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL}
|
||||
... Container Existing ${USER_KEY} ${PRIV_CID_GEN}
|
||||
|
||||
Log Create Public Container
|
||||
${PUBLIC_CID_GEN} = Create container ${USER_KEY} ${PUBLIC_ACL} ${COMMON_PLACEMENT_RULE}
|
||||
Container Existing ${USER_KEY} ${PUBLIC_CID_GEN}
|
||||
Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL}
|
||||
... Container Existing ${USER_KEY} ${PUBLIC_CID_GEN}
|
||||
|
||||
Log Create Read-Only Container
|
||||
${READONLY_CID_GEN} = Create container ${USER_KEY} ${READONLY_ACL} ${COMMON_PLACEMENT_RULE}
|
||||
Container Existing ${USER_KEY} ${READONLY_CID_GEN}
|
||||
Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL}
|
||||
... Container Existing ${USER_KEY} ${READONLY_CID_GEN}
|
||||
|
||||
Set Global Variable ${PRIV_CID} ${PRIV_CID_GEN}
|
||||
Set Global Variable ${PUBLIC_CID} ${PUBLIC_CID_GEN}
|
||||
|
|
|
@ -6,18 +6,21 @@ Variables ../../../variables/acl.py
|
|||
${FILE_USR_HEADER} = key1=1,key2=abc
|
||||
${FILE_USR_HEADER_DEL} = key1=del,key2=del
|
||||
${FILE_OTH_HEADER} = key1=oth,key2=oth
|
||||
${CONTAINER_WAIT_INTERVAL} = 1 min
|
||||
|
||||
*** Keywords ***
|
||||
|
||||
Create Container Public
|
||||
Log Create Public Container
|
||||
${PUBLIC_CID_GEN} = Create container ${USER_KEY} 0x0FFFFFFF ${COMMON_PLACEMENT_RULE}
|
||||
Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL}
|
||||
... Container Existing ${USER_KEY} ${PUBLIC_CID_GEN}
|
||||
[Return] ${PUBLIC_CID_GEN}
|
||||
|
||||
|
||||
Create Container Inaccessible
|
||||
Log Create Inaccessible Container
|
||||
${INACCESSIBLE_CID_GEN} = Create container ${USER_KEY} ${INACCESSIBLE_ACL} ${COMMON_PLACEMENT_RULE}
|
||||
Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL}
|
||||
... Container Existing ${USER_KEY} ${INACCESSIBLE_CID_GEN}
|
||||
[Return] ${INACCESSIBLE_CID_GEN}
|
||||
|
||||
|
||||
|
|
|
@ -5,12 +5,15 @@ Variables ../../../variables/common.py
|
|||
${FILE_USR_HEADER} = key1=1,key2=abc
|
||||
${FILE_USR_HEADER_DEL} = key1=del,key2=del
|
||||
${FILE_OTH_HEADER} = key1=oth,key2=oth
|
||||
${CONTAINER_WAIT_INTERVAL} = 1 min
|
||||
|
||||
*** Keywords ***
|
||||
|
||||
Create Container Public
|
||||
Log Create Public Container
|
||||
${PUBLIC_CID_GEN} = Create container ${USER_KEY} 0x4FFFFFFF ${COMMON_PLACEMENT_RULE}
|
||||
Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL}
|
||||
... Container Existing ${USER_KEY} ${PUBLIC_CID_GEN}
|
||||
[Return] ${PUBLIC_CID_GEN}
|
||||
|
||||
|
||||
|
@ -29,7 +32,7 @@ Check eACL Deny and Allow All
|
|||
${CID} = Create Container Public
|
||||
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
|
||||
${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL}
|
||||
@{S_OBJ_H} = Create List ${S_OID_USER}
|
||||
@{S_OBJ_H} = Create List ${S_OID_USER}
|
||||
|
||||
Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ ${ATTR_TIME} = Timestamp=new
|
|||
${ATTR_DUPLICATE} = Size=small, Size=big
|
||||
${ATTR_NONE} = NoAttribute=''
|
||||
${ATTR_SINGLE} = AttrNum=one
|
||||
${CONTAINER_WAIT_INTERVAL} = 1 min
|
||||
|
||||
*** Test Cases ***
|
||||
Duplicated Container Attributes
|
||||
|
@ -48,9 +49,11 @@ Duplicated Container Attributes
|
|||
# Checking a successful step with a single attribute
|
||||
#####################################################
|
||||
|
||||
${CID} = Create container ${USER_KEY} ${EMPTY} ${POLICY} ${ATTR_SINGLE}
|
||||
${ATTRIBUTES} = Get container attributes ${USER_KEY} ${CID} ${EMPTY} json_output=True
|
||||
${ATTRIBUTES_DICT} = Decode Container Attributes Json ${ATTRIBUTES}
|
||||
${CID} = Create container ${USER_KEY} ${EMPTY} ${POLICY} ${ATTR_SINGLE}
|
||||
Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL}
|
||||
... Container Existing ${USER_KEY} ${CID}
|
||||
${ATTRIBUTES} = Get container attributes ${USER_KEY} ${CID} ${EMPTY} json_output=True
|
||||
${ATTRIBUTES_DICT} = Decode Container Attributes Json ${ATTRIBUTES}
|
||||
Verify Head Attribute ${ATTRIBUTES_DICT} ${ATTR_SINGLE}
|
||||
|
||||
[Teardown] Teardown container_attributes
|
|
@ -9,6 +9,9 @@ Library ${KEYWORDS}/wallet_keywords.py
|
|||
Resource ../${RESOURCES}/setup_teardown.robot
|
||||
Resource ../${RESOURCES}/payment_operations.robot
|
||||
|
||||
*** Variables ***
|
||||
${CONTAINER_WAIT_INTERVAL} = 1 min
|
||||
|
||||
*** Test Cases ***
|
||||
Delete Containers
|
||||
[Documentation] Testcase to check if containers can be deleted.
|
||||
|
@ -22,8 +25,9 @@ Delete Containers
|
|||
${WALLET_OTH} ${ADDR_OTH} ${OTHER_KEY} = Init Wallet with Address ${ASSETS_DIR}
|
||||
Payment Operations ${ADDR_OTH} ${OTHER_KEY}
|
||||
|
||||
${CID} = Create container ${USER_KEY} ${PUBLIC_ACL} ${COMMON_PLACEMENT_RULE}
|
||||
Container Existing ${USER_KEY} ${CID}
|
||||
${CID} = Create container ${USER_KEY} ${PUBLIC_ACL} ${COMMON_PLACEMENT_RULE}
|
||||
Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL}
|
||||
... Container Existing ${USER_KEY} ${CID}
|
||||
|
||||
Run Keyword And Expect Error *
|
||||
... Delete Container ${CID} ${OTHER_KEY}
|
||||
|
@ -35,4 +39,3 @@ Delete Containers
|
|||
Log Container cannot be deleted: ${EXPECTED_ERROR}
|
||||
|
||||
[Teardown] Teardown container_delete
|
||||
|
|
@ -9,6 +9,8 @@ Library ${KEYWORDS}/rpc_call_keywords.py
|
|||
Resource ../${RESOURCES}/payment_operations.robot
|
||||
Resource ../${RESOURCES}/setup_teardown.robot
|
||||
|
||||
*** Variables ***
|
||||
${CONTAINER_WAIT_INTERVAL} = 1 min
|
||||
|
||||
*** Test cases ***
|
||||
NeoFS Simple Netmap
|
||||
|
@ -87,8 +89,9 @@ Validate Policy
|
|||
|
||||
Log Container with rule ${POLICY}
|
||||
|
||||
${CID} = Create container ${PRIV_KEY} ${EMPTY} ${POLICY}
|
||||
Container Existing ${PRIV_KEY} ${CID}
|
||||
${S_OID} = Put object ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} ${EMPTY}
|
||||
Validate storage policy for object ${PRIV_KEY} ${EXPECTED_VAL} ${CID} ${S_OID} ${EXPECTED_LIST}
|
||||
${CID} = Create container ${PRIV_KEY} ${EMPTY} ${POLICY}
|
||||
Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL}
|
||||
... Container Existing ${PRIV_KEY} ${CID}
|
||||
${S_OID} = Put object ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} ${EMPTY}
|
||||
Validate storage policy for object ${PRIV_KEY} ${EXPECTED_VAL} ${CID} ${S_OID} ${EXPECTED_LIST}
|
||||
Get object ${PRIV_KEY} ${CID} ${S_OID} ${EMPTY} s_file_read
|
||||
|
|
|
@ -15,6 +15,7 @@ Resource ../${RESOURCES}/setup_teardown.robot
|
|||
${PLACEMENT_RULE} = REP 2 IN X CBF 1 SELECT 4 FROM * AS X
|
||||
${EXPECTED_COPIES} = ${2}
|
||||
${CHECK_INTERVAL} = 1 min
|
||||
${CONTAINER_WAIT_INTERVAL} = 1 min
|
||||
|
||||
*** Test cases ***
|
||||
NeoFS Object Replication
|
||||
|
@ -27,11 +28,12 @@ NeoFS Object Replication
|
|||
${WALLET} ${ADDR} ${WIF} = Init Wallet with Address ${ASSETS_DIR}
|
||||
Payment Operations ${ADDR} ${WIF}
|
||||
|
||||
${CID} = Create container ${WIF} ${EMPTY} ${PLACEMENT_RULE}
|
||||
Container Existing ${WIF} ${CID}
|
||||
${CID} = Create container ${WIF} ${EMPTY} ${PLACEMENT_RULE}
|
||||
Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL}
|
||||
... Container Existing ${WIF} ${CID}
|
||||
|
||||
${FILE} = Generate file of bytes ${SIMPLE_OBJ_SIZE}
|
||||
${FILE_HASH} = Get file hash ${FILE}
|
||||
${FILE} = Generate file of bytes ${SIMPLE_OBJ_SIZE}
|
||||
${FILE_HASH} = Get file hash ${FILE}
|
||||
|
||||
${S_OID} = Put object ${WIF} ${FILE} ${CID} ${EMPTY} ${EMPTY}
|
||||
Validate storage policy for object ${WIF} ${EXPECTED_COPIES} ${CID} ${S_OID}
|
||||
|
|
|
@ -9,6 +9,7 @@ ${FILE_USR_HEADER} = key1=1,key2=abc
|
|||
${FILE_USR_HEADER_OTH} = key1=2
|
||||
${UNEXIST_OID} = B2DKvkHnLnPvapbDgfpU1oVUPuXQo5LTfKVxmNDZXQff
|
||||
${PLACEMENT_RULE} = REP 2 IN X CBF 1 SELECT 2 FROM * AS X
|
||||
${CONTAINER_WAIT_INTERVAL} = 1 min
|
||||
|
||||
*** Keywords ***
|
||||
|
||||
|
@ -17,7 +18,8 @@ Prepare container
|
|||
${NEOFS_BALANCE} = Get NeoFS Balance ${WIF}
|
||||
|
||||
${CID} = Create container ${WIF} ${EMPTY} ${PLACEMENT_RULE}
|
||||
Container Existing ${WIF} ${CID}
|
||||
Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL}
|
||||
... Container Existing ${WIF} ${CID}
|
||||
|
||||
${NEW_NEOFS_BALANCE} = Get NeoFS Balance ${WIF}
|
||||
Should Be True ${NEW_NEOFS_BALANCE} < ${NEOFS_BALANCE}
|
||||
|
|
|
@ -3,6 +3,7 @@ Variables ../../../variables/common.py
|
|||
|
||||
Library ../${RESOURCES}/neofs.py
|
||||
Library ../${RESOURCES}/payment_neogo.py
|
||||
Library ${KEYWORDS}/contract_keywords.py
|
||||
|
||||
Resource common_steps_object.robot
|
||||
Resource ../${RESOURCES}/setup_teardown.robot
|
||||
|
|
|
@ -17,7 +17,7 @@ NEOFS_EPOCH_TIMEOUT = (os.getenv("NEOFS_EPOCH_TIMEOUT") if os.getenv("NEOFS_EPOC
|
|||
else os.getenv("NEOFS_IR_TIMERS_EPOCH", "300s"))
|
||||
|
||||
SIMPLE_OBJ_SIZE = os.getenv("SIMPLE_OBJ_SIZE", "1000")
|
||||
COMPLEX_OBJ_SIZE = os.getenv("COMPLEX_OBJ_SIZE", "70000000")
|
||||
COMPLEX_OBJ_SIZE = os.getenv("COMPLEX_OBJ_SIZE", "2000")
|
||||
|
||||
MAINNET_BLOCK_TIME = os.getenv('MAINNET_BLOCK_TIME', "15s")
|
||||
MAINNET_TIMEOUT = os.getenv('MAINNET_TIMEOUT', "1min")
|
||||
|
|
Loading…
Reference in a new issue