2021-07-15 17:57:57 +00:00
|
|
|
*** Settings ***
|
2021-12-09 10:58:51 +00:00
|
|
|
Variables common.py
|
|
|
|
Variables wellknown_acl.py
|
2021-07-15 17:57:57 +00:00
|
|
|
|
2021-12-09 10:58:51 +00:00
|
|
|
Library neofs.py
|
2022-03-15 11:58:59 +00:00
|
|
|
Library neofs_verbs.py
|
2021-12-09 10:58:51 +00:00
|
|
|
Library payment_neogo.py
|
2021-07-15 17:57:57 +00:00
|
|
|
Library String
|
2022-03-15 11:58:59 +00:00
|
|
|
Library Collections
|
2021-07-15 17:57:57 +00:00
|
|
|
|
2021-12-09 10:58:51 +00:00
|
|
|
Resource setup_teardown.robot
|
|
|
|
Resource payment_operations.robot
|
2021-07-15 17:57:57 +00:00
|
|
|
|
|
|
|
*** Variables ***
|
|
|
|
${POLICY} = REP 2 IN X CBF 1 SELECT 2 FROM * AS X
|
2022-03-15 11:58:59 +00:00
|
|
|
&{ATTR_FILENAME} = FileName=new
|
|
|
|
${ATTR_DUPLICATE} = FileType=jpg,FileType=png
|
|
|
|
&{ATTR_NONE} = NoAttribute=''
|
|
|
|
&{ATTR_SINGLE} = AttrNum=one
|
2021-07-15 17:57:57 +00:00
|
|
|
|
|
|
|
*** Test Cases ***
|
|
|
|
|
|
|
|
Duplicated Object Attributes
|
|
|
|
[Documentation] Testcase to check duplicated attributes.
|
|
|
|
[Tags] Object NeoFS NeoCLI
|
|
|
|
[Timeout] 10 min
|
|
|
|
|
|
|
|
[Setup] Setup
|
|
|
|
|
|
|
|
${WALLET} ${ADDR} ${USER_KEY} = Init Wallet with Address ${ASSETS_DIR}
|
|
|
|
Payment Operations ${ADDR} ${USER_KEY}
|
|
|
|
|
2022-03-15 11:58:59 +00:00
|
|
|
${PUBLIC_CID} = Create container ${USER_KEY} ${PUBLIC_ACL_F} ${POLICY} ${EMPTY}
|
2021-07-15 17:57:57 +00:00
|
|
|
${FILE_S} = Generate file of bytes ${SIMPLE_OBJ_SIZE}
|
|
|
|
|
|
|
|
|
|
|
|
###################################################
|
|
|
|
# Checking that object attributes cannot duplicate
|
|
|
|
###################################################
|
|
|
|
|
|
|
|
Run Keyword And Expect Error *
|
2022-03-15 11:58:59 +00:00
|
|
|
... Put object ${USER_KEY} ${FILE_S} ${PUBLIC_CID} user_headers=${ATTR_FILENAME}
|
|
|
|
# Robot doesn't allow to create a dictionary with the same keys, so using plain text option here
|
2021-07-15 17:57:57 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-03-15 11:58:59 +00:00
|
|
|
... Put object ${USER_KEY} ${FILE_S} ${PUBLIC_CID} options=--attributes ${ATTR_DUPLICATE}
|
2021-07-15 17:57:57 +00:00
|
|
|
|
|
|
|
##################################################
|
|
|
|
# Checking that object cannot have empty attibute
|
|
|
|
##################################################
|
|
|
|
|
|
|
|
Run Keyword And Expect Error *
|
2022-03-15 11:58:59 +00:00
|
|
|
... Put object ${USER_KEY} ${FILE_S} ${PUBLIC_CID} user_headers=${ATTR_NONE}
|
2021-07-15 17:57:57 +00:00
|
|
|
|
|
|
|
#####################################################
|
|
|
|
# Checking a successful step with a single attribute
|
|
|
|
#####################################################
|
|
|
|
|
2022-03-15 11:58:59 +00:00
|
|
|
${OID} = Put object ${USER_KEY} ${FILE_S} ${PUBLIC_CID} user_headers=${ATTR_SINGLE}
|
|
|
|
${HEADER} = Head object ${USER_KEY} ${PUBLIC_CID} ${OID}
|
|
|
|
Dictionary Should Contain Sub Dictionary
|
|
|
|
... ${HEADER}[header][attributes]
|
|
|
|
... ${ATTR_SINGLE}
|
|
|
|
... msg="No expected User Attribute in HEAD response"
|
2021-07-15 17:57:57 +00:00
|
|
|
|
|
|
|
[Teardown] Teardown object_attributes
|