Waiting for container to appear in network; decrease complex object size

Signed-off-by: anastasia prasolova <anastasia@nspcc.ru>
This commit is contained in:
anastasia prasolova 2021-08-31 18:16:19 +03:00 committed by Anastasia Prasolova
parent fe99c143aa
commit be281428b5
11 changed files with 53 additions and 27 deletions

View file

@ -18,7 +18,7 @@ BearerToken Operations with Filter OID NotEqual
[Setup] Setup [Setup] Setup
Generate eACL Keys Generate Keys
Prepare eACL Role rules Prepare eACL Role rules
Log Check Bearer token with simple object Log Check Bearer token with simple object

View file

@ -2,20 +2,26 @@
Variables ../../../variables/common.py Variables ../../../variables/common.py
Variables ../../../variables/acl.py Variables ../../../variables/acl.py
*** Variables ***
${CONTAINER_WAIT_INTERVAL} = 1 min
*** Keywords *** *** Keywords ***
Create Containers Create Containers
Log Create Private Container Log Create Private Container
${PRIV_CID_GEN} = Create container ${USER_KEY} ${PRIVATE_ACL} ${COMMON_PLACEMENT_RULE} ${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 Log Create Public Container
${PUBLIC_CID_GEN} = Create container ${USER_KEY} ${PUBLIC_ACL} ${COMMON_PLACEMENT_RULE} ${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 Log Create Read-Only Container
${READONLY_CID_GEN} = Create container ${USER_KEY} ${READONLY_ACL} ${COMMON_PLACEMENT_RULE} ${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 ${PRIV_CID} ${PRIV_CID_GEN}
Set Global Variable ${PUBLIC_CID} ${PUBLIC_CID_GEN} Set Global Variable ${PUBLIC_CID} ${PUBLIC_CID_GEN}

View file

@ -6,18 +6,21 @@ Variables ../../../variables/acl.py
${FILE_USR_HEADER} = key1=1,key2=abc ${FILE_USR_HEADER} = key1=1,key2=abc
${FILE_USR_HEADER_DEL} = key1=del,key2=del ${FILE_USR_HEADER_DEL} = key1=del,key2=del
${FILE_OTH_HEADER} = key1=oth,key2=oth ${FILE_OTH_HEADER} = key1=oth,key2=oth
${CONTAINER_WAIT_INTERVAL} = 1 min
*** Keywords *** *** Keywords ***
Create Container Public Create Container Public
Log Create Public Container
${PUBLIC_CID_GEN} = Create container ${USER_KEY} 0x0FFFFFFF ${COMMON_PLACEMENT_RULE} ${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} [Return] ${PUBLIC_CID_GEN}
Create Container Inaccessible Create Container Inaccessible
Log Create Inaccessible Container
${INACCESSIBLE_CID_GEN} = Create container ${USER_KEY} ${INACCESSIBLE_ACL} ${COMMON_PLACEMENT_RULE} ${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} [Return] ${INACCESSIBLE_CID_GEN}

View file

@ -5,12 +5,15 @@ Variables ../../../variables/common.py
${FILE_USR_HEADER} = key1=1,key2=abc ${FILE_USR_HEADER} = key1=1,key2=abc
${FILE_USR_HEADER_DEL} = key1=del,key2=del ${FILE_USR_HEADER_DEL} = key1=del,key2=del
${FILE_OTH_HEADER} = key1=oth,key2=oth ${FILE_OTH_HEADER} = key1=oth,key2=oth
${CONTAINER_WAIT_INTERVAL} = 1 min
*** Keywords *** *** Keywords ***
Create Container Public Create Container Public
Log Create Public Container Log Create Public Container
${PUBLIC_CID_GEN} = Create container ${USER_KEY} 0x4FFFFFFF ${COMMON_PLACEMENT_RULE} ${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} [Return] ${PUBLIC_CID_GEN}

View file

@ -16,6 +16,7 @@ ${ATTR_TIME} = Timestamp=new
${ATTR_DUPLICATE} = Size=small, Size=big ${ATTR_DUPLICATE} = Size=small, Size=big
${ATTR_NONE} = NoAttribute='' ${ATTR_NONE} = NoAttribute=''
${ATTR_SINGLE} = AttrNum=one ${ATTR_SINGLE} = AttrNum=one
${CONTAINER_WAIT_INTERVAL} = 1 min
*** Test Cases *** *** Test Cases ***
Duplicated Container Attributes Duplicated Container Attributes
@ -49,6 +50,8 @@ Duplicated Container Attributes
##################################################### #####################################################
${CID} = Create container ${USER_KEY} ${EMPTY} ${POLICY} ${ATTR_SINGLE} ${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} = Get container attributes ${USER_KEY} ${CID} ${EMPTY} json_output=True
${ATTRIBUTES_DICT} = Decode Container Attributes Json ${ATTRIBUTES} ${ATTRIBUTES_DICT} = Decode Container Attributes Json ${ATTRIBUTES}
Verify Head Attribute ${ATTRIBUTES_DICT} ${ATTR_SINGLE} Verify Head Attribute ${ATTRIBUTES_DICT} ${ATTR_SINGLE}

View file

@ -9,6 +9,9 @@ Library ${KEYWORDS}/wallet_keywords.py
Resource ../${RESOURCES}/setup_teardown.robot Resource ../${RESOURCES}/setup_teardown.robot
Resource ../${RESOURCES}/payment_operations.robot Resource ../${RESOURCES}/payment_operations.robot
*** Variables ***
${CONTAINER_WAIT_INTERVAL} = 1 min
*** Test Cases *** *** Test Cases ***
Delete Containers Delete Containers
[Documentation] Testcase to check if containers can be deleted. [Documentation] Testcase to check if containers can be deleted.
@ -23,7 +26,8 @@ Delete Containers
Payment Operations ${ADDR_OTH} ${OTHER_KEY} Payment Operations ${ADDR_OTH} ${OTHER_KEY}
${CID} = Create container ${USER_KEY} ${PUBLIC_ACL} ${COMMON_PLACEMENT_RULE} ${CID} = Create container ${USER_KEY} ${PUBLIC_ACL} ${COMMON_PLACEMENT_RULE}
Container Existing ${USER_KEY} ${CID} Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL}
... Container Existing ${USER_KEY} ${CID}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete Container ${CID} ${OTHER_KEY} ... Delete Container ${CID} ${OTHER_KEY}
@ -35,4 +39,3 @@ Delete Containers
Log Container cannot be deleted: ${EXPECTED_ERROR} Log Container cannot be deleted: ${EXPECTED_ERROR}
[Teardown] Teardown container_delete [Teardown] Teardown container_delete

View file

@ -9,6 +9,8 @@ Library ${KEYWORDS}/rpc_call_keywords.py
Resource ../${RESOURCES}/payment_operations.robot Resource ../${RESOURCES}/payment_operations.robot
Resource ../${RESOURCES}/setup_teardown.robot Resource ../${RESOURCES}/setup_teardown.robot
*** Variables ***
${CONTAINER_WAIT_INTERVAL} = 1 min
*** Test cases *** *** Test cases ***
NeoFS Simple Netmap NeoFS Simple Netmap
@ -88,7 +90,8 @@ Validate Policy
Log Container with rule ${POLICY} Log Container with rule ${POLICY}
${CID} = Create container ${PRIV_KEY} ${EMPTY} ${POLICY} ${CID} = Create container ${PRIV_KEY} ${EMPTY} ${POLICY}
Container Existing ${PRIV_KEY} ${CID} 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} ${S_OID} = Put object ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} ${EMPTY}
Validate storage policy for object ${PRIV_KEY} ${EXPECTED_VAL} ${CID} ${S_OID} ${EXPECTED_LIST} 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 Get object ${PRIV_KEY} ${CID} ${S_OID} ${EMPTY} s_file_read

View file

@ -15,6 +15,7 @@ Resource ../${RESOURCES}/setup_teardown.robot
${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
${EXPECTED_COPIES} = ${2} ${EXPECTED_COPIES} = ${2}
${CHECK_INTERVAL} = 1 min ${CHECK_INTERVAL} = 1 min
${CONTAINER_WAIT_INTERVAL} = 1 min
*** Test cases *** *** Test cases ***
NeoFS Object Replication NeoFS Object Replication
@ -28,7 +29,8 @@ NeoFS Object Replication
Payment Operations ${ADDR} ${WIF} Payment Operations ${ADDR} ${WIF}
${CID} = Create container ${WIF} ${EMPTY} ${PLACEMENT_RULE} ${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}
${FILE} = Generate file of bytes ${SIMPLE_OBJ_SIZE} ${FILE} = Generate file of bytes ${SIMPLE_OBJ_SIZE}
${FILE_HASH} = Get file hash ${FILE} ${FILE_HASH} = Get file hash ${FILE}

View file

@ -9,6 +9,7 @@ ${FILE_USR_HEADER} = key1=1,key2=abc
${FILE_USR_HEADER_OTH} = key1=2 ${FILE_USR_HEADER_OTH} = key1=2
${UNEXIST_OID} = B2DKvkHnLnPvapbDgfpU1oVUPuXQo5LTfKVxmNDZXQff ${UNEXIST_OID} = B2DKvkHnLnPvapbDgfpU1oVUPuXQo5LTfKVxmNDZXQff
${PLACEMENT_RULE} = REP 2 IN X CBF 1 SELECT 2 FROM * AS X ${PLACEMENT_RULE} = REP 2 IN X CBF 1 SELECT 2 FROM * AS X
${CONTAINER_WAIT_INTERVAL} = 1 min
*** Keywords *** *** Keywords ***
@ -17,7 +18,8 @@ Prepare container
${NEOFS_BALANCE} = Get NeoFS Balance ${WIF} ${NEOFS_BALANCE} = Get NeoFS Balance ${WIF}
${CID} = Create container ${WIF} ${EMPTY} ${PLACEMENT_RULE} ${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} ${NEW_NEOFS_BALANCE} = Get NeoFS Balance ${WIF}
Should Be True ${NEW_NEOFS_BALANCE} < ${NEOFS_BALANCE} Should Be True ${NEW_NEOFS_BALANCE} < ${NEOFS_BALANCE}

View file

@ -3,6 +3,7 @@ Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ${KEYWORDS}/contract_keywords.py
Resource common_steps_object.robot Resource common_steps_object.robot
Resource ../${RESOURCES}/setup_teardown.robot Resource ../${RESOURCES}/setup_teardown.robot

View file

@ -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")) else os.getenv("NEOFS_IR_TIMERS_EPOCH", "300s"))
SIMPLE_OBJ_SIZE = os.getenv("SIMPLE_OBJ_SIZE", "1000") 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_BLOCK_TIME = os.getenv('MAINNET_BLOCK_TIME', "15s")
MAINNET_TIMEOUT = os.getenv('MAINNET_TIMEOUT', "1min") MAINNET_TIMEOUT = os.getenv('MAINNET_TIMEOUT', "1min")