frostfs-testcases/robot/testsuites/integration/container/container_attributes.robot
Elizaveta Chichindaeva 89a4c6daa7 [#424] neofs-cli: WIF replaced with wallets
Signed-off-by: Elizaveta Chichindaeva <elizaveta@nspcc.ru>
2022-04-27 17:38:15 +03:00

61 lines
2.5 KiB
Text

*** Settings ***
Variables common.py
Library neofs.py
Library payment_neogo.py
Library String
Library Collections
Resource setup_teardown.robot
Resource payment_operations.robot
Resource common_steps_acl_bearer.robot
*** Variables ***
${POLICY} = REP 2 IN X CBF 1 SELECT 2 FROM * AS X
${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
[Documentation] Testcase to check duplicated container attributes.
[Tags] Container NeoFS NeoCLI
[Timeout] 10 min
[Setup] Setup
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
######################################################
# Checking that container attributes cannot duplicate
######################################################
Run Keyword And Expect Error *
... Create container ${WALLET} ${EMPTY} ${POLICY} ${ATTR_TIME}
Run Keyword And Expect Error *
... Create container ${WALLET} ${EMPTY} ${POLICY} ${ATTR_DUPLICATE}
######################################################
# Checking that container cannot have empty attribute
######################################################
Run Keyword And Expect Error *
... Create container ${WALLET} ${EMPTY} ${POLICY} ${ATTR_NONE}
#####################################################
# Checking a successful step with a single attribute
#####################################################
${CID} = Create container ${WALLET} ${EMPTY} ${POLICY} ${ATTR_SINGLE}
Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL}
... Container Existing ${WALLET} ${CID}
${ATTRIBUTES} = Get container attributes ${WALLET} ${CID} ${EMPTY} json_output=True
&{ATTRIBUTES_DICT} = Decode Container Attributes Json ${ATTRIBUTES}
List Should Contain Value
... ${ATTRIBUTES_DICT}[Attributes]
... ${ATTR_SINGLE}
... "No expected container attributes found"
[Teardown] Teardown container_attributes