forked from TrueCloudLab/frostfs-testcases
Refactored Head object
operation: removed placeholders for optional
parameters; JSON output set as a default Signed-off-by: anastasia prasolova <anastasia@nspcc.ru>
This commit is contained in:
parent
0ef41a8495
commit
d66ae5b7fc
28 changed files with 710 additions and 722 deletions
|
@ -12,10 +12,10 @@ Resource payment_operations.robot
|
|||
|
||||
*** Variables ***
|
||||
${POLICY} = REP 2 IN X CBF 1 SELECT 2 FROM * AS X
|
||||
${ATTR_FILENAME} = FileName=new
|
||||
${ATTR_DUPLICATE} = FileType=jpg, FileType=png
|
||||
${ATTR_NONE} = NoAttribute=''
|
||||
${ATTR_SINGLE} = AttrNum=one
|
||||
&{ATTR_FILENAME} = FileName=new
|
||||
${ATTR_DUPLICATE} = FileType=jpg,FileType=png
|
||||
&{ATTR_NONE} = NoAttribute=''
|
||||
&{ATTR_SINGLE} = AttrNum=one
|
||||
|
||||
*** Test Cases ***
|
||||
|
||||
|
@ -29,7 +29,7 @@ Duplicated Object Attributes
|
|||
${WALLET} ${ADDR} ${USER_KEY} = Init Wallet with Address ${ASSETS_DIR}
|
||||
Payment Operations ${ADDR} ${USER_KEY}
|
||||
|
||||
${PUBLIC_CID} = Create container ${USER_KEY} ${PUBLIC_ACL_F} ${POLICY} ${EMPTY}
|
||||
${PUBLIC_CID} = Create container ${USER_KEY} ${PUBLIC_ACL_F} ${POLICY} ${EMPTY}
|
||||
${FILE_S} = Generate file of bytes ${SIMPLE_OBJ_SIZE}
|
||||
|
||||
|
||||
|
@ -38,24 +38,27 @@ Duplicated Object Attributes
|
|||
###################################################
|
||||
|
||||
Run Keyword And Expect Error *
|
||||
... Put object ${USER_KEY} ${FILE_S} ${PUBLIC_CID} ${EMPTY} ${ATTR_FILENAME}
|
||||
... 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
|
||||
Run Keyword And Expect Error *
|
||||
... Put object ${USER_KEY} ${FILE_S} ${PUBLIC_CID} ${EMPTY} ${ATTR_DUPLICATE}
|
||||
... Put object ${USER_KEY} ${FILE_S} ${PUBLIC_CID} options=--attributes ${ATTR_DUPLICATE}
|
||||
|
||||
##################################################
|
||||
# Checking that object cannot have empty attibute
|
||||
##################################################
|
||||
|
||||
Run Keyword And Expect Error *
|
||||
... Put object ${USER_KEY} ${FILE_S} ${PUBLIC_CID} ${EMPTY} ${ATTR_NONE}
|
||||
... Put object ${USER_KEY} ${FILE_S} ${PUBLIC_CID} user_headers=${ATTR_NONE}
|
||||
|
||||
#####################################################
|
||||
# Checking a successful step with a single attribute
|
||||
#####################################################
|
||||
|
||||
${OID} = Put object ${USER_KEY} ${FILE_S} ${PUBLIC_CID} ${EMPTY} ${ATTR_SINGLE}
|
||||
${HEAD} = Head object ${USER_KEY} ${PUBLIC_CID} ${OID} json_output=True
|
||||
${HEADER_58} = Decode Object System Header Json ${HEAD}
|
||||
Verify Head Attribute ${HEADER_58} ${ATTR_SINGLE}
|
||||
${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"
|
||||
|
||||
[Teardown] Teardown object_attributes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue