-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#122) neofs-cli control drop-objects test case
Signed-off-by: Elizaveta Chichindaeva <[email protected]>
- Loading branch information
Showing
4 changed files
with
103 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 84 additions & 0 deletions
84
robot/testsuites/integration/network/netmap_control_drop.robot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
*** Settings *** | ||
Variables ../../../variables/common.py | ||
Variables ../../../variables/acl.py | ||
|
||
Library Process | ||
Library contract_keywords.py | ||
Library neofs.py | ||
Library String | ||
|
||
Library payment_neogo.py | ||
|
||
Resource setup_teardown.robot | ||
Resource payment_operations.robot | ||
Resource storage.robot | ||
|
||
*** Variables *** | ||
${CONTAINER_WAIT_INTERVAL} = 1 min | ||
|
||
*** Test Cases *** | ||
Drop command in control group | ||
[Documentation] Testcase to check drop-objects command from control group. | ||
[Tags] NeoFSCLI | ||
[Timeout] 10 min | ||
|
||
[Setup] Setup | ||
|
||
${NODE_NUM} ${NODE} ${WIF} = Get control endpoint with wif | ||
${LOCODE} = Get Locode | ||
|
||
${FILE_SIMPLE} = Generate file of bytes ${SIMPLE_OBJ_SIZE} | ||
${FILE_COMPLEX} = Generate file of bytes ${COMPLEX_OBJ_SIZE} | ||
|
||
${WALLET} ${ADDR} ${USER_KEY} = Init Wallet with Address ${ASSETS_DIR} | ||
Payment Operations ${ADDR} ${USER_KEY} | ||
|
||
${PRIV_CID} = Create container ${USER_KEY} ${PRIVATE_ACL} REP 1 CBF 1 SELECT 1 FROM * FILTER 'UN-LOCODE' EQ '${LOCODE}' AS LOC | ||
Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL} | ||
... Container Existing ${USER_KEY} ${PRIV_CID} | ||
|
||
######################### | ||
# Dropping simple object | ||
######################### | ||
|
||
${S_OID} = Put object ${USER_KEY} ${FILE_SIMPLE} ${PRIV_CID} ${EMPTY} ${EMPTY} | ||
Get object ${USER_KEY} ${PRIV_CID} ${S_OID} ${EMPTY} s_file_read | ||
Head object ${NEOFS_IR_WIF} ${PRIV_CID} ${S_OID} ${EMPTY} ${EMPTY} | ||
|
||
Drop object ${NODE} ${WIF} ${PRIV_CID} ${S_OID} | ||
|
||
Wait Until Keyword Succeeds 3x ${SHARD_0_GC_SLEEP} | ||
... Run Keyword And Expect Error Error:* | ||
... Get object ${USER_KEY} ${PRIV_CID} ${S_OID} ${EMPTY} s_file_read options='--ttl 1' | ||
Run Keyword And Expect Error Error:* | ||
... Head object ${NEOFS_IR_WIF} ${PRIV_CID} ${S_OID} ${EMPTY} ${EMPTY} | ||
|
||
Drop object ${NODE} ${WIF} ${PRIV_CID} ${S_OID} | ||
|
||
########################## | ||
# Dropping complex object | ||
########################## | ||
|
||
${C_OID} = Put object ${USER_KEY} ${FILE_COMPLEX} ${PRIV_CID} ${EMPTY} ${EMPTY} | ||
Get object ${USER_KEY} ${PRIV_CID} ${C_OID} ${EMPTY} s_file_read | ||
Head object ${NEOFS_IR_WIF} ${PRIV_CID} ${C_OID} ${EMPTY} ${EMPTY} | ||
|
||
Drop object ${NODE} ${WIF} ${PRIV_CID} ${C_OID} | ||
|
||
Get object ${USER_KEY} ${PRIV_CID} ${C_OID} ${EMPTY} s_file_read | ||
Head object ${NEOFS_IR_WIF} ${PRIV_CID} ${C_OID} ${EMPTY} ${EMPTY} | ||
|
||
@{SPLIT_OIDS} = Get Split objects ${USER_KEY} ${PRIV_CID} ${C_OID} | ||
FOR ${CHILD_OID} IN @{SPLIT_OIDS} | ||
Drop object ${NODE} ${WIF} ${PRIV_CID} ${CHILD_OID} | ||
|
||
END | ||
|
||
Wait Until Keyword Succeeds 3x ${SHARD_0_GC_SLEEP} | ||
... Run Keyword And Expect Error Error:* | ||
... Get object ${USER_KEY} ${PRIV_CID} ${C_OID} ${EMPTY} s_file_read options='--ttl 1' | ||
Run Keyword And Expect Error Error:* | ||
... Head object ${NEOFS_IR_WIF} ${PRIV_CID} ${C_OID} ${EMPTY} ${EMPTY} | ||
|
||
|
||
[Teardown] Teardown netmap_control_drop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
PUBLIC_ACL = "0x1FFFFFFF" | ||
PRIVATE_ACL = "0x18888888" | ||
READONLY_ACL = "0x1FFF88FF" | ||
INACCESSIBLE_ACL = "0x40000000 " | ||
INACCESSIBLE_ACL = "0x40000000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters