2021-07-15 20:57:57 +03:00
|
|
|
*** Settings ***
|
2021-12-09 13:58:51 +03:00
|
|
|
Variables common.py
|
|
|
|
Variables wellknown_acl.py
|
2021-07-15 20:57:57 +03:00
|
|
|
|
2022-04-25 12:53:20 +03:00
|
|
|
Library container.py
|
|
|
|
Library neofs_verbs.py
|
2022-05-20 14:18:14 +03:00
|
|
|
Library utility_keywords.py
|
2022-04-25 12:53:20 +03:00
|
|
|
Library Collections
|
2021-07-15 20:57:57 +03:00
|
|
|
|
2021-12-09 13:58:51 +03:00
|
|
|
Resource setup_teardown.robot
|
|
|
|
Resource payment_operations.robot
|
2021-07-15 20:57:57 +03:00
|
|
|
|
|
|
|
*** Variables ***
|
2022-03-15 14:58:59 +03:00
|
|
|
&{ATTR_FILENAME} = FileName=new
|
|
|
|
${ATTR_DUPLICATE} = FileType=jpg,FileType=png
|
|
|
|
&{ATTR_NONE} = NoAttribute=''
|
|
|
|
&{ATTR_SINGLE} = AttrNum=one
|
2021-07-15 20:57:57 +03:00
|
|
|
|
|
|
|
*** Test Cases ***
|
|
|
|
|
|
|
|
Duplicated Object Attributes
|
|
|
|
[Documentation] Testcase to check duplicated attributes.
|
2022-04-25 12:53:20 +03:00
|
|
|
[Tags] Object
|
2021-07-15 20:57:57 +03:00
|
|
|
[Timeout] 10 min
|
|
|
|
|
|
|
|
[Setup] Setup
|
|
|
|
|
2022-02-01 16:42:41 +03:00
|
|
|
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
2021-07-15 20:57:57 +03:00
|
|
|
|
2022-04-25 12:53:20 +03:00
|
|
|
${PUBLIC_CID} = Create Container ${WALLET} basic_acl=${PUBLIC_ACL_F}
|
2022-05-20 14:18:14 +03:00
|
|
|
${FILE_S} ${_} = Generate File ${SIMPLE_OBJ_SIZE}
|
2021-07-15 20:57:57 +03:00
|
|
|
|
|
|
|
|
|
|
|
###################################################
|
|
|
|
# Checking that object attributes cannot duplicate
|
|
|
|
###################################################
|
|
|
|
|
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 16:42:41 +03:00
|
|
|
... Put object ${WALLET} ${FILE_S} ${PUBLIC_CID} user_headers=${ATTR_FILENAME}
|
2022-03-15 14:58:59 +03:00
|
|
|
# Robot doesn't allow to create a dictionary with the same keys, so using plain text option here
|
2021-07-15 20:57:57 +03:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 16:42:41 +03:00
|
|
|
... Put object ${WALLET} ${FILE_S} ${PUBLIC_CID} options=--attributes ${ATTR_DUPLICATE}
|
2021-07-15 20:57:57 +03:00
|
|
|
|
|
|
|
##################################################
|
|
|
|
# Checking that object cannot have empty attibute
|
|
|
|
##################################################
|
|
|
|
|
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 16:42:41 +03:00
|
|
|
... Put object ${WALLET} ${FILE_S} ${PUBLIC_CID} user_headers=${ATTR_NONE}
|
2021-07-15 20:57:57 +03:00
|
|
|
|
|
|
|
#####################################################
|
|
|
|
# Checking a successful step with a single attribute
|
|
|
|
#####################################################
|
|
|
|
|
2022-02-01 16:42:41 +03:00
|
|
|
${OID} = Put object ${WALLET} ${FILE_S} ${PUBLIC_CID} user_headers=${ATTR_SINGLE}
|
|
|
|
${HEADER} = Head object ${WALLET} ${PUBLIC_CID} ${OID}
|
2022-03-15 14:58:59 +03:00
|
|
|
Dictionary Should Contain Sub Dictionary
|
|
|
|
... ${HEADER}[header][attributes]
|
|
|
|
... ${ATTR_SINGLE}
|
|
|
|
... msg="No expected User Attribute in HEAD response"
|
2021-07-15 20:57:57 +03:00
|
|
|
|
2022-04-25 12:53:20 +03:00
|
|
|
[Teardown] Teardown object_attributes
|