forked from TrueCloudLab/frostfs-testcases
removed robot tests
Signed-off-by: anastasia prasolova <anastasia@nspcc.ru>
This commit is contained in:
parent
6110de9268
commit
b6cbd7c07c
59 changed files with 0 additions and 4169 deletions
|
@ -1,24 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Prepare eACL Role rules
|
|
||||||
[Arguments] ${CID}
|
|
||||||
|
|
||||||
# eACL rules for all operations and similar permissions
|
|
||||||
@{Roles} = Create List others user system
|
|
||||||
FOR ${role} IN @{Roles}
|
|
||||||
${rule1} = Set Variable deny get ${role}
|
|
||||||
${rule2} = Set Variable deny head ${role}
|
|
||||||
${rule3} = Set Variable deny put ${role}
|
|
||||||
${rule4} = Set Variable deny delete ${role}
|
|
||||||
${rule5} = Set Variable deny search ${role}
|
|
||||||
${rule6} = Set Variable deny getrange ${role}
|
|
||||||
${rule7} = Set Variable deny getrangehash ${role}
|
|
||||||
|
|
||||||
${eACL_gen} = Create List ${rule1} ${rule2} ${rule3} ${rule4} ${rule5} ${rule6} ${rule7}
|
|
||||||
${EACL_FILE} = Create eACL ${CID} ${eACL_gen}
|
|
||||||
Set Global Variable ${EACL_DENY_ALL_${role}} ${EACL_FILE}
|
|
||||||
END
|
|
||||||
[Return] gen_eacl_deny_all_${role}
|
|
|
@ -1,216 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
Variables eacl_object_filters.py
|
|
||||||
|
|
||||||
Library acl.py
|
|
||||||
Library container.py
|
|
||||||
Library neofs_verbs.py
|
|
||||||
|
|
||||||
Library Collections
|
|
||||||
Library String
|
|
||||||
|
|
||||||
Resource payment_operations.robot
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
&{USER_HEADER} = key1=1 key2=abc
|
|
||||||
&{USER_HEADER_DEL} = key1=del key2=del
|
|
||||||
&{ANOTHER_HEADER} = key1=oth key2=oth
|
|
||||||
${OBJECT_PATH} = testfile
|
|
||||||
${EACL_ERR_MSG} = *
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Check eACL Deny and Allow All
|
|
||||||
[Arguments] ${WALLET} ${DENY_EACL} ${ALLOW_EACL} ${USER_WALLET}
|
|
||||||
|
|
||||||
${CID} = Create Container ${USER_WALLET} basic_acl=eacl-public-read-write
|
|
||||||
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
${S_OID_USER} = Put object ${USER_WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
||||||
${D_OID_USER} = Put object ${USER_WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER_DEL}
|
|
||||||
@{S_OBJ_H} = Create List ${S_OID_USER}
|
|
||||||
|
|
||||||
Put object ${WALLET} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
|
|
||||||
|
|
||||||
Get object ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
||||||
Search object ${WALLET} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
|
||||||
Head object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
|
|
||||||
Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256
|
|
||||||
Get Range Hash ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
||||||
Delete object ${WALLET} ${CID} ${D_OID_USER}
|
|
||||||
|
|
||||||
Set eACL ${USER_WALLET} ${CID} ${DENY_EACL}
|
|
||||||
|
|
||||||
# The current ACL cache lifetime is 30 sec
|
|
||||||
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Put object ${WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get object ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Search object ${WALLET} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Head object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range Hash ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
|
|
||||||
Set eACL ${USER_WALLET} ${CID} ${ALLOW_EACL}
|
|
||||||
|
|
||||||
# The current ACL cache lifetime is 30 sec
|
|
||||||
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
||||||
|
|
||||||
Put object ${WALLET} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
|
|
||||||
Get object ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
||||||
Search object ${WALLET} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
|
||||||
Head object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256
|
|
||||||
Get Range Hash ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
||||||
Delete object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
|
|
||||||
Compose eACL Custom
|
|
||||||
[Arguments] ${CID} ${filter_value} ${MATCH_TYPE} ${FILTER} ${ACCESS} ${ROLE}
|
|
||||||
|
|
||||||
${filters} = Set Variable obj:${FILTER}${MATCH_TYPE}${filter_value}
|
|
||||||
${rule_get}= Set Variable ${ACCESS} get ${filters} ${ROLE}
|
|
||||||
${rule_head}= Set Variable ${ACCESS} head ${filters} ${ROLE}
|
|
||||||
${rule_put}= Set Variable ${ACCESS} put ${filters} ${ROLE}
|
|
||||||
${rule_del}= Set Variable ${ACCESS} delete ${filters} ${ROLE}
|
|
||||||
${rule_search}= Set Variable ${ACCESS} search ${filters} ${ROLE}
|
|
||||||
${rule_range}= Set Variable ${ACCESS} getrange ${filters} ${ROLE}
|
|
||||||
${rule_rangehash}= Set Variable ${ACCESS} getrangehash ${filters} ${ROLE}
|
|
||||||
|
|
||||||
${eACL_gen}= Create List ${rule_get} ${rule_head} ${rule_put} ${rule_del}
|
|
||||||
... ${rule_search} ${rule_range} ${rule_rangehash}
|
|
||||||
${EACL_CUSTOM} = Create eACL ${CID} ${eACL_gen}
|
|
||||||
|
|
||||||
[Return] ${EACL_CUSTOM}
|
|
||||||
|
|
||||||
|
|
||||||
Check eACL Filters with MatchType String Equal
|
|
||||||
[Arguments] ${FILTER}
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
${WALLET_OTH} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
${CID} = Create Container ${WALLET} basic_acl=eacl-public-read-write
|
|
||||||
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
|
|
||||||
${S_OID_USER} = Put Object ${WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
||||||
${D_OID_USER} = Put object ${WALLET} ${FILE_S} ${CID}
|
|
||||||
@{S_OBJ_H} = Create List ${S_OID_USER}
|
|
||||||
|
|
||||||
Get Object ${WALLET_OTH} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
||||||
Search Object ${WALLET_OTH} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
|
||||||
&{HEADER} = Head Object ${WALLET_OTH} ${CID} ${S_OID_USER}
|
|
||||||
Get Range ${WALLET_OTH} ${CID} ${S_OID_USER} 0:256
|
|
||||||
Get Range Hash ${WALLET_OTH} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
||||||
Delete Object ${WALLET_OTH} ${CID} ${D_OID_USER}
|
|
||||||
|
|
||||||
${K} ${V} = Split String ${FILTER} :
|
|
||||||
${EACL_CUSTOM} = Set Variable
|
|
||||||
IF """${v}""" == """objectID"""
|
|
||||||
${EACL_CUSTOM} = Compose eACL Custom ${CID} ${HEADER}[${V}]
|
|
||||||
... = ${FILTER} DENY OTHERS
|
|
||||||
ELSE
|
|
||||||
${EACL_CUSTOM} = Compose eACL Custom ${CID} ${HEADER}[header][${V}]
|
|
||||||
... = ${FILTER} DENY OTHERS
|
|
||||||
END
|
|
||||||
Set eACL ${WALLET} ${CID} ${EACL_CUSTOM}
|
|
||||||
|
|
||||||
# The current ACL cache lifetime is 30 sec
|
|
||||||
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
||||||
|
|
||||||
IF 'GET' in ${VERB_FILTER_DEP}[${FILTER}]
|
|
||||||
Run Keyword And Expect Error ${EACL_ERR_MSG}
|
|
||||||
... Get object ${WALLET_OTH} ${CID} ${S_OID_USER} ${EMPTY} ${OBJECT_PATH}
|
|
||||||
END
|
|
||||||
IF 'HEAD' in ${VERB_FILTER_DEP}[${FILTER}]
|
|
||||||
Run Keyword And Expect error ${EACL_ERR_MSG}
|
|
||||||
... Head object ${WALLET_OTH} ${CID} ${S_OID_USER}
|
|
||||||
END
|
|
||||||
IF 'RANGE' in ${VERB_FILTER_DEP}[${FILTER}]
|
|
||||||
Run Keyword And Expect error ${EACL_ERR_MSG}
|
|
||||||
... Get Range ${WALLET_OTH} ${CID} ${S_OID_USER} 0:256
|
|
||||||
END
|
|
||||||
IF 'SEARCH' in ${VERB_FILTER_DEP}[${FILTER}]
|
|
||||||
Run Keyword And Expect Error ${EACL_ERR_MSG}
|
|
||||||
... Search Object ${WALLET_OTH} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
|
||||||
END
|
|
||||||
IF 'RANGEHASH' in ${VERB_FILTER_DEP}[${FILTER}]
|
|
||||||
Run Keyword And Expect error ${EACL_ERR_MSG}
|
|
||||||
... Get Range Hash ${WALLET_OTH} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
||||||
END
|
|
||||||
IF 'DELETE' in ${VERB_FILTER_DEP}[${FILTER}]
|
|
||||||
Run Keyword And Expect error ${EACL_ERR_MSG}
|
|
||||||
... Delete Object ${WALLET_OTH} ${CID} ${S_OID_USER}
|
|
||||||
END
|
|
||||||
|
|
||||||
Check eACL Filters with MatchType String Not Equal
|
|
||||||
[Arguments] ${FILTER}
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
${WALLET_OTH} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
${CID} = Create Container ${WALLET} basic_acl=eacl-public-read-write
|
|
||||||
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
|
|
||||||
${S_OID_OTH} = Put Object ${WALLET_OTH} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
|
|
||||||
${S_OID_USER} = Put Object ${WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
||||||
${D_OID_USER} = Put object ${WALLET} ${FILE_S} ${CID}
|
|
||||||
@{S_OBJ_H} = Create List ${S_OID_USER}
|
|
||||||
|
|
||||||
Get Object ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
||||||
&{HEADER} = Head Object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
Search Object ${WALLET} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
|
||||||
Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256
|
|
||||||
Get Range Hash ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
||||||
|
|
||||||
${K} ${V} = Split String ${FILTER} :
|
|
||||||
${EACL_CUSTOM} = Set Variable
|
|
||||||
IF """${v}""" == """objectID"""
|
|
||||||
${EACL_CUSTOM} = Compose eACL Custom ${CID} ${HEADER}[${V}]
|
|
||||||
... != ${FILTER} DENY OTHERS
|
|
||||||
ELSE
|
|
||||||
${EACL_CUSTOM} = Compose eACL Custom ${CID} ${HEADER}[header][${V}]
|
|
||||||
... != ${FILTER} DENY OTHERS
|
|
||||||
END
|
|
||||||
Set eACL ${WALLET} ${CID} ${EACL_CUSTOM}
|
|
||||||
|
|
||||||
# The current ACL cache lifetime is 30 sec
|
|
||||||
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
||||||
|
|
||||||
IF 'GET' in ${VERB_FILTER_DEP}[${FILTER}]
|
|
||||||
Run Keyword And Expect Error ${EACL_ERR_MSG}
|
|
||||||
... Get object ${WALLET_OTH} ${CID} ${S_OID_OTH} ${EMPTY} ${OBJECT_PATH}
|
|
||||||
Get object ${WALLET_OTH} ${CID} ${S_OID_USER} ${EMPTY} ${OBJECT_PATH}
|
|
||||||
END
|
|
||||||
IF 'HEAD' in ${VERB_FILTER_DEP}[${FILTER}]
|
|
||||||
Run Keyword And Expect error ${EACL_ERR_MSG}
|
|
||||||
... Head object ${WALLET_OTH} ${CID} ${S_OID_OTH}
|
|
||||||
Head object ${WALLET_OTH} ${CID} ${S_OID_USER}
|
|
||||||
END
|
|
||||||
IF 'SEARCH' in ${VERB_FILTER_DEP}[${FILTER}]
|
|
||||||
Run Keyword And Expect error ${EACL_ERR_MSG}
|
|
||||||
... Search object ${WALLET_OTH} ${CID} ${EMPTY} ${EMPTY} ${ANOTHER_HEADER} ${S_OBJ_H}
|
|
||||||
Search object ${WALLET_OTH} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
|
||||||
END
|
|
||||||
IF 'RANGE' in ${VERB_FILTER_DEP}[${FILTER}]
|
|
||||||
Run Keyword And Expect error ${EACL_ERR_MSG}
|
|
||||||
... Get Range ${WALLET_OTH} ${CID} ${S_OID_OTH} 0:256
|
|
||||||
Get Range ${WALLET_OTH} ${CID} ${S_OID_USER} 0:256
|
|
||||||
END
|
|
||||||
IF 'RANGEHASH' in ${VERB_FILTER_DEP}[${FILTER}]
|
|
||||||
Run Keyword And Expect error ${EACL_ERR_MSG}
|
|
||||||
... Get Range Hash ${WALLET_OTH} ${CID} ${S_OID_OTH} ${EMPTY} 0:256
|
|
||||||
Get Range Hash ${WALLET_OTH} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
||||||
END
|
|
||||||
IF 'DELETE' in ${VERB_FILTER_DEP}[${FILTER}]
|
|
||||||
Run Keyword And Expect error ${EACL_ERR_MSG}
|
|
||||||
... Delete Object ${WALLET_OTH} ${CID} ${S_OID_OTH}
|
|
||||||
Delete Object ${WALLET_OTH} ${CID} ${S_OID_USER}
|
|
||||||
END
|
|
|
@ -1,23 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library complex_object_actions.py
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Get Object Parts By Link Object
|
|
||||||
[Documentation] The keyword accepts the ID of a Large Object, retrieves its split
|
|
||||||
... header and returns all Part Object IDs from Link Object.
|
|
||||||
|
|
||||||
[Arguments] ${WALLET} ${CID} ${LARGE_OID} ${BEARER}=${EMPTY} ${WALLET_CFG}=${WALLET_CONFIG}
|
|
||||||
|
|
||||||
${LINK_OID} = Get Link Object ${WALLET} ${CID} ${LARGE_OID}
|
|
||||||
... bearer_token=${BEARER}
|
|
||||||
... wallet_config=${WALLET_CFG}
|
|
||||||
&{LINK_HEADER} = Head Object ${WALLET} ${CID} ${LINK_OID}
|
|
||||||
... is_raw=True bearer_token=${BEARER}
|
|
||||||
... wallet_config=${WALLET_CFG}
|
|
||||||
|
|
||||||
[Return] ${LINK_HEADER.header.split.children}
|
|
|
@ -1,22 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library utility_keywords.py
|
|
||||||
Library payment_neogo.py
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Prepare Wallet And Deposit
|
|
||||||
[Arguments] ${DEPOSIT}=${30}
|
|
||||||
|
|
||||||
${WALLET}
|
|
||||||
... ${ADDR}
|
|
||||||
... ${WIF} = Generate Wallet
|
|
||||||
Transfer Mainnet Gas ${WALLET} ${DEPOSIT+1}
|
|
||||||
NeoFS Deposit ${WALLET} ${DEPOSIT}
|
|
||||||
# Now we have TX in main chain, but deposit might not propagate into the side chain yet.
|
|
||||||
# For certainty, sleeping during one morph block.
|
|
||||||
Sleep ${MORPH_BLOCK_TIME}
|
|
||||||
|
|
||||||
[Return] ${WALLET} ${ADDR} ${WIF}
|
|
|
@ -1,16 +0,0 @@
|
||||||
|
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library Process
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Drop object
|
|
||||||
[Arguments] ${NODE} ${WALLET_STORAGE} ${CID} ${OID}
|
|
||||||
|
|
||||||
${DROP_SIMPLE} = Run Process ${NEOFS_CLI_EXEC} control drop-objects --endpoint ${NODE} --wallet ${WALLET_STORAGE} --config ${WALLET_CONFIG} -o ${CID}/${OID}
|
|
||||||
... shell=True
|
|
||||||
Log Many stdout: ${DROP_SIMPLE.stdout} stderr: ${DROP_SIMPLE.stderr}
|
|
||||||
Should Be Equal As Integers ${DROP_SIMPLE.rc} 0 Got non-zero return code from CLI
|
|
|
@ -1,131 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library storage_group.py
|
|
||||||
Library Collections
|
|
||||||
|
|
||||||
Resource complex_object_operations.robot
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
${PERMISSION_ERROR} = status: code = 2048 message = access to object operation denied
|
|
||||||
${DEPOSIT} = ${30}
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Run Storage Group Operations And Expect Success
|
|
||||||
[Arguments] ${WALLET} ${CID} ${OBJECTS} ${OBJ_COMPLEXITY}
|
|
||||||
[Documentation] This keyword verifies if Object's owner is granted to
|
|
||||||
... Put, List, Get and Delete a Storage Group which contains
|
|
||||||
... the Object.
|
|
||||||
|
|
||||||
${SG} = Put Storagegroup ${WALLET} ${CID} ${OBJECTS}
|
|
||||||
Verify List Storage Group ${WALLET} ${CID} ${SG}
|
|
||||||
Verify Get Storage Group ${WALLET} ${CID} ${SG} ${OBJECTS} ${OBJ_COMPLEXITY}
|
|
||||||
Delete Storagegroup ${WALLET} ${CID} ${SG}
|
|
||||||
|
|
||||||
|
|
||||||
Run Storage Group Operations And Expect Failure
|
|
||||||
[Arguments] ${WALLET} ${CID} ${OBJECTS} ${SG}
|
|
||||||
[Documentation] This keyword verifies if Object's owner isn't granted to
|
|
||||||
... Put, List, Get and Delete a Storage Group which contains
|
|
||||||
... the Object.
|
|
||||||
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Put Storagegroup ${WALLET} ${CID} ${OBJECTS}
|
|
||||||
Should Contain ${ERR} ${PERMISSION_ERROR}
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... List Storagegroup ${WALLET} ${CID}
|
|
||||||
Should Contain ${ERR} ${PERMISSION_ERROR}
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Get Storagegroup ${WALLET} ${CID} ${SG}
|
|
||||||
Should Contain ${ERR} ${PERMISSION_ERROR}
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Delete Storagegroup ${WALLET} ${CID} ${SG}
|
|
||||||
Should Contain ${ERR} ${PERMISSION_ERROR}
|
|
||||||
|
|
||||||
|
|
||||||
Run Storage Group Operations With Bearer Token
|
|
||||||
[Arguments] ${WALLET} ${CID} ${OBJECTS} ${BEARER} ${OBJ_COMPLEXITY}
|
|
||||||
|
|
||||||
${SG} = Put Storagegroup ${WALLET} ${CID} ${OBJECTS} bearer_token=${BEARER}
|
|
||||||
Verify List Storage Group ${WALLET} ${CID} ${SG} ${BEARER}
|
|
||||||
Verify Get Storage Group ${WALLET} ${CID} ${SG} ${OBJECTS} ${OBJ_COMPLEXITY} ${BEARER}
|
|
||||||
Delete Storagegroup ${WALLET} ${CID} ${SG} bearer_token=${BEARER}
|
|
||||||
|
|
||||||
|
|
||||||
Run Storage Group Operations On Other's Behalf In RO Container
|
|
||||||
[Arguments] ${OWNER_WALLET} ${CID} ${OBJECTS} ${OBJ_COMPLEXITY}
|
|
||||||
[Documentation] ${OWNER_WALLET}: ${OBJECTS}' owner wallet
|
|
||||||
... ${CID}: ID of read-only container
|
|
||||||
... ${OBJECTS}: list of Object IDs to include into the Storage Group
|
|
||||||
... ${OBJ_COMPLEXITY}: [Complex|Simple]
|
|
||||||
|
|
||||||
${OTHER_WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
${SG} = Put Storagegroup ${OWNER_WALLET} ${CID} ${OBJECTS}
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Put Storagegroup ${OTHER_WALLET} ${CID} ${OBJECTS}
|
|
||||||
Should Contain ${ERR} ${PERMISSION_ERROR}
|
|
||||||
|
|
||||||
Verify List Storage Group ${OTHER_WALLET} ${CID} ${SG}
|
|
||||||
Verify Get Storage Group ${OTHER_WALLET} ${CID} ${SG} ${OBJECTS} ${OBJ_COMPLEXITY}
|
|
||||||
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Delete Storagegroup ${OTHER_WALLET} ${CID} ${SG}
|
|
||||||
Should Contain ${ERR} ${PERMISSION_ERROR}
|
|
||||||
|
|
||||||
|
|
||||||
Run Storage Group Operations On System's Behalf In RO Container
|
|
||||||
[Arguments] ${CID} ${OBJECTS} ${OBJ_COMPLEXITY}
|
|
||||||
[Documentation] ${CID}: ID of read-only container
|
|
||||||
... ${OBJECTS}: list of Object IDs to include into the Storage Group
|
|
||||||
... ${OBJ_COMPLEXITY}: [Complex|Simple]
|
|
||||||
...
|
|
||||||
... In this keyword we create Storage Group on Inner Ring's key behalf
|
|
||||||
... and include an Object created on behalf of some user. We expect
|
|
||||||
... that System key is granted to make all operations except DELETE.
|
|
||||||
|
|
||||||
Transfer Mainnet Gas ${IR_WALLET_PATH} ${DEPOSIT + 1} wallet_password=${IR_WALLET_PASS}
|
|
||||||
NeoFS Deposit ${IR_WALLET_PATH} ${DEPOSIT} wallet_password=${IR_WALLET_PASS}
|
|
||||||
|
|
||||||
${SG} = Put Storagegroup ${IR_WALLET_PATH} ${CID} ${OBJECTS} wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Verify List Storage Group ${IR_WALLET_PATH} ${CID} ${SG} WALLET_CFG=${IR_WALLET_CONFIG}
|
|
||||||
Verify Get Storage Group ${IR_WALLET_PATH} ${CID} ${SG} ${OBJECTS} ${OBJ_COMPLEXITY} WALLET_CFG=${IR_WALLET_CONFIG}
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Delete Storagegroup ${IR_WALLET_PATH} ${CID} ${SG} wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Should Contain ${ERR} ${PERMISSION_ERROR}
|
|
||||||
|
|
||||||
|
|
||||||
Verify List Storage Group
|
|
||||||
[Arguments] ${WALLET} ${CID} ${SG} ${BEARER}=${EMPTY} ${WALLET_CFG}=${WALLET_CONFIG}
|
|
||||||
|
|
||||||
@{STORAGE_GROUPS} = List Storagegroup ${WALLET} ${CID} bearer_token=${BEARER} wallet_config=${WALLET_CFG}
|
|
||||||
List Should Contain Value ${STORAGE_GROUPS} ${SG}
|
|
||||||
... msg="Storage Group hasn't been persisted"
|
|
||||||
|
|
||||||
|
|
||||||
Verify Get Storage Group
|
|
||||||
[Arguments] ${WALLET} ${CID} ${SG} ${OBJECTS} ${OBJ_COMPLEXITY} ${BEARER}=${EMPTY} ${WALLET_CFG}=${WALLET_CONFIG}
|
|
||||||
|
|
||||||
@{PART_OIDS} = Create List
|
|
||||||
IF """${OBJ_COMPLEXITY}""" == """Complex"""
|
|
||||||
FOR ${OBJ} IN @{OBJECTS}
|
|
||||||
${OIDS} = Get Object Parts By Link Object
|
|
||||||
... ${WALLET} ${CID} ${OBJ} BEARER=${BEARER} WALLET_CFG=${WALLET_CFG}
|
|
||||||
@{PART_OIDS} = Combine Lists ${PART_OIDS} ${OIDS}
|
|
||||||
END
|
|
||||||
END
|
|
||||||
|
|
||||||
${OBJECTS_NUMBER} = Get Length ${OBJECTS}
|
|
||||||
|
|
||||||
&{SG_DATA} = Get Storagegroup ${WALLET} ${CID} ${SG} bearer_token=${BEARER} wallet_config=${WALLET_CFG}
|
|
||||||
|
|
||||||
IF """${OBJ_COMPLEXITY}""" == """Simple"""
|
|
||||||
${EXPECTED_SIZE} = Evaluate ${SIMPLE_OBJ_SIZE} * ${OBJECTS_NUMBER}
|
|
||||||
Should Be Equal As Numbers ${SG_DATA}[Group size] ${EXPECTED_SIZE}
|
|
||||||
Lists Should Be Equal ${SG_DATA}[Members] ${OBJECTS}
|
|
||||||
ELSE
|
|
||||||
${EXPECTED_SIZE} = Evaluate ${COMPLEX_OBJ_SIZE} * ${OBJECTS_NUMBER}
|
|
||||||
Should Be Equal As Numbers ${SG_DATA}[Group size] ${EXPECTED_SIZE}
|
|
||||||
Lists Should Be Equal ${SG_DATA}[Members] ${PART_OIDS}
|
|
||||||
END
|
|
|
@ -1,117 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library epoch.py
|
|
||||||
Library tombstone.py
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
Library Collections
|
|
||||||
Library OperatingSystem
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
${CLEANUP_TIMEOUT} = 10s
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Run All Verbs Except Delete And Expect Success
|
|
||||||
[Arguments] ${WALLET} ${CID} ${COMPLEXITY} ${BEARER_TOKEN}=${EMPTY} ${REQUEST_HEADERS}=${EMPTY}
|
|
||||||
|
|
||||||
${OBJ_SIZE} = Run Keyword If """${COMPLEXITY}""" == """Simple"""
|
|
||||||
... Set Variable ${SIMPLE_OBJ_SIZE}
|
|
||||||
... ELSE
|
|
||||||
... Set Variable ${COMPLEX_OBJ_SIZE}
|
|
||||||
|
|
||||||
${FILE} ${FILE_HASH} = Generate file ${OBJ_SIZE}
|
|
||||||
|
|
||||||
${OID} = Put object ${WALLET} ${FILE} ${CID}
|
|
||||||
... bearer=${BEARER_TOKEN}
|
|
||||||
... options=${REQUEST_HEADERS}
|
|
||||||
${OBJ_PATH} = Get object ${WALLET} ${CID} ${OID}
|
|
||||||
... bearer_token=${BEARER_TOKEN}
|
|
||||||
... options=${REQUEST_HEADERS}
|
|
||||||
${DOWNLOADED_FILE_HASH} =
|
|
||||||
... Get file hash ${OBJ_PATH}
|
|
||||||
Should Be Equal ${DOWNLOADED_FILE_HASH} ${FILE_HASH}
|
|
||||||
|
|
||||||
${RANGE_FILE}
|
|
||||||
... ${DATA_RANGE} =
|
|
||||||
... Get Range ${WALLET} ${CID} ${OID}
|
|
||||||
... bearer=${BEARER_TOKEN}
|
|
||||||
... range_cut=0:10
|
|
||||||
... options=${REQUEST_HEADERS}
|
|
||||||
${FILE_CONTENT} = Get Binary File ${FILE}
|
|
||||||
Should Contain ${FILE_CONTENT} ${DATA_RANGE}
|
|
||||||
|
|
||||||
${RANGE_HASH} = Get Range Hash ${WALLET} ${CID} ${OID}
|
|
||||||
... bearer_token=${BEARER_TOKEN}
|
|
||||||
... range_cut=0:10
|
|
||||||
... options=${REQUEST_HEADERS}
|
|
||||||
${GR_HASH} = Get File Hash ${RANGE_FILE}
|
|
||||||
Should Be Equal ${GR_HASH} ${RANGE_HASH}
|
|
||||||
|
|
||||||
${FOUND_OBJECTS} = Search object ${WALLET} ${CID} keys=${OID}
|
|
||||||
... bearer=${BEARER_TOKEN}
|
|
||||||
... options=${REQUEST_HEADERS}
|
|
||||||
List Should Contain Value
|
|
||||||
... ${FOUND_OBJECTS}
|
|
||||||
... ${OID}
|
|
||||||
|
|
||||||
&{RESPONSE} = Head object ${WALLET} ${CID} ${OID}
|
|
||||||
... bearer_token=${BEARER_TOKEN}
|
|
||||||
... options=${REQUEST_HEADERS}
|
|
||||||
|
|
||||||
[Return] ${OID}
|
|
||||||
|
|
||||||
Delete Object And Validate Tombstone
|
|
||||||
[Arguments] ${WALLET} ${CID} ${OID} ${BEARER_TOKEN}=${EMPTY} ${REQUEST_HEADERS}=${EMPTY}
|
|
||||||
|
|
||||||
${TOMBSTONE_ID} = Delete object ${WALLET} ${CID} ${OID}
|
|
||||||
... bearer=${BEARER_TOKEN}
|
|
||||||
... options=${REQUEST_HEADERS}
|
|
||||||
Verify Head tombstone ${WALLET} ${CID} ${TOMBSTONE_ID} ${OID}
|
|
||||||
... bearer=${BEARER_TOKEN}
|
|
||||||
... options=${REQUEST_HEADERS}
|
|
||||||
|
|
||||||
Tick Epoch
|
|
||||||
# we assume that during this time objects must be deleted
|
|
||||||
Sleep ${CLEANUP_TIMEOUT}
|
|
||||||
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Get object ${WALLET} ${CID} ${OID}
|
|
||||||
... bearer_token=${BEARER_TOKEN}
|
|
||||||
... options=${REQUEST_HEADERS}
|
|
||||||
Should Contain ${ERR} code = 2052 message = object already removed
|
|
||||||
|
|
||||||
Run All Verbs And Expect Failure
|
|
||||||
[Arguments] ${ERROR} ${WALLET} ${CID} ${OID}
|
|
||||||
|
|
||||||
${FILE} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Put object ${WALLET} ${FILE} ${CID}
|
|
||||||
Should Contain ${ERR} ${ERROR}
|
|
||||||
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Get object ${WALLET} ${CID} ${OID}
|
|
||||||
Should Contain ${ERR} ${ERROR}
|
|
||||||
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Get Range ${WALLET} ${CID} ${OID} 0:10
|
|
||||||
Should Contain ${ERR} ${ERROR}
|
|
||||||
|
|
||||||
# TODO: get rid of ${EMPTY}
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Get Range Hash ${WALLET} ${CID} ${OID} ${EMPTY} 0:10
|
|
||||||
Should Contain ${ERR} ${ERROR}
|
|
||||||
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Search object ${WALLET} ${CID} keys=${OID}
|
|
||||||
Should Contain ${ERR} ${ERROR}
|
|
||||||
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Head object ${WALLET} ${CID} ${OID}
|
|
||||||
Should Contain ${ERR} ${ERROR}
|
|
||||||
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Delete object ${WALLET} ${CID} ${OID}
|
|
||||||
Should Contain ${ERR} ${ERROR}
|
|
|
@ -1,107 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library container.py
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource payment_operations.robot
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
${DEPOSIT} = ${30}
|
|
||||||
${EACL_ERROR_MSG} = code = 2048 message = access to object operation denied
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
Basic ACL Operations for Private Container
|
|
||||||
[Documentation] Testcase to validate NeoFS operations with ACL for Private Container.
|
|
||||||
[Tags] ACL
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Check Private Container Simple
|
|
||||||
Check Private Container Complex
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Check Private Container
|
|
||||||
[Arguments] ${COMPLEXITY}
|
|
||||||
|
|
||||||
${FILE_S} ${_} = Run Keyword If """${COMPLEXITY}""" == """Simple"""
|
|
||||||
... Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
... ELSE
|
|
||||||
... Generate file ${COMPLEX_OBJ_SIZE}
|
|
||||||
|
|
||||||
${USER_WALLET}
|
|
||||||
... ${_}
|
|
||||||
... ${_} = Prepare Wallet And Deposit
|
|
||||||
${WALLET_OTH}
|
|
||||||
... ${_}
|
|
||||||
... ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
${PRIV_CID} = Create Container ${USER_WALLET}
|
|
||||||
|
|
||||||
Transfer Mainnet Gas ${STORAGE_WALLET_PATH} ${DEPOSIT + 1}
|
|
||||||
NeoFS Deposit ${STORAGE_WALLET_PATH} ${DEPOSIT}
|
|
||||||
Transfer Mainnet Gas ${IR_WALLET_PATH} ${DEPOSIT + 1} wallet_password=${IR_WALLET_PASS}
|
|
||||||
NeoFS Deposit ${IR_WALLET_PATH} ${DEPOSIT} wallet_password=${IR_WALLET_PASS}
|
|
||||||
# Put
|
|
||||||
${S_OID_USER} = Put Object ${USER_WALLET} ${FILE_S} ${PRIV_CID}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Put object ${WALLET_OTH} ${FILE_S} ${PRIV_CID}
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Put Object ${IR_WALLET_PATH} ${FILE_S} ${PRIV_CID} wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Should Contain ${ERR} ${EACL_ERROR_MSG}
|
|
||||||
${S_OID_SYS_SN} = Put Object ${STORAGE_WALLET_PATH} ${FILE_S} ${PRIV_CID}
|
|
||||||
|
|
||||||
# Get
|
|
||||||
Get Object ${USER_WALLET} ${PRIV_CID} ${S_OID_USER} ${EMPTY} s_file_read
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get object ${WALLET_OTH} ${PRIV_CID} ${S_OID_USER} ${EMPTY} s_file_read
|
|
||||||
Get Object ${IR_WALLET_PATH} ${PRIV_CID} ${S_OID_USER} ${EMPTY} s_file_read wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Get Object ${STORAGE_WALLET_PATH} ${PRIV_CID} ${S_OID_USER} ${EMPTY} s_file_read
|
|
||||||
|
|
||||||
# Get Range
|
|
||||||
Get Range ${USER_WALLET} ${PRIV_CID} ${S_OID_USER} 0:256
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${WALLET_OTH} ${PRIV_CID} ${S_OID_USER} 0:256
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${IR_WALLET_PATH} ${PRIV_CID} ${S_OID_USER} 0:256 wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${STORAGE_WALLET_PATH} ${PRIV_CID} ${S_OID_USER} 0:256
|
|
||||||
|
|
||||||
# Get Range Hash
|
|
||||||
Get Range hash ${USER_WALLET} ${PRIV_CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range Hash ${WALLET_OTH} ${PRIV_CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
||||||
# TODO: always fails for complex object
|
|
||||||
#Get Range hash ${IR_WALLET_PATH} ${PRIV_CID} ${S_OID_USER} ${EMPTY} 0:256 wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Get Range hash ${STORAGE_WALLET_PATH} ${PRIV_CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
||||||
|
|
||||||
# Search
|
|
||||||
@{S_OBJ_PRIV} = Create List ${S_OID_USER} ${S_OID_SYS_SN}
|
|
||||||
Search Object ${USER_WALLET} ${PRIV_CID} keys=--root expected_objects_list=${S_OBJ_PRIV}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Search object ${WALLET_OTH} ${PRIV_CID} keys=--root expected_objects_list=${S_OBJ_PRIV}
|
|
||||||
Search Object ${IR_WALLET_PATH} ${PRIV_CID} keys=--root expected_objects_list=${S_OBJ_PRIV} wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Search Object ${STORAGE_WALLET_PATH} ${PRIV_CID} keys=--root expected_objects_list=${S_OBJ_PRIV}
|
|
||||||
|
|
||||||
|
|
||||||
# Head
|
|
||||||
Head Object ${USER_WALLET} ${PRIV_CID} ${S_OID_USER}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Head object ${WALLET_OTH} ${PRIV_CID} ${S_OID_USER}
|
|
||||||
Head Object ${IR_WALLET_PATH} ${PRIV_CID} ${S_OID_USER} wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Head Object ${STORAGE_WALLET_PATH} ${PRIV_CID} ${S_OID_USER}
|
|
||||||
|
|
||||||
|
|
||||||
# Delete
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${WALLET_OTH} ${PRIV_CID} ${S_OID_USER}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${IR_WALLET_PATH} ${PRIV_CID} ${S_OID_USER} wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${STORAGE_WALLET_PATH} ${PRIV_CID} ${S_OID_USER}
|
|
||||||
Delete Object ${USER_WALLET} ${PRIV_CID} ${S_OID_USER}
|
|
|
@ -1,104 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library container.py
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource payment_operations.robot
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
${DEPOSIT} = ${30}
|
|
||||||
${EACL_ERROR_MSG} = code = 2048 message = access to object operation denied
|
|
||||||
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
Basic ACL Operations for Public Container
|
|
||||||
[Documentation] Testcase to validate NeoFS operations with ACL for Public Container.
|
|
||||||
[Tags] ACL
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
${WALLET_OTH} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
${PUBLIC_CID} = Create Container ${WALLET} basic_acl=public-read-write
|
|
||||||
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
Check Public Container ${WALLET} ${FILE_S} ${PUBLIC_CID} ${WALLET_OTH}
|
|
||||||
|
|
||||||
${PUBLIC_CID} = Create Container ${WALLET} basic_acl=public-read-write
|
|
||||||
${FILE_S} ${_} = Generate file ${COMPLEX_OBJ_SIZE}
|
|
||||||
Check Public Container ${WALLET} ${FILE_S} ${PUBLIC_CID} ${WALLET_OTH}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Check Public Container
|
|
||||||
[Arguments] ${USER_WALLET} ${FILE_S} ${PUBLIC_CID} ${WALLET_OTH}
|
|
||||||
|
|
||||||
Transfer Mainnet Gas ${STORAGE_WALLET_PATH} ${DEPOSIT + 1}
|
|
||||||
NeoFS Deposit ${STORAGE_WALLET_PATH} ${DEPOSIT}
|
|
||||||
Transfer Mainnet Gas ${IR_WALLET_PATH} ${DEPOSIT + 1} wallet_password=${IR_WALLET_PASS}
|
|
||||||
NeoFS Deposit ${IR_WALLET_PATH} ${DEPOSIT} wallet_password=${IR_WALLET_PASS}
|
|
||||||
# Put
|
|
||||||
${S_OID_USER} = Put Object ${USER_WALLET} ${FILE_S} ${PUBLIC_CID}
|
|
||||||
${S_OID_OTHER} = Put Object ${WALLET_OTH} ${FILE_S} ${PUBLIC_CID}
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Put Object ${IR_WALLET_PATH} ${FILE_S} ${PUBLIC_CID} wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Should Contain ${ERR} ${EACL_ERROR_MSG}
|
|
||||||
${S_OID_SYS_SN} = Put Object ${STORAGE_WALLET_PATH} ${FILE_S} ${PUBLIC_CID}
|
|
||||||
|
|
||||||
# Get
|
|
||||||
Get Object ${USER_WALLET} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} s_file_read
|
|
||||||
Get Object ${WALLET_OTH} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} s_file_read
|
|
||||||
Get Object ${IR_WALLET_PATH} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} s_file_read wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Get Object ${STORAGE_WALLET_PATH} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} s_file_read
|
|
||||||
|
|
||||||
# Get Range
|
|
||||||
Get Range ${USER_WALLET} ${PUBLIC_CID} ${S_OID_USER} 0:256
|
|
||||||
Get Range ${WALLET_OTH} ${PUBLIC_CID} ${S_OID_USER} 0:256
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${IR_WALLET_PATH} ${PUBLIC_CID} ${S_OID_USER} 0:256 wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${STORAGE_WALLET_PATH} ${PUBLIC_CID} ${S_OID_USER} 0:256
|
|
||||||
|
|
||||||
|
|
||||||
# Get Range Hash
|
|
||||||
Get Range Hash ${USER_WALLET} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
||||||
Get Range Hash ${WALLET_OTH} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
||||||
# TODO: fails with "object not found"
|
|
||||||
#Get Range Hash ${IR_WALLET_PATH} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} 0:256 wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
#Get Range Hash ${STORAGE_WALLET_PATH} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
||||||
|
|
||||||
# Search
|
|
||||||
@{S_OBJ_PRIV} = Create List ${S_OID_USER} ${S_OID_OTHER} ${S_OID_SYS_SN}
|
|
||||||
Search object ${USER_WALLET} ${PUBLIC_CID} keys=--root expected_objects_list=${S_OBJ_PRIV}
|
|
||||||
Search object ${WALLET_OTH} ${PUBLIC_CID} keys=--root expected_objects_list=${S_OBJ_PRIV}
|
|
||||||
Search object ${IR_WALLET_PATH} ${PUBLIC_CID} keys=--root expected_objects_list=${S_OBJ_PRIV} wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Search object ${STORAGE_WALLET_PATH} ${PUBLIC_CID} keys=--root expected_objects_list=${S_OBJ_PRIV}
|
|
||||||
|
|
||||||
# Head
|
|
||||||
Head Object ${USER_WALLET} ${PUBLIC_CID} ${S_OID_USER}
|
|
||||||
Head Object ${WALLET_OTH} ${PUBLIC_CID} ${S_OID_USER}
|
|
||||||
Head Object ${IR_WALLET_PATH} ${PUBLIC_CID} ${S_OID_USER} wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Head Object ${STORAGE_WALLET_PATH} ${PUBLIC_CID} ${S_OID_USER}
|
|
||||||
|
|
||||||
Head Object ${USER_WALLET} ${PUBLIC_CID} ${S_OID_OTHER}
|
|
||||||
Head Object ${WALLET_OTH} ${PUBLIC_CID} ${S_OID_OTHER}
|
|
||||||
Head Object ${IR_WALLET_PATH} ${PUBLIC_CID} ${S_OID_OTHER} wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Head Object ${STORAGE_WALLET_PATH} ${PUBLIC_CID} ${S_OID_OTHER}
|
|
||||||
|
|
||||||
Head Object ${USER_WALLET} ${PUBLIC_CID} ${S_OID_SYS_SN}
|
|
||||||
Head Object ${WALLET_OTH} ${PUBLIC_CID} ${S_OID_SYS_SN}
|
|
||||||
Head Object ${IR_WALLET_PATH} ${PUBLIC_CID} ${S_OID_SYS_SN} wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Head Object ${STORAGE_WALLET_PATH} ${PUBLIC_CID} ${S_OID_SYS_SN}
|
|
||||||
|
|
||||||
|
|
||||||
# Delete
|
|
||||||
Delete Object ${WALLET_OTH} ${PUBLIC_CID} ${S_OID_SYS_SN}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${IR_WALLET_PATH} ${PUBLIC_CID} ${S_OID_USER} wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${STORAGE_WALLET_PATH} ${PUBLIC_CID} ${S_OID_OTHER}
|
|
||||||
Delete object ${USER_WALLET} ${PUBLIC_CID} ${S_OID_USER}
|
|
|
@ -1,97 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library container.py
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource payment_operations.robot
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
${DEPOSIT} = ${30}
|
|
||||||
${EACL_ERROR_MSG} = code = 2048 message = access to object operation denied
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
Basic ACL Operations for Read-Only Container
|
|
||||||
[Documentation] Testcase to validate NeoFS operations with ACL for Read-Only Container.
|
|
||||||
[Tags] ACL
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
Check Read-Only Container Simple
|
|
||||||
Check Read-Only Container Complex
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Check Read-Only Container
|
|
||||||
[Arguments] ${COMPLEXITY}
|
|
||||||
|
|
||||||
${FILE_S} ${_} = Run Keyword If """${COMPLEXITY}""" == """Simple"""
|
|
||||||
... Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
... ELSE
|
|
||||||
... Generate file ${COMPLEX_OBJ_SIZE}
|
|
||||||
|
|
||||||
${USER_WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
${WALLET_OTH} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
${READONLY_CID} = Create Container ${USER_WALLET} basic_acl=public-read
|
|
||||||
|
|
||||||
Transfer Mainnet Gas ${STORAGE_WALLET_PATH} ${DEPOSIT + 1}
|
|
||||||
NeoFS Deposit ${STORAGE_WALLET_PATH} ${DEPOSIT}
|
|
||||||
Transfer Mainnet Gas ${IR_WALLET_PATH} ${DEPOSIT + 1} wallet_password=${IR_WALLET_PASS}
|
|
||||||
NeoFS Deposit ${IR_WALLET_PATH} ${DEPOSIT} wallet_password=${IR_WALLET_PASS}
|
|
||||||
|
|
||||||
# Put
|
|
||||||
${S_OID_USER} = Put Object ${USER_WALLET} ${FILE_S} ${READONLY_CID}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Put object ${WALLET_OTH} ${FILE_S} ${READONLY_CID}
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Put Object ${IR_WALLET_PATH} ${FILE_S} ${READONLY_CID} wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Should Contain ${ERR} ${EACL_ERROR_MSG}
|
|
||||||
${S_OID_SYS_SN} = Put object ${STORAGE_WALLET_PATH} ${FILE_S} ${READONLY_CID}
|
|
||||||
|
|
||||||
# Get
|
|
||||||
Get object ${USER_WALLET} ${READONLY_CID} ${S_OID_USER} ${EMPTY} s_file_read
|
|
||||||
Get Object ${WALLET_OTH} ${READONLY_CID} ${S_OID_USER} ${EMPTY} s_file_read
|
|
||||||
Get Object ${IR_WALLET_PATH} ${READONLY_CID} ${S_OID_USER} ${EMPTY} s_file_read wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Get Object ${STORAGE_WALLET_PATH} ${READONLY_CID} ${S_OID_USER} ${EMPTY} s_file_read
|
|
||||||
|
|
||||||
# Get Range
|
|
||||||
Get Range ${USER_WALLET} ${READONLY_CID} ${S_OID_USER} 0:256
|
|
||||||
Get Range ${WALLET_OTH} ${READONLY_CID} ${S_OID_USER} 0:256
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${IR_WALLET_PATH} ${READONLY_CID} ${S_OID_USER} 0:256 wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${STORAGE_WALLET_PATH} ${READONLY_CID} ${S_OID_USER} 0:256
|
|
||||||
|
|
||||||
|
|
||||||
# Get Range Hash
|
|
||||||
Get Range hash ${USER_WALLET} ${READONLY_CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
||||||
Get Range hash ${WALLET_OTH} ${READONLY_CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
||||||
#Get Range hash ${IR_WALLET_PATH} ${READONLY_CID} ${S_OID_USER} ${EMPTY} 0:256 wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
#Get Range hash ${STORAGE_WALLET_PATH} ${READONLY_CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
||||||
|
|
||||||
# Search
|
|
||||||
@{S_OBJ_RO} = Create List ${S_OID_USER} ${S_OID_SYS_SN}
|
|
||||||
Search Object ${USER_WALLET} ${READONLY_CID} keys=--root expected_objects_list=${S_OBJ_RO}
|
|
||||||
Search Object ${WALLET_OTH} ${READONLY_CID} keys=--root expected_objects_list=${S_OBJ_RO}
|
|
||||||
Search Object ${IR_WALLET_PATH} ${READONLY_CID} keys=--root expected_objects_list=${S_OBJ_RO} wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Search Object ${STORAGE_WALLET_PATH} ${READONLY_CID} keys=--root expected_objects_list=${S_OBJ_RO}
|
|
||||||
|
|
||||||
|
|
||||||
# Head
|
|
||||||
Head Object ${USER_WALLET} ${READONLY_CID} ${S_OID_USER}
|
|
||||||
Head Object ${WALLET_OTH} ${READONLY_CID} ${S_OID_USER}
|
|
||||||
Head Object ${IR_WALLET_PATH} ${READONLY_CID} ${S_OID_USER} wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Head Object ${STORAGE_WALLET_PATH} ${READONLY_CID} ${S_OID_USER}
|
|
||||||
|
|
||||||
# Delete
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${WALLET_OTH} ${READONLY_CID} ${S_OID_USER}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${IR_WALLET_PATH} ${READONLY_CID} ${S_OID_USER} wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${STORAGE_WALLET_PATH} ${READONLY_CID} ${S_OID_USER}
|
|
||||||
Delete Object ${USER_WALLET} ${READONLY_CID} ${S_OID_USER}
|
|
|
@ -1,91 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library acl.py
|
|
||||||
Library container.py
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource eacl_tables.robot
|
|
||||||
Resource payment_operations.robot
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
&{USER_HEADER} = key1=1 key2=abc
|
|
||||||
&{USER_HEADER_DEL} = key1=del key2=del
|
|
||||||
&{ANOTHER_HEADER} = key1=oth key2=oth
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
BearerToken Operations
|
|
||||||
[Documentation] Testcase to validate NeoFS operations with BearerToken.
|
|
||||||
[Tags] ACL BearerToken
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
Log Check Bearer token with simple object
|
|
||||||
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
Check eACL Deny and Allow All Bearer ${WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
Log Check Bearer token with complex object
|
|
||||||
${FILE_S} ${_} = Generate file ${COMPLEX_OBJ_SIZE}
|
|
||||||
Check eACL Deny and Allow All Bearer ${WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Check eACL Deny and Allow All Bearer
|
|
||||||
[Arguments] ${WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
${CID} = Create Container ${WALLET} basic_acl=eacl-public-read-write
|
|
||||||
${S_OID_USER} = Put object ${WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
||||||
${D_OID_USER} = Put object ${WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER_DEL}
|
|
||||||
@{S_OBJ_H} = Create List ${S_OID_USER}
|
|
||||||
|
|
||||||
Put object ${WALLET} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
|
|
||||||
Get object ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
||||||
Search object ${WALLET} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
|
||||||
Head object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256
|
|
||||||
Delete object ${WALLET} ${CID} ${D_OID_USER}
|
|
||||||
|
|
||||||
Set eACL ${WALLET} ${CID} ${EACL_DENY_ALL_USER}
|
|
||||||
|
|
||||||
# The current ACL cache lifetime is 30 sec
|
|
||||||
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
||||||
|
|
||||||
${rule1}= Create Dictionary Operation=GET Access=ALLOW Role=USER
|
|
||||||
${rule2}= Create Dictionary Operation=HEAD Access=ALLOW Role=USER
|
|
||||||
${rule3}= Create Dictionary Operation=PUT Access=ALLOW Role=USER
|
|
||||||
${rule4}= Create Dictionary Operation=DELETE Access=ALLOW Role=USER
|
|
||||||
${rule5}= Create Dictionary Operation=SEARCH Access=ALLOW Role=USER
|
|
||||||
${rule6}= Create Dictionary Operation=GETRANGE Access=ALLOW Role=USER
|
|
||||||
${rule7}= Create Dictionary Operation=GETRANGEHASH Access=ALLOW Role=USER
|
|
||||||
|
|
||||||
${eACL_gen}= Create List ${rule1} ${rule2} ${rule3} ${rule4} ${rule5} ${rule6} ${rule7}
|
|
||||||
|
|
||||||
${EACL_TOKEN} = Form BearerToken File ${WALLET} ${CID} ${eACL_gen}
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Put object ${WALLET} ${FILE_S} ${CID}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get object ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Search object ${WALLET} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Head object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
|
|
||||||
# All operations on object should be passed with bearer token
|
|
||||||
Put object ${WALLET} ${FILE_S} ${CID} bearer=${EACL_TOKEN}
|
|
||||||
Get object ${WALLET} ${CID} ${S_OID_USER} ${EACL_TOKEN} local_file_eacl
|
|
||||||
Search object ${WALLET} ${CID} ${EMPTY} ${EACL_TOKEN} ${USER_HEADER} ${S_OBJ_H}
|
|
||||||
Head object ${WALLET} ${CID} ${S_OID_USER} bearer_token=${EACL_TOKEN}
|
|
||||||
Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256 bearer=${EACL_TOKEN}
|
|
||||||
Delete object ${WALLET} ${CID} ${S_OID_USER} bearer=${EACL_TOKEN}
|
|
|
@ -1,152 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library acl.py
|
|
||||||
Library container.py
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource eacl_tables.robot
|
|
||||||
Resource common_steps_acl_bearer.robot
|
|
||||||
Resource payment_operations.robot
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
${DEPOSIT} = ${30}
|
|
||||||
&{USER_HEADER} = key1=1 key2=abc
|
|
||||||
&{ANOTHER_HEADER} = key1=oth key2=oth
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
BearerToken Operations for Сompound Operations
|
|
||||||
[Documentation] Testcase to validate NeoFS operations with BearerToken for Сompound Operations.
|
|
||||||
[Tags] ACL BearerToken
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
${WALLET_OTH} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
Log Check Bearer token with simple object
|
|
||||||
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
Check Сompound Operations ${WALLET} ${WALLET_OTH} ${FILE_S}
|
|
||||||
|
|
||||||
Log Check Bearer token with complex object
|
|
||||||
${FILE_S} ${_} = Generate file ${COMPLEX_OBJ_SIZE}
|
|
||||||
Check Сompound Operations ${WALLET} ${WALLET_OTH} ${FILE_S}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Check Сompound Operations
|
|
||||||
[Arguments] ${USER_WALLET} ${OTHER_WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
Transfer Mainnet Gas ${IR_WALLET_PATH} ${DEPOSIT + 1} wallet_password=${IR_WALLET_PASS}
|
|
||||||
NeoFS Deposit ${IR_WALLET_PATH} ${DEPOSIT} wallet_password=${IR_WALLET_PASS}
|
|
||||||
|
|
||||||
Check Bearer Сompound Get ${OTHER_WALLET} OTHERS ${EACL_DENY_ALL_OTHERS} ${FILE_S} ${USER_WALLET}
|
|
||||||
Check Bearer Сompound Get ${USER_WALLET} USER ${EACL_DENY_ALL_USER} ${FILE_S} ${USER_WALLET}
|
|
||||||
#Check Bearer Сompound Get ${IR_WALLET_PATH} SYSTEM ${EACL_DENY_ALL_SYSTEM} ${FILE_S} ${USER_WALLET}
|
|
||||||
|
|
||||||
Check Bearer Сompound Delete ${OTHER_WALLET} OTHERS ${EACL_DENY_ALL_OTHERS} ${FILE_S} ${USER_WALLET}
|
|
||||||
Check Bearer Сompound Delete ${USER_WALLET} USER ${EACL_DENY_ALL_USER} ${FILE_S} ${USER_WALLET}
|
|
||||||
#Check Bearer Сompound Delete ${IR_WALLET_PATH} SYSTEM ${EACL_DENY_ALL_SYSTEM} ${FILE_S} ${USER_WALLET}
|
|
||||||
|
|
||||||
Check Bearer Сompound Get Range Hash ${OTHER_WALLET} OTHERS ${EACL_DENY_ALL_OTHERS} ${USER_WALLET} ${FILE_S}
|
|
||||||
Check Bearer Сompound Get Range Hash ${USER_WALLET} USER ${EACL_DENY_ALL_USER} ${USER_WALLET} ${FILE_S}
|
|
||||||
#Check Bearer Сompound Get Range Hash ${IR_WALLET_PATH} SYSTEM ${EACL_DENY_ALL_SYSTEM} ${USER_WALLET} ${FILE_S}
|
|
||||||
Check Bearer Сompound Get
|
|
||||||
[Arguments] ${WALLET} ${DENY_GROUP} ${DENY_EACL} ${FILE_S} ${USER_WALLET}
|
|
||||||
|
|
||||||
${CID} = Create Container ${USER_WALLET} basic_acl=eacl-public-read-write
|
|
||||||
Prepare eACL Role rules ${CID}
|
|
||||||
${S_OID_USER} = Put object ${USER_WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
||||||
@{S_OBJ_H} = Create List ${S_OID_USER}
|
|
||||||
|
|
||||||
${S_OID_USER} = Put object ${USER_WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
||||||
Put object ${WALLET} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
|
|
||||||
Get object ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
||||||
Set eACL ${USER_WALLET} ${CID} ${DENY_EACL}
|
|
||||||
|
|
||||||
# The current ACL cache lifetime is 30 sec
|
|
||||||
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
||||||
|
|
||||||
${rule1}= Create Dictionary Operation=GET Access=ALLOW Role=${DENY_GROUP}
|
|
||||||
${rule2}= Create Dictionary Operation=GETRANGE Access=ALLOW Role=${DENY_GROUP}
|
|
||||||
${rule3}= Create Dictionary Operation=GETRANGEHASH Access=ALLOW Role=${DENY_GROUP}
|
|
||||||
${eACL_gen}= Create List ${rule1} ${rule2} ${rule3}
|
|
||||||
${EACL_TOKEN} = Form BearerToken File ${USER_WALLET} ${CID} ${eACL_gen}
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Head object ${WALLET} ${CID} ${S_OID_USER} bearer_token=${EACL_TOKEN}
|
|
||||||
|
|
||||||
Get Object ${WALLET} ${CID} ${S_OID_USER} ${EACL_TOKEN} local_file_eacl
|
|
||||||
IF "${WALLET}" == "${IR_WALLET_PATH}"
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256 bearer=${EACL_TOKEN}
|
|
||||||
ELSE
|
|
||||||
Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256 bearer=${EACL_TOKEN}
|
|
||||||
END
|
|
||||||
Get Range Hash ${WALLET} ${CID} ${S_OID_USER} ${EACL_TOKEN} 0:256
|
|
||||||
|
|
||||||
|
|
||||||
Check Bearer Сompound Delete
|
|
||||||
[Arguments] ${WALLET} ${DENY_GROUP} ${DENY_EACL} ${FILE_S} ${USER_WALLET}
|
|
||||||
|
|
||||||
${CID} = Create Container ${USER_WALLET} basic_acl=eacl-public-read-write
|
|
||||||
Prepare eACL Role rules ${CID}
|
|
||||||
${S_OID_USER} = Put object ${USER_WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
||||||
${D_OID_USER} = Put object ${USER_WALLET} ${FILE_S} ${CID}
|
|
||||||
Put object ${WALLET} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
|
|
||||||
IF "${WALLET}" == "${IR_WALLET_PATH}"
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${WALLET} ${CID} ${D_OID_USER} ${EMPTY}
|
|
||||||
ELSE
|
|
||||||
Delete object ${WALLET} ${CID} ${D_OID_USER} ${EMPTY}
|
|
||||||
END
|
|
||||||
|
|
||||||
Set eACL ${USER_WALLET} ${CID} ${DENY_EACL}
|
|
||||||
|
|
||||||
# The current ACL cache lifetime is 30 sec
|
|
||||||
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
||||||
|
|
||||||
${rule1} = Create Dictionary Operation=DELETE Access=ALLOW Role=${DENY_GROUP}
|
|
||||||
${rule2} = Create Dictionary Operation=PUT Access=DENY Role=${DENY_GROUP}
|
|
||||||
${rule3} = Create Dictionary Operation=HEAD Access=DENY Role=${DENY_GROUP}
|
|
||||||
${eACL_gen} = Create List ${rule1} ${rule2} ${rule3}
|
|
||||||
${EACL_TOKEN} = Form BearerToken File ${USER_WALLET} ${CID} ${eACL_gen}
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Head object ${WALLET} ${CID} ${S_OID_USER} bearer_token=${EACL_TOKEN}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Put object ${WALLET} ${FILE_S} ${CID} bearer=${EACL_TOKEN} user_headers=${ANOTHER_HEADER}
|
|
||||||
|
|
||||||
Delete object ${USER_WALLET} ${CID} ${S_OID_USER} bearer=${EACL_TOKEN}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Check Bearer Сompound Get Range Hash
|
|
||||||
[Arguments] ${WALLET} ${DENY_GROUP} ${DENY_EACL} ${USER_WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
${CID} = Create Container ${USER_WALLET} basic_acl=eacl-public-read-write
|
|
||||||
Prepare eACL Role rules ${CID}
|
|
||||||
|
|
||||||
${S_OID_USER} = Put object ${USER_WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
||||||
Put object ${WALLET} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
|
|
||||||
Get Range hash ${IR_WALLET_PATH} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
||||||
Set eACL ${USER_WALLET} ${CID} ${DENY_EACL}
|
|
||||||
|
|
||||||
# The current ACL cache lifetime is 30 sec
|
|
||||||
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
||||||
|
|
||||||
${rule1} = Create Dictionary Operation=GETRANGEHASH Access=ALLOW Role=${DENY_GROUP}
|
|
||||||
${rule2} = Create Dictionary Operation=GETRANGE Access=DENY Role=${DENY_GROUP}
|
|
||||||
${rule3} = Create Dictionary Operation=GET Access=DENY Role=${DENY_GROUP}
|
|
||||||
${eACL_gen} = Create List ${rule1} ${rule2} ${rule3}
|
|
||||||
${EACL_TOKEN} = Form BearerToken File ${USER_WALLET} ${CID} ${eACL_gen}
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256 bearer=${EACL_TOKEN}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get object ${WALLET} ${CID} ${S_OID_USER} ${EACL_TOKEN} local_file_eacl
|
|
||||||
|
|
||||||
Get Range Hash ${WALLET} ${CID} ${S_OID_USER} ${EACL_TOKEN} 0:256
|
|
|
@ -1,103 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library acl.py
|
|
||||||
Library container.py
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library payment_neogo.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource eacl_tables.robot
|
|
||||||
Resource common_steps_acl_bearer.robot
|
|
||||||
Resource payment_operations.robot
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
&{USER_HEADER} = key1=1 key2=abc
|
|
||||||
&{USER_HEADER_DEL} = key1=del key2=del
|
|
||||||
&{ANOTHER_HEADER} = key1=oth key2=oth
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
BearerToken Operations with Filter OID Equal
|
|
||||||
[Documentation] Testcase to validate NeoFS operations with BearerToken with Filter OID Equal.
|
|
||||||
[Tags] ACL BearerToken
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
Log Check Bearer token with simple object
|
|
||||||
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
Check eACL Deny and Allow All Bearer Filter OID Equal ${WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
Log Check Bearer token with complex object
|
|
||||||
|
|
||||||
${FILE_S} ${_} = Generate file ${COMPLEX_OBJ_SIZE}
|
|
||||||
Check eACL Deny and Allow All Bearer Filter OID Equal ${WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Check eACL Deny and Allow All Bearer Filter OID Equal
|
|
||||||
[Arguments] ${WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
${CID} = Create Container ${WALLET} basic_acl=eacl-public-read-write
|
|
||||||
Prepare eACL Role rules ${CID}
|
|
||||||
${S_OID_USER} = Put object ${WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
||||||
${S_OID_USER_2} = Put object ${WALLET} ${FILE_S} ${CID}
|
|
||||||
${D_OID_USER} = Put object ${WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER_DEL}
|
|
||||||
@{S_OBJ_H} = Create List ${S_OID_USER}
|
|
||||||
|
|
||||||
Put object ${WALLET} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
|
|
||||||
Get object ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
||||||
Search object ${WALLET} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
|
||||||
Head object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256
|
|
||||||
Delete object ${WALLET} ${CID} ${D_OID_USER}
|
|
||||||
|
|
||||||
Set eACL ${WALLET} ${CID} ${EACL_DENY_ALL_USER}
|
|
||||||
|
|
||||||
# The current ACL cache lifetime is 30 sec
|
|
||||||
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
||||||
|
|
||||||
${filters}= Create Dictionary headerType=OBJECT matchType=STRING_EQUAL key=$Object:objectID value=${S_OID_USER}
|
|
||||||
|
|
||||||
${rule1}= Create Dictionary Operation=GET Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule2}= Create Dictionary Operation=HEAD Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule3}= Create Dictionary Operation=PUT Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule4}= Create Dictionary Operation=DELETE Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule5}= Create Dictionary Operation=SEARCH Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule6}= Create Dictionary Operation=GETRANGE Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule7}= Create Dictionary Operation=GETRANGEHASH Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
|
|
||||||
${eACL_gen}= Create List ${rule1} ${rule2} ${rule3} ${rule4} ${rule5} ${rule6} ${rule7}
|
|
||||||
|
|
||||||
${EACL_TOKEN} = Form BearerToken File ${WALLET} ${CID} ${eACL_gen}
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Put object ${WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get object ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Search object ${WALLET} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Head object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Search object ${WALLET} ${CID} ${EMPTY} ${EACL_TOKEN} ${USER_HEADER} ${S_OBJ_H}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Put object ${WALLET} ${FILE_S} ${CID} bearer=${EACL_TOKEN} user_headers=${ANOTHER_HEADER}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get object ${WALLET} ${CID} ${S_OID_USER_2} ${EACL_TOKEN} local_file_eacl
|
|
||||||
|
|
||||||
Get object ${WALLET} ${CID} ${S_OID_USER} ${EACL_TOKEN} local_file_eacl
|
|
||||||
Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256 bearer=${EACL_TOKEN}
|
|
||||||
|
|
||||||
Head object ${WALLET} ${CID} ${S_OID_USER} bearer_token=${EACL_TOKEN}
|
|
||||||
Delete object ${WALLET} ${CID} ${S_OID_USER} bearer=${EACL_TOKEN}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${WALLET} ${CID} ${D_OID_USER} bearer=${EACL_TOKEN}
|
|
|
@ -1,106 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library acl.py
|
|
||||||
Library container.py
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource eacl_tables.robot
|
|
||||||
Resource common_steps_acl_bearer.robot
|
|
||||||
Resource payment_operations.robot
|
|
||||||
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
&{USER_HEADER} = key1=1 key2=abc
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
BearerToken Operations with Filter OID NotEqual
|
|
||||||
[Documentation] Testcase to validate NeoFS operations with BearerToken with Filter OID NotEqual.
|
|
||||||
[Tags] ACL BearerToken
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
Log Check Bearer token with simple object
|
|
||||||
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
Check eACL Deny and Allow All Bearer Filter OID NotEqual ${WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
Log Check Bearer token with complex object
|
|
||||||
${FILE_S} ${_} = Generate file ${COMPLEX_OBJ_SIZE}
|
|
||||||
Check eACL Deny and Allow All Bearer Filter OID NotEqual ${WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Check eACL Deny and Allow All Bearer Filter OID NotEqual
|
|
||||||
[Arguments] ${WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
${CID} = Create Container ${WALLET} basic_acl=eacl-public-read-write
|
|
||||||
Prepare eACL Role rules ${CID}
|
|
||||||
${S_OID_USER} = Put object ${WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
||||||
${S_OID_USER_2} = Put object ${WALLET} ${FILE_S} ${CID}
|
|
||||||
${D_OID_USER} = Put object ${WALLET} ${FILE_S} ${CID}
|
|
||||||
@{S_OBJ_H} = Create List ${S_OID_USER}
|
|
||||||
|
|
||||||
Put object ${WALLET} ${FILE_S} ${CID}
|
|
||||||
Get object ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
||||||
Search object ${WALLET} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
|
||||||
Head object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256
|
|
||||||
Delete object ${WALLET} ${CID} ${D_OID_USER}
|
|
||||||
|
|
||||||
Set eACL ${WALLET} ${CID} ${EACL_DENY_ALL_USER}
|
|
||||||
|
|
||||||
# The current ACL cache lifetime is 30 sec
|
|
||||||
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
||||||
|
|
||||||
${filters}= Create Dictionary headerType=OBJECT matchType=STRING_NOT_EQUAL key=$Object:objectID value=${S_OID_USER_2}
|
|
||||||
|
|
||||||
${rule1}= Create Dictionary Operation=GET Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule2}= Create Dictionary Operation=HEAD Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule3}= Create Dictionary Operation=PUT Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule4}= Create Dictionary Operation=DELETE Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule5}= Create Dictionary Operation=SEARCH Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule6}= Create Dictionary Operation=GETRANGE Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule7}= Create Dictionary Operation=GETRANGEHASH Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
|
|
||||||
${eACL_gen}= Create List ${rule1} ${rule2} ${rule3} ${rule4} ${rule5} ${rule6} ${rule7}
|
|
||||||
|
|
||||||
${EACL_TOKEN} = Form BearerToken File ${WALLET} ${CID} ${eACL_gen}
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Put object ${WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get object ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Search object ${WALLET} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Head object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
|
|
||||||
Put object ${WALLET} ${FILE_S} ${CID} bearer=${EACL_TOKEN}
|
|
||||||
|
|
||||||
Get object ${WALLET} ${CID} ${S_OID_USER} ${EACL_TOKEN} local_file_eacl
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get object ${WALLET} ${CID} ${S_OID_USER_2} ${EACL_TOKEN} local_file_eacl
|
|
||||||
|
|
||||||
Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256 bearer=${EACL_TOKEN}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${WALLET} ${CID} ${S_OID_USER_2} 0:256 bearer=${EACL_TOKEN}
|
|
||||||
|
|
||||||
Head object ${WALLET} ${CID} ${S_OID_USER} bearer_token=${EACL_TOKEN}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Head object ${WALLET} ${CID} ${S_OID_USER_2} bearer_token=${EACL_TOKEN}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Search object ${WALLET} ${CID} ${EMPTY} ${EACL_TOKEN} ${USER_HEADER} ${S_OBJ_H}
|
|
||||||
|
|
||||||
Delete object ${WALLET} ${CID} ${S_OID_USER} bearer=${EACL_TOKEN}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${WALLET} ${CID} ${S_OID_USER_2} bearer=${EACL_TOKEN}
|
|
|
@ -1,108 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library acl.py
|
|
||||||
Library container.py
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource eacl_tables.robot
|
|
||||||
Resource common_steps_acl_bearer.robot
|
|
||||||
Resource payment_operations.robot
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
&{USER_HEADER} = key1=1 key2=abc
|
|
||||||
&{USER_HEADER_DEL} = key1=del key2=del
|
|
||||||
&{ANOTHER_HEADER} = key1=oth key2=oth
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
BearerToken Operations with Filter UserHeader Equal
|
|
||||||
[Documentation] Testcase to validate NeoFS operations with BearerToken with Filter UserHeader Equal.
|
|
||||||
[Tags] ACL BearerToken
|
|
||||||
[Timeout] 10 min
|
|
||||||
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
Log Check Bearer token with simple object
|
|
||||||
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
Check eACL Deny and Allow All Bearer Filter UserHeader Equal ${WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
|
|
||||||
Log Check Bearer token with complex object
|
|
||||||
${FILE_S} ${_} = Generate file ${COMPLEX_OBJ_SIZE}
|
|
||||||
Check eACL Deny and Allow All Bearer Filter UserHeader Equal ${WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
Check eACL Deny and Allow All Bearer Filter UserHeader Equal
|
|
||||||
[Arguments] ${WALLET} ${FILE_S}
|
|
||||||
${CID} = Create Container ${WALLET} basic_acl=eacl-public-read-write
|
|
||||||
Prepare eACL Role rules ${CID}
|
|
||||||
${S_OID_USER} = Put object ${WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
||||||
${S_OID_USER_2} = Put object ${WALLET} ${FILE_S} ${CID}
|
|
||||||
${D_OID_USER} = Put object ${WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER_DEL}
|
|
||||||
@{S_OBJ_H} = Create List ${S_OID_USER}
|
|
||||||
|
|
||||||
Put object ${WALLET} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
|
|
||||||
Get object ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
||||||
Search object ${WALLET} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
|
||||||
Head object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256
|
|
||||||
Delete object ${WALLET} ${CID} ${D_OID_USER}
|
|
||||||
|
|
||||||
Set eACL ${WALLET} ${CID} ${EACL_DENY_ALL_USER}
|
|
||||||
|
|
||||||
# The current ACL cache lifetime is 30 sec
|
|
||||||
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
||||||
|
|
||||||
${filters}= Create Dictionary headerType=OBJECT matchType=STRING_EQUAL key=key2 value=abc
|
|
||||||
|
|
||||||
${rule1}= Create Dictionary Operation=GET Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule2}= Create Dictionary Operation=HEAD Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule3}= Create Dictionary Operation=PUT Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule4}= Create Dictionary Operation=DELETE Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule5}= Create Dictionary Operation=SEARCH Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule6}= Create Dictionary Operation=GETRANGE Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule7}= Create Dictionary Operation=GETRANGEHASH Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
|
|
||||||
${eACL_gen}= Create List ${rule1} ${rule2} ${rule3} ${rule4} ${rule5} ${rule6} ${rule7}
|
|
||||||
|
|
||||||
${EACL_TOKEN} = Form BearerToken File ${WALLET} ${CID} ${eACL_gen}
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Put object ${WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get object ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Search object ${WALLET} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Head object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Search object ${WALLET} ${CID} ${EMPTY} ${EACL_TOKEN} ${USER_HEADER} ${S_OBJ_H}
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Put object ${WALLET} ${FILE_S} ${CID} bearer=${EACL_TOKEN} user_headers=${ANOTHER_HEADER}
|
|
||||||
|
|
||||||
Get object ${WALLET} ${CID} ${S_OID_USER} ${EACL_TOKEN} local_file_eacl
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get object ${WALLET} ${CID} ${S_OID_USER_2} ${EACL_TOKEN} local_file_eacl
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256 bearer=${EACL_TOKEN}
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range Hash ${WALLET} ${CID} ${S_OID_USER} ${EACL_TOKEN} 0:256
|
|
||||||
|
|
||||||
Head object ${WALLET} ${CID} ${S_OID_USER} bearer_token=${EACL_TOKEN}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Head object ${WALLET} ${CID} ${S_OID_USER_2} bearer_token=${EACL_TOKEN}
|
|
||||||
# Delete can not be filtered by UserHeader.
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${WALLET} ${CID} ${S_OID_USER} bearer=${EACL_TOKEN}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${WALLET} ${CID} ${S_OID_USER_2} bearer=${EACL_TOKEN}
|
|
|
@ -1,114 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library acl.py
|
|
||||||
Library container.py
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource common_steps_acl_bearer.robot
|
|
||||||
Resource eacl_tables.robot
|
|
||||||
Resource payment_operations.robot
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
&{USER_HEADER} = key1=1 key2=abc
|
|
||||||
&{USER_HEADER_DEL} = key1=del key2=del
|
|
||||||
&{ANOTHER_HEADER} = key1=oth key2=oth
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
BearerToken Operations Filter UserHeader NotEqual
|
|
||||||
[Documentation] Testcase to validate NeoFS operations with BearerToken Filter UserHeader NotEqual.
|
|
||||||
[Tags] ACL BearerToken
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
Log Check Bearer token with simple object
|
|
||||||
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
Check eACL Deny and Allow All Bearer Filter UserHeader NotEqual ${WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
Log Check Bearer token with complex object
|
|
||||||
${FILE_S} ${_} = Generate file ${COMPLEX_OBJ_SIZE}
|
|
||||||
Check eACL Deny and Allow All Bearer Filter UserHeader NotEqual ${WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Check eACL Deny and Allow All Bearer Filter UserHeader NotEqual
|
|
||||||
[Arguments] ${WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
${CID} = Create Container ${WALLET} basic_acl=eacl-public-read-write
|
|
||||||
Prepare eACL Role rules ${CID}
|
|
||||||
${S_OID_USER} = Put object ${WALLET} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
|
|
||||||
${S_OID_USER_2} = Put object ${WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
||||||
${D_OID_USER} = Put object ${WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER_DEL}
|
|
||||||
@{S_OBJ_H} = Create List ${S_OID_USER_2}
|
|
||||||
|
|
||||||
Put object ${WALLET} ${FILE_S} ${CID}
|
|
||||||
Get object ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
||||||
Search object ${WALLET} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
|
||||||
Head object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256
|
|
||||||
Delete object ${WALLET} ${CID} ${D_OID_USER}
|
|
||||||
|
|
||||||
Set eACL ${WALLET} ${CID} ${EACL_DENY_ALL_USER}
|
|
||||||
|
|
||||||
# The current ACL cache lifetime is 30 sec
|
|
||||||
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
||||||
|
|
||||||
${filters}= Create Dictionary headerType=OBJECT matchType=STRING_NOT_EQUAL key=key2 value=abc
|
|
||||||
|
|
||||||
${rule1}= Create Dictionary Operation=GET Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule2}= Create Dictionary Operation=HEAD Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule3}= Create Dictionary Operation=PUT Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule4}= Create Dictionary Operation=DELETE Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule5}= Create Dictionary Operation=SEARCH Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule6}= Create Dictionary Operation=GETRANGE Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule7}= Create Dictionary Operation=GETRANGEHASH Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
|
|
||||||
${eACL_gen}= Create List ${rule1} ${rule2} ${rule3} ${rule4} ${rule6} ${rule7}
|
|
||||||
|
|
||||||
${EACL_TOKEN} = Form BearerToken File ${WALLET} ${CID} ${eACL_gen}
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Put object ${WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get object ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Search object ${WALLET} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Head object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${WALLET} ${CID} ${S_OID_USER} ${EMPTY}
|
|
||||||
|
|
||||||
# Search can not use filter by headers
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Search object ${WALLET} ${CID} ${EMPTY} ${EACL_TOKEN} ${USER_HEADER} ${S_OBJ_H}
|
|
||||||
|
|
||||||
# Different behaviour for big and small objects!
|
|
||||||
# Put object ${WALLET} ${FILE_S} ${CID} ${EACL_TOKEN} ${FILE_OTH_HEADER}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Put object ${WALLET} ${FILE_S} ${CID} ${EACL_TOKEN} ${EMPTY}
|
|
||||||
|
|
||||||
Get object ${WALLET} ${CID} ${S_OID_USER} ${EACL_TOKEN} local_file_eacl
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get object ${WALLET} ${CID} ${S_OID_USER_2} ${EACL_TOKEN} local_file_eacl
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256 bearer=${EACL_TOKEN}
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range Hash ${WALLET} ${CID} ${S_OID_USER} ${EACL_TOKEN} 0:256
|
|
||||||
|
|
||||||
Head object ${WALLET} ${CID} ${S_OID_USER} ${EACL_TOKEN}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Head object ${WALLET} ${CID} ${S_OID_USER_2} ${EACL_TOKEN}
|
|
||||||
|
|
||||||
# Delete can not be filtered by UserHeader.
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${WALLET} ${CID} ${S_OID_USER} ${EACL_TOKEN}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${WALLET} ${CID} ${S_OID_USER_2} ${EACL_TOKEN}
|
|
|
@ -1,62 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library acl.py
|
|
||||||
Library container.py
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource eacl_tables.robot
|
|
||||||
Resource common_steps_acl_bearer.robot
|
|
||||||
Resource payment_operations.robot
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
BearerToken Operations for Inaccessible Container
|
|
||||||
[Documentation] Testcase to validate NeoFS operations with BearerToken for Inaccessible Container.
|
|
||||||
[Tags] ACL BearerToken
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
Log Check Bearer token with simple object
|
|
||||||
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
Check Container Inaccessible and Allow All Bearer ${WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
Log Check Bearer token with complex object
|
|
||||||
${FILE_S} ${_} = Generate file ${COMPLEX_OBJ_SIZE}
|
|
||||||
Check Container Inaccessible and Allow All Bearer ${WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Check Container Inaccessible and Allow All Bearer
|
|
||||||
[Arguments] ${WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
# 0x40000000 is inaccessible ACL
|
|
||||||
${CID} = Create Container ${WALLET} basic_acl=0x40000000
|
|
||||||
Prepare eACL Role rules ${CID}
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Put object ${WALLET} ${FILE_S} ${CID} user_headers=${FILE_USR_HEADER}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get object ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Search object ${WALLET} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Head object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
|
|
||||||
${rule1} = Create Dictionary Operation=PUT Access=ALLOW Role=USER
|
|
||||||
${rule2} = Create Dictionary Operation=SEARCH Access=ALLOW Role=USER
|
|
||||||
${eACL_gen} = Create List ${rule1} ${rule2}
|
|
||||||
|
|
||||||
${EACL_TOKEN} = Form BearerToken File ${WALLET} ${CID} ${eACL_gen}
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Put object ${WALLET} ${FILE_S} ${CID} ${EACL_TOKEN} user_headers=${FILE_USR_HEADER}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Search object ${WALLET} ${CID} ${EMPTY} ${EACL_TOKEN} ${FILE_USR_HEADER}
|
|
|
@ -1,93 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library acl.py
|
|
||||||
Library container.py
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource eacl_tables.robot
|
|
||||||
Resource common_steps_acl_bearer.robot
|
|
||||||
Resource payment_operations.robot
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
&{USER_HEADER} = key1=1 key2=abc
|
|
||||||
&{USER_HEADER_DEL} = key1=del key2=del
|
|
||||||
&{ANOTHER_HEADER} = key1=oth key2=oth
|
|
||||||
${ERROR} = code = 2048 message = access to object operation denied
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
BearerToken Operations
|
|
||||||
[Documentation] Testcase to validate NeoFS operations with BearerToken.
|
|
||||||
[Tags] ACL BearerToken
|
|
||||||
[Timeout] 1 min
|
|
||||||
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
Log Check Bearer token with simple object
|
|
||||||
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
Check eACL Allow All Bearer Filter Requst Equal Deny ${WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
Log Check Bearer token with complex object
|
|
||||||
${FILE_S} ${_} = Generate file ${COMPLEX_OBJ_SIZE}
|
|
||||||
Check eACL Allow All Bearer Filter Requst Equal Deny ${WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Check eACL Allow All Bearer Filter Requst Equal Deny
|
|
||||||
[Arguments] ${WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
${CID} = Create Container ${WALLET} basic_acl=eacl-public-read-write
|
|
||||||
Prepare eACL Role rules ${CID}
|
|
||||||
${S_OID_USER} = Put object ${WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
||||||
${S_OID_USER_2} = Put object ${WALLET} ${FILE_S} ${CID}
|
|
||||||
${D_OID_USER} = Put object ${WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER_DEL}
|
|
||||||
@{S_OBJ_H} = Create List ${S_OID_USER}
|
|
||||||
|
|
||||||
|
|
||||||
${filters}= Create Dictionary headerType=REQUEST matchType=STRING_EQUAL key=a value=256
|
|
||||||
${rule1}= Create Dictionary Operation=GET Access=DENY Role=USER Filters=${filters}
|
|
||||||
${rule2}= Create Dictionary Operation=HEAD Access=DENY Role=USER Filters=${filters}
|
|
||||||
${rule3}= Create Dictionary Operation=PUT Access=DENY Role=USER Filters=${filters}
|
|
||||||
${rule4}= Create Dictionary Operation=DELETE Access=DENY Role=USER Filters=${filters}
|
|
||||||
${rule5}= Create Dictionary Operation=SEARCH Access=DENY Role=USER Filters=${filters}
|
|
||||||
${rule6}= Create Dictionary Operation=GETRANGE Access=DENY Role=USER Filters=${filters}
|
|
||||||
${rule7}= Create Dictionary Operation=GETRANGEHASH Access=DENY Role=USER Filters=${filters}
|
|
||||||
${eACL_gen}= Create List ${rule1} ${rule2} ${rule3} ${rule4} ${rule5} ${rule6} ${rule7}
|
|
||||||
|
|
||||||
${EACL_TOKEN} = Form BearerToken File ${WALLET} ${CID} ${eACL_gen}
|
|
||||||
|
|
||||||
Put object ${WALLET} ${FILE_S} ${CID} bearer=${EACL_TOKEN} user_headers=${ANOTHER_HEADER} options=--xhdr a=2
|
|
||||||
Get object ${WALLET} ${CID} ${S_OID_USER} ${EACL_TOKEN} local_file_eacl ${EMPTY} --xhdr a=2
|
|
||||||
Search object ${WALLET} ${CID} bearer=${EACL_TOKEN} filters=${USER_HEADER}
|
|
||||||
... expected_objects_list=${S_OBJ_H} options=--xhdr a=2
|
|
||||||
Head object ${WALLET} ${CID} ${S_OID_USER} bearer_token=${EACL_TOKEN} options=--xhdr a=2
|
|
||||||
Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256 bearer=${EACL_TOKEN} options=--xhdr a=2
|
|
||||||
Get Range Hash ${WALLET} ${CID} ${S_OID_USER} ${EACL_TOKEN} 0:256 options=--xhdr a=2
|
|
||||||
Delete object ${WALLET} ${CID} ${D_OID_USER} bearer=${EACL_TOKEN} options=--xhdr a=2
|
|
||||||
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Put object ${WALLET} ${FILE_S} ${CID} bearer=${EACL_TOKEN} user_headers=${USER_HEADER} options=--xhdr a=256
|
|
||||||
Should Contain ${ERR} ${ERROR}
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Get object ${WALLET} ${CID} ${S_OID_USER} ${EACL_TOKEN} local_file_eacl ${EMPTY} --xhdr a=256
|
|
||||||
Should Contain ${ERR} ${ERROR}
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Search object ${WALLET} ${CID} bearer=${EACL_TOKEN} filters=${USER_HEADER} options=--xhdr a=256
|
|
||||||
Should Contain ${ERR} ${ERROR}
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Head object ${WALLET} ${CID} ${S_OID_USER} bearer_token=${EACL_TOKEN} options=--xhdr a=256
|
|
||||||
Should Contain ${ERR} ${ERROR}
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256 bearer=${EACL_TOKEN} options=--xhdr a=256
|
|
||||||
Should Contain ${ERR} ${ERROR}
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Get Range Hash ${WALLET} ${CID} ${S_OID_USER} ${EACL_TOKEN} 0:256 options=--xhdr a=256
|
|
||||||
Should Contain ${ERR} ${ERROR}
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Delete object ${WALLET} ${CID} ${S_OID_USER} bearer=${EACL_TOKEN} options=--xhdr a=256
|
|
||||||
Should Contain ${ERR} ${ERROR}
|
|
|
@ -1,78 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library acl.py
|
|
||||||
Library container.py
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource eacl_tables.robot
|
|
||||||
Resource common_steps_acl_bearer.robot
|
|
||||||
Resource payment_operations.robot
|
|
||||||
Resource verbs.robot
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
${EACL_ERROR_MSG} = code = 2048 message = access to object operation denied
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
BearerToken Operations with Filter Requst Equal
|
|
||||||
[Documentation] Testcase to validate NeoFS operations with BearerToken with Filter Requst Equal.
|
|
||||||
[Tags] ACL BearerToken
|
|
||||||
[Timeout] 5 min
|
|
||||||
|
|
||||||
|
|
||||||
Check eACL Deny and Allow All Bearer Filter Requst Equal Simple
|
|
||||||
Check eACL Deny and Allow All Bearer Filter Requst Equal Complex
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Check eACL Deny and Allow All Bearer Filter Requst Equal
|
|
||||||
[Arguments] ${COMPLEXITY}
|
|
||||||
|
|
||||||
${WALLET}
|
|
||||||
... ${_}
|
|
||||||
... ${_} = Prepare Wallet And Deposit
|
|
||||||
${CID} = Create Container ${WALLET} basic_acl=eacl-public-read-write
|
|
||||||
|
|
||||||
${OID} = Run All Verbs Except Delete And Expect Success
|
|
||||||
... ${WALLET} ${CID} ${COMPLEXITY}
|
|
||||||
|
|
||||||
Delete Object And Validate Tombstone
|
|
||||||
... ${WALLET} ${CID} ${OID}
|
|
||||||
|
|
||||||
# Generating empty file to test operations with it after EACL will be set;
|
|
||||||
# the size does not matter as we expect to get "operation is not allowed" error
|
|
||||||
${FILE}
|
|
||||||
... ${_} = Generate File 0
|
|
||||||
${OID} = Put object ${WALLET} ${FILE} ${CID}
|
|
||||||
|
|
||||||
Set eACL ${WALLET} ${CID} ${EACL_DENY_ALL_USER}
|
|
||||||
|
|
||||||
# The current ACL cache lifetime is 30 sec
|
|
||||||
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
||||||
|
|
||||||
${filters}= Create Dictionary headerType=REQUEST matchType=STRING_EQUAL key=a value=256
|
|
||||||
${rule1}= Create Dictionary Operation=GET Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule2}= Create Dictionary Operation=HEAD Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule3}= Create Dictionary Operation=PUT Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule4}= Create Dictionary Operation=DELETE Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule5}= Create Dictionary Operation=SEARCH Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule6}= Create Dictionary Operation=GETRANGE Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule7}= Create Dictionary Operation=GETRANGEHASH Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${eACL_gen}= Create List ${rule1} ${rule2} ${rule3} ${rule4} ${rule5} ${rule6} ${rule7}
|
|
||||||
|
|
||||||
${EACL_TOKEN} = Form BearerToken File ${WALLET} ${CID} ${eACL_gen}
|
|
||||||
|
|
||||||
Run All Verbs And Expect Failure
|
|
||||||
... ${EACL_ERROR_MSG} ${WALLET} ${CID} ${OID}
|
|
||||||
|
|
||||||
${OID} = Run All Verbs Except Delete And Expect Success
|
|
||||||
... ${WALLET} ${CID} ${COMPLEXITY}
|
|
||||||
... ${EACL_TOKEN} --xhdr a=256
|
|
||||||
|
|
||||||
Delete Object And Validate Tombstone
|
|
||||||
... ${WALLET} ${CID} ${OID}
|
|
||||||
... ${EACL_TOKEN} --xhdr a=256
|
|
|
@ -1,90 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library acl.py
|
|
||||||
Library container.py
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource eacl_tables.robot
|
|
||||||
Resource common_steps_acl_bearer.robot
|
|
||||||
Resource payment_operations.robot
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
&{USER_HEADER} = key1=1 key2=abc
|
|
||||||
&{USER_HEADER_DEL} = key1=del key2=del
|
|
||||||
&{ANOTHER_USER_HEADER} = key1=oth key2=oth
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
BearerToken Operations with Filter Requst NotEqual
|
|
||||||
[Documentation] Testcase to validate NeoFS operations with BearerToken with Filter Requst NotEqual.
|
|
||||||
[Tags] ACL NeoFSCLI BearerToken
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
Log Check Bearer token with simple object
|
|
||||||
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
Check eACL Deny and Allow All Bearer Filter Requst NotEqual ${WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
Log Check Bearer token with complex object
|
|
||||||
${FILE_S} ${_} = Generate file ${COMPLEX_OBJ_SIZE}
|
|
||||||
Check eACL Deny and Allow All Bearer Filter Requst NotEqual ${WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Check eACL Deny and Allow All Bearer Filter Requst NotEqual
|
|
||||||
[Arguments] ${WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
${CID} = Create Container ${WALLET} basic_acl=eacl-public-read-write
|
|
||||||
${S_OID_USER} = Put object ${WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
||||||
${S_OID_USER_2} = Put object ${WALLET} ${FILE_S} ${CID}
|
|
||||||
${D_OID_USER} = Put object ${WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER_DEL}
|
|
||||||
@{S_OBJ_H} = Create List ${S_OID_USER}
|
|
||||||
|
|
||||||
Put object ${WALLET} ${FILE_S} ${CID} user_headers=${ANOTHER_USER_HEADER}
|
|
||||||
Get object ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
||||||
Search object ${WALLET} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
|
||||||
Head object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256
|
|
||||||
Delete object ${WALLET} ${CID} ${D_OID_USER}
|
|
||||||
|
|
||||||
Set eACL ${WALLET} ${CID} ${EACL_DENY_ALL_USER}
|
|
||||||
|
|
||||||
# The current ACL cache lifetime is 30 sec
|
|
||||||
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
||||||
|
|
||||||
${filters}= Create Dictionary headerType=REQUEST matchType=STRING_NOT_EQUAL key=a value=256
|
|
||||||
${rule1}= Create Dictionary Operation=GET Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule2}= Create Dictionary Operation=HEAD Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule3}= Create Dictionary Operation=PUT Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule4}= Create Dictionary Operation=DELETE Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule5}= Create Dictionary Operation=SEARCH Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule6}= Create Dictionary Operation=GETRANGE Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${rule7}= Create Dictionary Operation=GETRANGEHASH Access=ALLOW Role=USER Filters=${filters}
|
|
||||||
${eACL_gen}= Create List ${rule1} ${rule2} ${rule3} ${rule4} ${rule5} ${rule6} ${rule7}
|
|
||||||
${EACL_TOKEN} = Form BearerToken File ${WALLET} ${CID} ${eACL_gen}
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Put object ${WALLET} ${FILE_S} ${CID}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get object ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
||||||
#Run Keyword And Expect Error *
|
|
||||||
#... Search object ${WALLET} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Head object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
|
|
||||||
Put object ${WALLET} ${FILE_S} ${CID} bearer=${EACL_TOKEN} user_headers=${USER_HEADER} options=--xhdr a=2
|
|
||||||
Get object ${WALLET} ${CID} ${S_OID_USER} ${EACL_TOKEN} local_file_eacl ${EMPTY} --xhdr a=2
|
|
||||||
Search object ${WALLET} ${CID} ${EMPTY} ${EACL_TOKEN} ${USER_HEADER} ${EMPTY} --xhdr a=2
|
|
||||||
Head object ${WALLET} ${CID} ${S_OID_USER} bearer_token=${EACL_TOKEN} options=--xhdr a=2
|
|
||||||
Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256 bearer=${EACL_TOKEN} --xhdr a=2
|
|
||||||
Get Range Hash ${WALLET} ${CID} ${S_OID_USER} ${EACL_TOKEN} 0:256 --xhdr a=2
|
|
||||||
Delete object ${WALLET} ${CID} ${S_OID_USER} bearer=${EACL_TOKEN} options=--xhdr a=2
|
|
|
@ -1,34 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource common_steps_acl_extended.robot
|
|
||||||
Resource payment_operations.robot
|
|
||||||
Resource eacl_tables.robot
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
Extended ACL Operations
|
|
||||||
[Documentation] Testcase to validate NeoFS operations with extended ACL with Other group key.
|
|
||||||
[Tags] ACL eACL NeoFS NeoCLI
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
${WALLET_OTH} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
Log Check extended ACL with simple object
|
|
||||||
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
Check eACL Deny and Allow All Other ${WALLET} ${WALLET_OTH}
|
|
||||||
|
|
||||||
Log Check extended ACL with complex object
|
|
||||||
${FILE_S} ${_} = Generate file ${COMPLEX_OBJ_SIZE}
|
|
||||||
Check eACL Deny and Allow All Other ${WALLET} ${WALLET_OTH}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Check eACL Deny and Allow All Other
|
|
||||||
[Arguments] ${WALLET} ${WALLET_OTH}
|
|
||||||
Check eACL Deny and Allow All ${WALLET_OTH} ${EACL_DENY_ALL_OTHERS} ${EACL_ALLOW_ALL_OTHERS} ${WALLET}
|
|
|
@ -1,93 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library acl.py
|
|
||||||
Library container.py
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
Library Collections
|
|
||||||
|
|
||||||
Resource common_steps_acl_extended.robot
|
|
||||||
Resource payment_operations.robot
|
|
||||||
Resource eacl_tables.robot
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
&{USER_HEADER} = key1=1 key2=abc
|
|
||||||
&{USER_HEADER_DEL} = key1=del key2=del
|
|
||||||
&{ANOTHER_HEADER} = key1=oth key2=oth
|
|
||||||
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
Extended ACL Operations
|
|
||||||
[Documentation] Testcase to validate NeoFS operations with extended ACL.
|
|
||||||
[Tags] ACL eACL
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
Check eACL Deny All Other and Allow All Pubkey ${FILE_S}
|
|
||||||
|
|
||||||
${FILE_S} ${_} = Generate file ${COMPLEX_OBJ_SIZE}
|
|
||||||
Check eACL Deny All Other and Allow All Pubkey ${FILE_S}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Check eACL Deny All Other and Allow All Pubkey
|
|
||||||
[Arguments] ${FILE_S}
|
|
||||||
|
|
||||||
${USER_WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
${WALLET_OTH} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
${CID} = Create Container ${USER_WALLET} basic_acl=eacl-public-read-write
|
|
||||||
${S_OID_USER} = Put object ${USER_WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
||||||
${D_OID_USER} = Put object ${USER_WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER_DEL}
|
|
||||||
@{S_OBJ_H} = Create List ${S_OID_USER}
|
|
||||||
|
|
||||||
${WALLET_ALLOW} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
Put object ${WALLET_ALLOW} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
|
|
||||||
Get object ${WALLET_ALLOW} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
||||||
Search object ${WALLET_ALLOW} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
|
||||||
Head object ${WALLET_ALLOW} ${CID} ${S_OID_USER}
|
|
||||||
Get Range ${WALLET_ALLOW} ${CID} ${S_OID_USER} 0:256
|
|
||||||
Get Range Hash ${WALLET_ALLOW} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
||||||
Delete object ${WALLET_ALLOW} ${CID} ${D_OID_USER}
|
|
||||||
|
|
||||||
@{VERBS} = Create List get head put delete search getrange getrangehash
|
|
||||||
${RULES_OTH} = EACL Rules deny ${VERBS} others
|
|
||||||
${RULES_PUB} = EACL Rules allow ${VERBS} ${WALLET_ALLOW}
|
|
||||||
${eACL_gen} = Combine Lists ${RULES_PUB} ${RULES_OTH}
|
|
||||||
${EACL_TABLE} = Create eACL ${CID} ${eACL_gen}
|
|
||||||
Set EACL ${USER_WALLET} ${CID} ${EACL_TABLE}
|
|
||||||
|
|
||||||
# The current ACL cache lifetime is 30 sec
|
|
||||||
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
||||||
|
|
||||||
Get eACL ${USER_WALLET} ${CID}
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Put object ${WALLET_OTH} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get object ${WALLET_OTH} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Search object ${WALLET_OTH} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Head object ${WALLET_OTH} ${CID} ${S_OID_USER}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${WALLET_OTH} ${CID} ${S_OID_USER} 0:256
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range Hash ${WALLET_OTH} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${WALLET_OTH} ${CID} ${S_OID_USER}
|
|
||||||
|
|
||||||
Put object ${WALLET_ALLOW} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
|
|
||||||
Get object ${WALLET_ALLOW} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
||||||
Search object ${WALLET_ALLOW} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
|
||||||
Head object ${WALLET_ALLOW} ${CID} ${S_OID_USER}
|
|
||||||
Get Range ${WALLET_ALLOW} ${CID} ${S_OID_USER} 0:256
|
|
||||||
Get Range Hash ${WALLET_ALLOW} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
||||||
Delete object ${WALLET_ALLOW} ${CID} ${S_OID_USER}
|
|
|
@ -1,164 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library acl.py
|
|
||||||
Library container.py
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource common_steps_acl_extended.robot
|
|
||||||
Resource payment_operations.robot
|
|
||||||
Resource eacl_tables.robot
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
&{USER_HEADER} = key1=1 key2=abc
|
|
||||||
&{USER_HEADER_DEL} = key1=del key2=del
|
|
||||||
&{ANOTHER_USER_HEADER} = key1=oth key2=oth
|
|
||||||
${DEPOSIT} = ${30}
|
|
||||||
${EACL_ERROR_MSG} = code = 2048 message = access to object operation denied
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
Extended ACL Operations
|
|
||||||
[Documentation] Testcase to validate NeoFS operations with extended ACL.
|
|
||||||
[Tags] ACL eACL
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
Log Check extended ACL with simple object
|
|
||||||
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
Check eACL Deny and Allow All System ${WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
Log Check extended ACL with complex object
|
|
||||||
${FILE_S} ${_} = Generate file ${COMPLEX_OBJ_SIZE}
|
|
||||||
Check eACL Deny and Allow All System ${WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Check eACL Deny and Allow All System
|
|
||||||
[Arguments] ${WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
Transfer Mainnet Gas ${STORAGE_WALLET_PATH} ${DEPOSIT + 1}
|
|
||||||
NeoFS Deposit ${STORAGE_WALLET_PATH} ${DEPOSIT}
|
|
||||||
Transfer Mainnet Gas ${IR_WALLET_PATH} ${DEPOSIT + 1} wallet_password=${IR_WALLET_PASS}
|
|
||||||
NeoFS Deposit ${IR_WALLET_PATH} ${DEPOSIT} wallet_password=${IR_WALLET_PASS}
|
|
||||||
|
|
||||||
${CID} = Create Container ${WALLET} basic_acl=eacl-public-read-write
|
|
||||||
|
|
||||||
${S_OID_USER} = Put object ${WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
||||||
${D_OID_USER_S} = Put object ${WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER_DEL}
|
|
||||||
${D_OID_USER_SN} = Put object ${WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER_DEL}
|
|
||||||
|
|
||||||
@{S_OBJ_H} = Create List ${S_OID_USER}
|
|
||||||
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Put object ${IR_WALLET_PATH} ${FILE_S} ${CID} user_headers=${ANOTHER_USER_HEADER} wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Should Contain ${ERR} ${EACL_ERROR_MSG}
|
|
||||||
|
|
||||||
Put object ${STORAGE_WALLET_PATH} ${FILE_S} ${CID} user_headers=${ANOTHER_USER_HEADER}
|
|
||||||
|
|
||||||
Get object ${IR_WALLET_PATH} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Get object ${STORAGE_WALLET_PATH} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
||||||
|
|
||||||
Search object ${IR_WALLET_PATH} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H} wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Search object ${STORAGE_WALLET_PATH} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
|
||||||
|
|
||||||
Head object ${IR_WALLET_PATH} ${CID} ${S_OID_USER} wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Head object ${STORAGE_WALLET_PATH} ${CID} ${S_OID_USER}
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${IR_WALLET_PATH} ${CID} ${S_OID_USER} 0:256 wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${STORAGE_WALLET_PATH} ${CID} ${S_OID_USER} 0:256
|
|
||||||
|
|
||||||
#Get Range Hash ${IR_WALLET_PATH} ${CID} ${S_OID_USER} ${EMPTY} 0:256 wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
#Get Range Hash ${STORAGE_WALLET_PATH} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${IR_WALLET_PATH} ${CID} ${D_OID_USER_S} wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${STORAGE_WALLET_PATH} ${CID} ${D_OID_USER_SN}
|
|
||||||
|
|
||||||
Set eACL ${WALLET} ${CID} ${EACL_DENY_ALL_SYSTEM}
|
|
||||||
|
|
||||||
# The current ACL cache lifetime is 30 sec
|
|
||||||
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Put object ${IR_WALLET_PATH} ${FILE_S} ${CID} user_headers=${ANOTHER_USER_HEADER} wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Put object ${STORAGE_WALLET_PATH} ${FILE_S} ${CID} user_headers=${ANOTHER_USER_HEADER}
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get object ${IR_WALLET_PATH} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get object ${STORAGE_WALLET_PATH} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Search object ${IR_WALLET_PATH} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H} wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Search object ${STORAGE_WALLET_PATH} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
|
||||||
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Head object ${IR_WALLET_PATH} ${CID} ${S_OID_USER} wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Head object ${STORAGE_WALLET_PATH} ${CID} ${S_OID_USER}
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${IR_WALLET_PATH} ${CID} ${S_OID_USER} 0:256 wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${STORAGE_WALLET_PATH} ${CID} ${S_OID_USER} 0:256
|
|
||||||
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range Hash ${IR_WALLET_PATH} ${CID} ${S_OID_USER} ${EMPTY} 0:256 wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range Hash ${STORAGE_WALLET_PATH} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
||||||
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${IR_WALLET_PATH} ${CID} ${S_OID_USER} wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${STORAGE_WALLET_PATH} ${CID} ${S_OID_USER}
|
|
||||||
|
|
||||||
|
|
||||||
Set eACL ${WALLET} ${CID} ${EACL_ALLOW_ALL_SYSTEM}
|
|
||||||
|
|
||||||
# The current ACL cache lifetime is 30 sec
|
|
||||||
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
||||||
|
|
||||||
Delete object ${WALLET} ${CID} ${D_OID_USER_S}
|
|
||||||
Delete object ${WALLET} ${CID} ${D_OID_USER_SN}
|
|
||||||
|
|
||||||
${D_OID_USER_S} = Put object ${WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER_DEL}
|
|
||||||
${D_OID_USER_SN} = Put object ${WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER_DEL}
|
|
||||||
Put object ${STORAGE_WALLET_PATH} ${FILE_S} ${CID} user_headers=${ANOTHER_USER_HEADER}
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Put object ${IR_WALLET_PATH} ${FILE_S} ${CID} user_headers=${ANOTHER_USER_HEADER} wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Should Contain ${ERR} ${EACL_ERROR_MSG}
|
|
||||||
|
|
||||||
Get object ${IR_WALLET_PATH} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Get object ${STORAGE_WALLET_PATH} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
||||||
|
|
||||||
Search object ${IR_WALLET_PATH} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H} wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Search object ${STORAGE_WALLET_PATH} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
|
||||||
|
|
||||||
Head object ${IR_WALLET_PATH} ${CID} ${S_OID_USER} wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Head object ${STORAGE_WALLET_PATH} ${CID} ${S_OID_USER}
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${IR_WALLET_PATH} ${CID} ${S_OID_USER} 0:256 wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${STORAGE_WALLET_PATH} ${CID} ${S_OID_USER} 0:256
|
|
||||||
|
|
||||||
#Get Range Hash ${IR_WALLET_PATH} ${CID} ${S_OID_USER} ${EMPTY} 0:256 wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
#Get Range Hash ${STORAGE_WALLET_PATH} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${IR_WALLET_PATH} ${CID} ${D_OID_USER_S} wallet_config=${IR_WALLET_CONFIG}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${STORAGE_WALLET_PATH} ${CID} ${D_OID_USER_SN}
|
|
|
@ -1,33 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource common_steps_acl_extended.robot
|
|
||||||
Resource payment_operations.robot
|
|
||||||
Resource eacl_tables.robot
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
Extended ACL Operations
|
|
||||||
[Documentation] Testcase to validate NeoFS operations with extended ACL.
|
|
||||||
[Tags] ACL eACL
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
Log Check extended ACL with simple object
|
|
||||||
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
Check eACL Deny and Allow All User ${WALLET}
|
|
||||||
|
|
||||||
Log Check extended ACL with complex object
|
|
||||||
${FILE_S} ${_} = Generate file ${COMPLEX_OBJ_SIZE}
|
|
||||||
Check eACL Deny and Allow All User ${WALLET}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Check eACL Deny and Allow All User
|
|
||||||
[Arguments] ${WALLET}
|
|
||||||
Check eACL Deny and Allow All ${WALLET} ${EACL_DENY_ALL_USER} ${EACL_ALLOW_ALL_USER} ${WALLET}
|
|
|
@ -1,137 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library acl.py
|
|
||||||
Library container.py
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource common_steps_acl_extended.robot
|
|
||||||
Resource payment_operations.robot
|
|
||||||
Resource eacl_tables.robot
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
&{USER_HEADER} = key1=1 key2=abc
|
|
||||||
&{ANOTHER_HEADER} = key1=oth key2=oth
|
|
||||||
${DEPOSIT} = ${30}
|
|
||||||
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
Extended ACL Operations
|
|
||||||
[Documentation] Testcase to validate NeoFS operations with extended ACL.
|
|
||||||
[Tags] ACL eACL
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
${WALLET_OTH} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
Log Check extended ACL with simple object
|
|
||||||
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
Check Сompound Operations ${WALLET} ${WALLET_OTH} ${FILE_S}
|
|
||||||
|
|
||||||
Log Check extended ACL with complex object
|
|
||||||
${FILE_S} ${_} = Generate file ${COMPLEX_OBJ_SIZE}
|
|
||||||
Check Сompound Operations ${WALLET} ${WALLET_OTH} ${FILE_S}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
|
|
||||||
Check Сompound Operations
|
|
||||||
[Arguments] ${WALLET} ${WALLET_OTH} ${FILE_S}
|
|
||||||
|
|
||||||
Transfer Mainnet Gas ${IR_WALLET_PATH} ${DEPOSIT + 1} wallet_password=${IR_WALLET_PASS}
|
|
||||||
NeoFS Deposit ${IR_WALLET_PATH} ${DEPOSIT} wallet_password=${IR_WALLET_PASS}
|
|
||||||
|
|
||||||
Check eACL Сompound Get ${WALLET_OTH} ${EACL_COMPOUND_GET_OTHERS} ${FILE_S} ${WALLET}
|
|
||||||
Check eACL Сompound Get ${WALLET} ${EACL_COMPOUND_GET_USER} ${FILE_S} ${WALLET}
|
|
||||||
#Check eACL Сompound Get ${IR_WALLET_PATH} ${EACL_COMPOUND_GET_SYSTEM} ${FILE_S} ${WALLET}
|
|
||||||
|
|
||||||
Check eACL Сompound Delete ${WALLET_OTH} ${EACL_COMPOUND_DELETE_OTHERS} ${FILE_S} ${WALLET}
|
|
||||||
Check eACL Сompound Delete ${WALLET} ${EACL_COMPOUND_DELETE_USER} ${FILE_S} ${WALLET}
|
|
||||||
#Check eACL Сompound Delete ${IR_WALLET_PATH} ${EACL_COMPOUND_DELETE_SYSTEM} ${FILE_S} ${WALLET}
|
|
||||||
|
|
||||||
Check eACL Сompound Get Range Hash ${WALLET_OTH} ${EACL_COMPOUND_GET_HASH_OTHERS} ${FILE_S} ${WALLET}
|
|
||||||
Check eACL Сompound Get Range Hash ${WALLET} ${EACL_COMPOUND_GET_HASH_USER} ${FILE_S} ${WALLET}
|
|
||||||
#Check eACL Сompound Get Range Hash ${IR_WALLET_PATH} ${EACL_COMPOUND_GET_HASH_SYSTEM} ${FILE_S} ${WALLET}
|
|
||||||
|
|
||||||
Check eACL Сompound Get
|
|
||||||
[Arguments] ${WALLET} ${DENY_EACL} ${FILE_S} ${USER_WALLET}
|
|
||||||
|
|
||||||
${CID} = Create Container ${USER_WALLET} basic_acl=eacl-public-read-write
|
|
||||||
|
|
||||||
${S_OID_USER} = Put object ${USER_WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
||||||
Put object ${WALLET} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
|
|
||||||
Get object ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
||||||
Set eACL ${USER_WALLET} ${CID} ${DENY_EACL}
|
|
||||||
|
|
||||||
# The current ACL cache lifetime is 30 sec
|
|
||||||
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Head object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
|
|
||||||
Get object ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
||||||
IF "${WALLET}" == "${IR_WALLET_PATH}"
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256
|
|
||||||
ELSE
|
|
||||||
Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256
|
|
||||||
END
|
|
||||||
Get Range Hash ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
||||||
|
|
||||||
|
|
||||||
Check eACL Сompound Delete
|
|
||||||
[Arguments] ${WALLET} ${DENY_EACL} ${FILE_S} ${USER_WALLET}
|
|
||||||
|
|
||||||
${CID} = Create Container ${USER_WALLET} basic_acl=eacl-public-read-write
|
|
||||||
|
|
||||||
${S_OID_USER} = Put object ${USER_WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
||||||
${D_OID_USER} = Put object ${USER_WALLET} ${FILE_S} ${CID}
|
|
||||||
Put object ${WALLET} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
|
|
||||||
IF "${WALLET}" == "${IR_WALLET_PATH}"
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${WALLET} ${CID} ${D_OID_USER}
|
|
||||||
ELSE
|
|
||||||
Delete object ${WALLET} ${CID} ${D_OID_USER}
|
|
||||||
END
|
|
||||||
|
|
||||||
Set eACL ${USER_WALLET} ${CID} ${DENY_EACL}
|
|
||||||
|
|
||||||
# The current ACL cache lifetime is 30 sec
|
|
||||||
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Head object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Put object ${WALLET} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
|
|
||||||
IF "${WALLET}" == "${IR_WALLET_PATH}"
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
ELSE
|
|
||||||
Delete object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
END
|
|
||||||
|
|
||||||
|
|
||||||
Check eACL Сompound Get Range Hash
|
|
||||||
[Arguments] ${WALLET} ${DENY_EACL} ${FILE_S} ${USER_WALLET}
|
|
||||||
|
|
||||||
${CID} = Create Container ${USER_WALLET} basic_acl=eacl-public-read-write
|
|
||||||
|
|
||||||
${S_OID_USER} = Put object ${USER_WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
||||||
Put object ${WALLET} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
|
|
||||||
Get Range Hash ${IR_WALLET_PATH} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
||||||
|
|
||||||
Set eACL ${USER_WALLET} ${CID} ${DENY_EACL}
|
|
||||||
|
|
||||||
# The current ACL cache lifetime is 30 sec
|
|
||||||
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get object ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
||||||
|
|
||||||
Get Range Hash ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
|
@ -1,58 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library acl.py
|
|
||||||
Library container.py
|
|
||||||
Library epoch.py
|
|
||||||
Library node_management.py
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library storage_policy.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource eacl_tables.robot
|
|
||||||
Resource common_steps_acl_bearer.robot
|
|
||||||
Resource payment_operations.robot
|
|
||||||
Resource storage.robot
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
${FULL_PLACEMENT_RULE} = REP 4 IN X CBF 1 SELECT 4 FROM * AS X
|
|
||||||
${EXPECTED_COPIES} = ${4}
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
eACL Deny Replication Operations
|
|
||||||
[Documentation] Testcase to validate NeoFS replication with eACL deny rules.
|
|
||||||
[Tags] ACL Replication
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
${_} ${NODE} ${STORAGE_WALLET} = Get control endpoint and wallet
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
# https://github.com/nspcc-dev/neofs-node/issues/881
|
|
||||||
|
|
||||||
${FILE} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
${CID} = Create container ${WALLET} basic_acl=eacl-public-read-write rule=${FULL_PLACEMENT_RULE}
|
|
||||||
Prepare eACL Role rules ${CID}
|
|
||||||
|
|
||||||
${OID} = Put object ${WALLET} ${FILE} ${CID}
|
|
||||||
|
|
||||||
${COPIES} = Get Object Copies Simple ${WALLET} ${CID} ${OID}
|
|
||||||
Should Be Equal As Numbers ${EXPECTED_COPIES} ${COPIES}
|
|
||||||
|
|
||||||
Set eACL ${WALLET} ${CID} ${EACL_DENY_ALL_USER}
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Put object ${WALLET} ${FILE} ${CID}
|
|
||||||
|
|
||||||
# Drop object to check replication
|
|
||||||
Drop object ${NODE} ${STORAGE_WALLET} ${CID} ${OID}
|
|
||||||
|
|
||||||
Tick Epoch
|
|
||||||
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
||||||
|
|
||||||
# We assume that during one epoch object should be replicated
|
|
||||||
${COPIES} = Get Object Copies Simple ${STORAGE_WALLET} ${CID} ${OID}
|
|
||||||
Should Be Equal As Numbers ${EXPECTED_COPIES} ${COPIES}
|
|
||||||
... msg="Dropped object should be replicated in one epoch"
|
|
||||||
|
|
|
@ -1,199 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library acl.py
|
|
||||||
Library container.py
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library Collections
|
|
||||||
|
|
||||||
Resource common_steps_acl_extended.robot
|
|
||||||
Resource payment_operations.robot
|
|
||||||
Resource eacl_tables.robot
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
&{USER_HEADER} = key1=1 key2=abc
|
|
||||||
&{ANOTHER_HEADER} = key1=oth key2=oth
|
|
||||||
${ID_FILTER} = $Object:objectID
|
|
||||||
${CUSTOM_FILTER} = key1
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
Extended ACL Operations
|
|
||||||
[Documentation] Testcase to validate NeoFS operations with extended ACL.
|
|
||||||
[Tags] ACL eACL
|
|
||||||
[Timeout] 3 min
|
|
||||||
|
|
||||||
|
|
||||||
Check Filters Simple
|
|
||||||
Check Filters Complex
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Check Filters
|
|
||||||
[Arguments] ${OBJ_COMPLEXITY}
|
|
||||||
|
|
||||||
${SIZE} = Set Variable IF
|
|
||||||
... """${OBJ_COMPLEXITY}""" == """Simple""" ${SIMPLE_OBJ_SIZE} ${COMPLEX_OBJ_SIZE}
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
${WALLET_OTH} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
${FILE_S} ${_} = Generate File ${SIZE}
|
|
||||||
|
|
||||||
Check eACL MatchType String Equal Object ${WALLET} ${WALLET_OTH} ${FILE_S}
|
|
||||||
Check eACL MatchType String Not Equal Object ${WALLET} ${WALLET_OTH} ${FILE_S}
|
|
||||||
Check eACL MatchType String Equal Request Deny ${WALLET} ${WALLET_OTH} ${FILE_S}
|
|
||||||
Check eACL MatchType String Equal Request Allow ${WALLET} ${WALLET_OTH} ${FILE_S}
|
|
||||||
|
|
||||||
|
|
||||||
Check eACL MatchType String Equal Request Deny
|
|
||||||
[Arguments] ${USER_WALLET} ${OTHER_WALLET} ${FILE_S}
|
|
||||||
${CID} = Create Container ${USER_WALLET} basic_acl=eacl-public-read-write
|
|
||||||
${S_OID_USER} = Put object ${USER_WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
||||||
Get object ${USER_WALLET} ${CID} ${S_OID_USER}
|
|
||||||
|
|
||||||
Set eACL ${USER_WALLET} ${CID} ${EACL_XHEADER_DENY_ALL}
|
|
||||||
|
|
||||||
# The current ACL cache lifetime is 30 sec
|
|
||||||
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get object ${OTHER_WALLET} ${CID} ${S_OID_USER} options=--xhdr a=2
|
|
||||||
Get object ${OTHER_WALLET} ${CID} ${S_OID_USER} options=--xhdr a=256
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Put object ${OTHER_WALLET} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER} options=--xhdr a=2
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get object ${OTHER_WALLET} ${CID} ${S_OID_USER} options=--xhdr a=2
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Search object ${OTHER_WALLET} ${CID} filters=${USER_HEADER} options=--xhdr a=2
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Head object ${OTHER_WALLET} ${CID} ${S_OID_USER} options=--xhdr a=2
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${OTHER_WALLET} ${CID} ${S_OID_USER} 0:256 options=--xhdr a="2"
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range Hash ${OTHER_WALLET} ${CID} ${S_OID_USER} bearer_token=${EMPTY} range_cut=0:256 options=--xhdr a=2
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${OTHER_WALLET} ${CID} ${S_OID_USER} options=--xhdr a=2
|
|
||||||
|
|
||||||
Put object ${OTHER_WALLET} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER} options=--xhdr a=256
|
|
||||||
Get object ${OTHER_WALLET} ${CID} ${S_OID_USER} options=--xhdr a=*
|
|
||||||
Search object ${OTHER_WALLET} ${CID} filters=${USER_HEADER} options=--xhdr a=
|
|
||||||
Head object ${OTHER_WALLET} ${CID} ${S_OID_USER} options=--xhdr a=.*
|
|
||||||
Get Range ${OTHER_WALLET} ${CID} ${S_OID_USER} 0:256 options=--xhdr a="2 2"
|
|
||||||
Get Range Hash ${OTHER_WALLET} ${CID} ${S_OID_USER} bearer_token=${EMPTY} range_cut=0:256 options=--xhdr a=256
|
|
||||||
Delete object ${OTHER_WALLET} ${CID} ${S_OID_USER} options=--xhdr a=22
|
|
||||||
|
|
||||||
|
|
||||||
Check eACL MatchType String Equal Request Allow
|
|
||||||
[Arguments] ${USER_WALLET} ${OTHER_WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
${CID} = Create Container ${USER_WALLET} basic_acl=eacl-public-read-write
|
|
||||||
${S_OID_USER} = Put Object ${USER_WALLET} ${FILE_S} ${CID}
|
|
||||||
Get Object ${OTHER_WALLET} ${CID} ${S_OID_USER}
|
|
||||||
|
|
||||||
Set eACL ${USER_WALLET} ${CID} ${EACL_XHEADER_ALLOW_ALL}
|
|
||||||
|
|
||||||
# The current ACL cache lifetime is 30 sec
|
|
||||||
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
||||||
|
|
||||||
Get eACL ${USER_WALLET} ${CID}
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get object ${OTHER_WALLET} ${CID} ${S_OID_USER}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Put object ${OTHER_WALLET} ${FILE_S} ${CID}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get object ${OTHER_WALLET} ${CID} ${S_OID_USER}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Search object ${OTHER_WALLET} ${CID} filters=${USER_HEADER}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Head object ${OTHER_WALLET} ${CID} ${S_OID_USER}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range ${OTHER_WALLET} ${CID} ${S_OID_USER} 0:256
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Range Hash ${OTHER_WALLET} ${CID} ${S_OID_USER} bearer_token=${EMPTY} range_cut=0:256
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete object ${OTHER_WALLET} ${CID} ${S_OID_USER}
|
|
||||||
|
|
||||||
Put object ${OTHER_WALLET} ${FILE_S} ${CID} options=--xhdr a=2
|
|
||||||
Get object ${OTHER_WALLET} ${CID} ${S_OID_USER} options=--xhdr a=2
|
|
||||||
Search object ${OTHER_WALLET} ${CID} filters=${USER_HEADER} options=--xhdr a=2
|
|
||||||
Head object ${OTHER_WALLET} ${CID} ${S_OID_USER} options=--xhdr a=2
|
|
||||||
Get Range ${OTHER_WALLET} ${CID} ${S_OID_USER} 0:256 options=--xhdr a=2
|
|
||||||
Get Range Hash ${OTHER_WALLET} ${CID} ${S_OID_USER} bearer_token=${EMPTY} range_cut=0:256 options=--xhdr a=2
|
|
||||||
Delete object ${OTHER_WALLET} ${CID} ${S_OID_USER} options=--xhdr a=2
|
|
||||||
|
|
||||||
|
|
||||||
Check eACL MatchType String Equal Object
|
|
||||||
[Arguments] ${USER_WALLET} ${OTHER_WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
${CID} = Create Container ${USER_WALLET} basic_acl=eacl-public-read-write
|
|
||||||
${S_OID_USER} = Put Object ${USER_WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
||||||
Get Object ${OTHER_WALLET} ${CID} ${S_OID_USER}
|
|
||||||
|
|
||||||
Log Set eACL for Deny GET operation with StringEqual Object ID
|
|
||||||
|
|
||||||
&{HEADER_DICT} = Head Object ${USER_WALLET} ${CID} ${S_OID_USER}
|
|
||||||
${ID_value} = Get From dictionary ${HEADER_DICT} ${EACL_OBJ_FILTERS}[${ID_FILTER}]
|
|
||||||
|
|
||||||
${filters} = Set Variable obj:${ID_FILTER}=${ID_value}
|
|
||||||
${rule1} = Set Variable deny get ${filters} others
|
|
||||||
${eACL_gen} = Create List ${rule1}
|
|
||||||
${EACL_CUSTOM} = Create eACL ${CID} ${eACL_gen}
|
|
||||||
Set eACL ${USER_WALLET} ${CID} ${EACL_CUSTOM}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get object ${OTHER_WALLET} ${CID} ${S_OID_USER}
|
|
||||||
|
|
||||||
Log Set eACL for Deny GET operation with StringEqual Object Extended User Header
|
|
||||||
|
|
||||||
${S_OID_USER_OTH} = Put object ${USER_WALLET} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
|
|
||||||
|
|
||||||
${filters} = Set Variable obj:${CUSTOM_FILTER}=1
|
|
||||||
${rule1} = Set Variable deny get ${filters} others
|
|
||||||
${eACL_gen} = Create List ${rule1}
|
|
||||||
${EACL_CUSTOM} = Create eACL ${CID} ${eACL_gen}
|
|
||||||
|
|
||||||
Set eACL ${USER_WALLET} ${CID} ${EACL_CUSTOM}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get object ${OTHER_WALLET} ${CID} ${S_OID_USER}
|
|
||||||
Get object ${OTHER_WALLET} ${CID} ${S_OID_USER_OTH}
|
|
||||||
|
|
||||||
|
|
||||||
Check eACL MatchType String Not Equal Object
|
|
||||||
[Arguments] ${USER_WALLET} ${OTHER_WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
${CID} = Create Container ${USER_WALLET} basic_acl=eacl-public-read-write
|
|
||||||
|
|
||||||
${S_OID_USER} = Put object ${USER_WALLET} ${FILE_S} ${CID}
|
|
||||||
${S_OID_OTHER} = Put object ${OTHER_WALLET} ${FILE_S} ${CID}
|
|
||||||
Get object ${OTHER_WALLET} ${CID} ${S_OID_USER}
|
|
||||||
Get object ${OTHER_WALLET} ${CID} ${S_OID_OTHER}
|
|
||||||
|
|
||||||
Log Set eACL for Deny GET operation with StringNotEqual Object ID
|
|
||||||
|
|
||||||
&{HEADER_DICT} = Head object ${USER_WALLET} ${CID} ${S_OID_USER}
|
|
||||||
${ID_value} = Get From Dictionary ${HEADER_DICT} ${EACL_OBJ_FILTERS}[${ID_FILTER}]
|
|
||||||
|
|
||||||
${filters} = Set Variable obj:${ID_FILTER}!=${ID_value}
|
|
||||||
${rule1} = Set Variable deny get ${filters} others
|
|
||||||
${eACL_gen} = Create List ${rule1}
|
|
||||||
${EACL_CUSTOM} = Create eACL ${CID} ${eACL_gen}
|
|
||||||
|
|
||||||
Set eACL ${USER_WALLET} ${CID} ${EACL_CUSTOM}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get object ${OTHER_WALLET} ${CID} ${S_OID_OTHER}
|
|
||||||
Get object ${OTHER_WALLET} ${CID} ${S_OID_USER}
|
|
||||||
|
|
||||||
Log Set eACL for Deny GET operation with StringEqual Object Extended User Header
|
|
||||||
|
|
||||||
${S_OID_USER_OTH} = Put object ${USER_WALLET} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
|
|
||||||
${filters} = Set Variable obj:${CUSTOM_FILTER}!=1
|
|
||||||
${rule1} = Set Variable deny get ${filters} others
|
|
||||||
${eACL_gen} = Create List ${rule1}
|
|
||||||
${EACL_CUSTOM} = Create eACL ${CID} ${eACL_gen}
|
|
||||||
|
|
||||||
Set eACL ${USER_WALLET} ${CID} ${EACL_CUSTOM}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get object ${OTHER_WALLET} ${CID} ${S_OID_USER_OTH}
|
|
||||||
Get object ${OTHER_WALLET} ${CID} ${S_OID_USER}
|
|
|
@ -1,13 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Resource common_steps_acl_extended.robot
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
Container ID Object Filter for Extended ACL
|
|
||||||
[Documentation] Testcase to validate if $Object:containerID eACL filter is correctly handled.
|
|
||||||
[Tags] ACL eACL
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
Log Check eACL containerID Filter with MatchType String Equal
|
|
||||||
Check eACL Filters with MatchType String Equal $Object:containerID
|
|
||||||
|
|
|
@ -1,52 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
Variables eacl_object_filters.py
|
|
||||||
|
|
||||||
Library acl.py
|
|
||||||
Library container.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource common_steps_acl_extended.robot
|
|
||||||
Resource payment_operations.robot
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
${OBJECT_PATH} = testfile
|
|
||||||
${EACL_ERR_MSG} = *
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
Creation Epoch Object Filter for Extended ACL
|
|
||||||
[Documentation] Testcase to validate if $Object:creationEpoch eACL filter is correctly handled.
|
|
||||||
[Tags] ACL eACL
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
Check eACL Filters with MatchType String Equal $Object:creationEpoch
|
|
||||||
Check $Object:creationEpoch Filter with MatchType String Not Equal $Object:creationEpoch
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Check $Object:creationEpoch Filter with MatchType String Not Equal
|
|
||||||
[Arguments] ${FILTER}
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
${WALLET_OTH} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
${CID} = Create Container ${WALLET} basic_acl=eacl-public-read-write
|
|
||||||
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
|
|
||||||
${S_OID} = Put Object ${WALLET} ${FILE_S} ${CID}
|
|
||||||
${S_OID_NEW} = Put Object ${WALLET} ${FILE_S} ${CID}
|
|
||||||
|
|
||||||
Get Object ${WALLET} ${CID} ${S_OID_NEW} ${EMPTY} local_file_eacl
|
|
||||||
&{HEADER} = Head Object ${WALLET} ${CID} ${S_OID_NEW}
|
|
||||||
|
|
||||||
${EACL_CUSTOM} = Compose eACL Custom ${CID} ${HEADER}[header][creationEpoch] != ${FILTER} DENY OTHERS
|
|
||||||
Set eACL ${WALLET} ${CID} ${EACL_CUSTOM}
|
|
||||||
|
|
||||||
Run Keyword And Expect Error ${EACL_ERR_MSG}
|
|
||||||
... Get object ${WALLET_OTH} ${CID} ${S_OID} ${EMPTY} ${OBJECT_PATH}
|
|
||||||
Get object ${WALLET_OTH} ${CID} ${S_OID_NEW} ${EMPTY} ${OBJECT_PATH}
|
|
||||||
Run Keyword And Expect error ${EACL_ERR_MSG}
|
|
||||||
... Head object ${WALLET_OTH} ${CID} ${S_OID}
|
|
||||||
Head object ${WALLET_OTH} ${CID} ${S_OID_NEW}
|
|
|
@ -1,13 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Resource common_steps_acl_extended.robot
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
Homomorphic Hash Object Filter for Extended ACL
|
|
||||||
[Documentation] Testcase to validate if $Object:homomorphicHash eACL filter is correctly handled.
|
|
||||||
[Tags] ACL eACL NeoFS NeoCLI
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
Log Check eACL homomorphicHash Filter with MatchType String Equal
|
|
||||||
Check eACL Filters with MatchType String Equal $Object:homomorphicHash
|
|
||||||
|
|
|
@ -1,94 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
Variables eacl_object_filters.py
|
|
||||||
|
|
||||||
Library acl.py
|
|
||||||
Library container.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource common_steps_acl_extended.robot
|
|
||||||
Resource payment_operations.robot
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
${OBJECT_PATH} = testfile
|
|
||||||
${EACL_ERR_MSG} = *
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
Object ID Object Filter for Extended ACL
|
|
||||||
[Documentation] Testcase to validate if $Object:objectID eACL filter is correctly handled.
|
|
||||||
[Tags] ACL eACL
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
Check eACL Filters with MatchType String Equal $Object:objectID
|
|
||||||
Check eACL Filters with MatchType String Not Equal $Object:objectID
|
|
||||||
|
|
||||||
#################################################################################
|
|
||||||
# If the first eACL rule contradicts the second, the second one won't be applied
|
|
||||||
#################################################################################
|
|
||||||
Check eACL Filters with MatchType String Equal with two contradicting filters $Object:objectID
|
|
||||||
|
|
||||||
###########################################################################################################################
|
|
||||||
# If both STRING_EQUAL and STRING_NOT_EQUAL matchTypes are applied for the same filter value, no object can be operated on
|
|
||||||
###########################################################################################################################
|
|
||||||
Check eACL Filters, two matchTypes $Object:objectID
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Check eACL Filters with MatchType String Equal with two contradicting filters
|
|
||||||
[Arguments] ${FILTER}
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
${WALLET_OTH} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
${CID} = Create Container ${WALLET} basic_acl=eacl-public-read-write
|
|
||||||
${FILE_S_USER} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
|
|
||||||
${S_OID_USER} = Put Object ${WALLET} ${FILE_S_USER} ${CID} ${EMPTY}
|
|
||||||
|
|
||||||
Get Object ${WALLET_OTH} ${CID} ${S_OID_USER} ${EMPTY} ${OBJECT_PATH}
|
|
||||||
|
|
||||||
&{HEADER} = Head Object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
${filter_value} = Get From Dictionary ${HEADER} ${EACL_OBJ_FILTERS}[${FILTER}]
|
|
||||||
${filters} = Set Variable obj:${FILTER}=${filter_value}
|
|
||||||
${rule} = Set Variable allow get ${filters} others
|
|
||||||
${contradicting_filters} = Set Variable obj:$Object:payloadLength=${SIMPLE_OBJ_SIZE}
|
|
||||||
${contradicting_rule} = Set Variable deny get ${contradicting_filters} others
|
|
||||||
${eACL_gen} = Create List ${rule} ${contradicting_rule}
|
|
||||||
${EACL_CUSTOM} = Create eACL ${CID} ${eACL_gen}
|
|
||||||
|
|
||||||
Set eACL ${WALLET} ${CID} ${EACL_CUSTOM}
|
|
||||||
Get object ${WALLET_OTH} ${CID} ${S_OID_USER} ${EMPTY} ${OBJECT_PATH}
|
|
||||||
|
|
||||||
|
|
||||||
Check eACL Filters, two matchTypes
|
|
||||||
[Arguments] ${FILTER}
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
${WALLET_OTH} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
${CID} = Create Container ${WALLET} basic_acl=eacl-public-read-write
|
|
||||||
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
|
|
||||||
${S_OID_USER} = Put Object ${WALLET} ${FILE_S} ${CID} ${EMPTY}
|
|
||||||
${S_OID_OTHER} = Put Object ${WALLET_OTH} ${FILE_S} ${CID} ${EMPTY}
|
|
||||||
&{HEADER} = Head Object ${WALLET} ${CID} ${S_OID_USER}
|
|
||||||
|
|
||||||
Get Object ${WALLET_OTH} ${CID} ${S_OID_USER} ${EMPTY} ${OBJECT_PATH}
|
|
||||||
Get Object ${WALLET_OTH} ${CID} ${S_OID_OTHER} ${EMPTY} ${OBJECT_PATH}
|
|
||||||
|
|
||||||
${filter_value} = Get From Dictionary ${HEADER} ${EACL_OBJ_FILTERS}[${FILTER}]
|
|
||||||
${noneq_filters} = Set Variable obj:${FILTER}!=${filter_value}
|
|
||||||
${rule_noneq_filter} = Set Variable deny get ${noneq_filters} others
|
|
||||||
${eq_filters} = Set Variable obj:${FILTER}=${filter_value}
|
|
||||||
${rule_eq_filter} = Set Variable deny get ${eq_filters} others
|
|
||||||
${eACL_gen} = Create List ${rule_noneq_filter} ${rule_eq_filter}
|
|
||||||
${EACL_CUSTOM} = Create eACL ${CID} ${eACL_gen}
|
|
||||||
|
|
||||||
Set eACL ${WALLET} ${CID} ${EACL_CUSTOM}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get object ${WALLET_OTH} ${CID} ${S_OID_OTHER} ${EMPTY} ${OBJECT_PATH}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get Object ${WALLET_OTH} ${CID} ${S_OID_USER} ${EMPTY} ${OBJECT_PATH}
|
|
|
@ -1,13 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Resource common_steps_acl_extended.robot
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
Object Type Object Filter for Extended ACL
|
|
||||||
[Documentation] Testcase to validate if $Object:objectType eACL filter is correctly handled.
|
|
||||||
[Tags] ACL eACL NeoFS NeoCLI
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
Log Check eACL objectType Filter with MatchType String Equal
|
|
||||||
Check eACL Filters with MatchType String Equal $Object:objectType
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Resource common_steps_acl_extended.robot
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
Owner ID Object Filter for Extended ACL
|
|
||||||
[Documentation] Testcase to validate if $Object:ownerID eACL filter is correctly handled.
|
|
||||||
[Tags] ACL eACL NeoFS NeoCLI
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
Log Check eACL ownerID Filter with MatchType String Equal
|
|
||||||
Check eACL Filters with MatchType String Equal $Object:ownerID
|
|
||||||
Log Check eACL ownerID Filter with MatchType String Not Equal
|
|
||||||
Check eACL Filters with MatchType String Not Equal $Object:ownerID
|
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Resource common_steps_acl_extended.robot
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
Payload Hash Object Filter for Extended ACL
|
|
||||||
[Documentation] Testcase to validate if $Object:payloadHash eACL filter is correctly handled.
|
|
||||||
[Tags] ACL eACL NeoFS NeoCLI
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
Log Check eACL payloadHash Filter with MatchType String Equal
|
|
||||||
Check eACL Filters with MatchType String Equal $Object:payloadHash
|
|
||||||
|
|
|
@ -1,53 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
Variables eacl_object_filters.py
|
|
||||||
|
|
||||||
Library acl.py
|
|
||||||
Library container.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource common_steps_acl_extended.robot
|
|
||||||
Resource payment_operations.robot
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
${OBJECT_PATH} = testfile
|
|
||||||
${EACL_ERR_MSG} = *
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
Payload Length Object Filter for Extended ACL
|
|
||||||
[Documentation] Testcase to validate if $Object:payloadLength eACL filter is correctly handled.
|
|
||||||
[Tags] ACL eACL
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
Check eACL Filters with MatchType String Equal $Object:payloadLength
|
|
||||||
Check $Object:payloadLength Filter with MatchType String Not Equal $Object:payloadLength
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Check $Object:payloadLength Filter with MatchType String Not Equal
|
|
||||||
[Arguments] ${FILTER}
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
${WALLET_OTH} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
${CID} = Create Container ${WALLET} basic_acl=eacl-public-read-write
|
|
||||||
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
${FILE_0} ${_} = Generate file ${0}
|
|
||||||
|
|
||||||
${S_OID_0} = Put Object ${WALLET} ${FILE_0} ${CID}
|
|
||||||
${S_OID} = Put Object ${WALLET} ${FILE_S} ${CID}
|
|
||||||
|
|
||||||
Get Object ${WALLET} ${CID} ${S_OID} ${EMPTY} local_file_eacl
|
|
||||||
&{HEADER} = Head Object ${WALLET} ${CID} ${S_OID}
|
|
||||||
|
|
||||||
${EACL_CUSTOM} = Compose eACL Custom ${CID} ${HEADER}[header][payloadLength] != ${FILTER} DENY OTHERS
|
|
||||||
Set eACL ${WALLET} ${CID} ${EACL_CUSTOM}
|
|
||||||
|
|
||||||
Run Keyword And Expect Error ${EACL_ERR_MSG}
|
|
||||||
... Get object ${WALLET_OTH} ${CID} ${S_OID_0} ${EMPTY} ${OBJECT_PATH}
|
|
||||||
Get object ${WALLET_OTH} ${CID} ${S_OID} ${EMPTY} ${OBJECT_PATH}
|
|
||||||
Run Keyword And Expect error ${EACL_ERR_MSG}
|
|
||||||
... Head object ${WALLET_OTH} ${CID} ${S_OID_0}
|
|
||||||
Head object ${WALLET_OTH} ${CID} ${S_OID}
|
|
|
@ -1,13 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Resource common_steps_acl_extended.robot
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
Version Object Filter for Extended ACL
|
|
||||||
[Documentation] Testcase to validate if $Object:version eACL filter is correctly handled.
|
|
||||||
[Tags] ACL eACL NeoFS NeoCLI
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
Log Check eACL version Filter with MatchType String Equal
|
|
||||||
Check eACL Filters with MatchType String Equal $Object:version
|
|
||||||
|
|
|
@ -1,51 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library container.py
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource payment_operations.robot
|
|
||||||
Resource storage_group.robot
|
|
||||||
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
Basic ACL Operations for Private Container
|
|
||||||
[Documentation] Storage Group operations with Private Container.
|
|
||||||
[Tags] ACL
|
|
||||||
[Timeout] 10 min
|
|
||||||
|
|
||||||
|
|
||||||
Check Private Container Simple
|
|
||||||
Check Private Container Complex
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Check Private Container
|
|
||||||
[Arguments] ${COMPLEXITY}
|
|
||||||
|
|
||||||
${FILE_S} ${_} = Run Keyword If """${COMPLEXITY}""" == """Simple"""
|
|
||||||
... Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
... ELSE
|
|
||||||
... Generate file ${COMPLEX_OBJ_SIZE}
|
|
||||||
|
|
||||||
${USER_WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
${OTHER_WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
${PRIV_CID} = Create Container ${USER_WALLET}
|
|
||||||
|
|
||||||
${OID} = Put object ${USER_WALLET} ${FILE_S} ${PRIV_CID}
|
|
||||||
@{OBJECTS} = Create List ${OID}
|
|
||||||
${SG} = Put Storagegroup ${USER_WALLET} ${PRIV_CID} ${OBJECTS}
|
|
||||||
|
|
||||||
Run Storage Group Operations And Expect Success
|
|
||||||
... ${USER_WALLET} ${PRIV_CID} ${OBJECTS} ${COMPLEXITY}
|
|
||||||
|
|
||||||
Run Storage Group Operations And Expect Failure
|
|
||||||
... ${OTHER_WALLET} ${PRIV_CID} ${OBJECTS} ${SG}
|
|
||||||
|
|
||||||
# In private container, Inner Ring is allowed to read (Storage Group List and Get),
|
|
||||||
# so using here keyword for read-only container.
|
|
||||||
Run Storage Group Operations On System's Behalf In RO Container
|
|
||||||
... ${PRIV_CID} ${OBJECTS} ${COMPLEXITY}
|
|
|
@ -1,48 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library container.py
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource payment_operations.robot
|
|
||||||
Resource storage_group.robot
|
|
||||||
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
Basic ACL Operations for Public Container
|
|
||||||
[Documentation] Testcase to validate NeoFS operations with ACL for Public Container.
|
|
||||||
[Tags] ACL
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
${WALLET_OTH} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
${PUBLIC_CID} = Create Container ${WALLET} basic_acl=public-read-write
|
|
||||||
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
Check Public Container Simple ${WALLET} ${FILE_S} ${PUBLIC_CID} ${WALLET_OTH}
|
|
||||||
|
|
||||||
${PUBLIC_CID} = Create Container ${WALLET} basic_acl=public-read-write
|
|
||||||
${FILE_S} ${_} = Generate file ${COMPLEX_OBJ_SIZE}
|
|
||||||
Check Public Container Complex ${WALLET} ${FILE_S} ${PUBLIC_CID} ${WALLET_OTH}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Check Public Container
|
|
||||||
[Arguments] ${RUN_TYPE} ${USER_WALLET} ${FILE_S} ${PUBLIC_CID} ${WALLET_OTH}
|
|
||||||
|
|
||||||
${OID} = Put object ${USER_WALLET} ${FILE_S} ${PUBLIC_CID}
|
|
||||||
@{OBJECTS} = Create List ${OID}
|
|
||||||
|
|
||||||
Run Storage Group Operations And Expect Success
|
|
||||||
... ${USER_WALLET} ${PUBLIC_CID} ${OBJECTS} ${RUN_TYPE}
|
|
||||||
|
|
||||||
Run Storage Group Operations And Expect Success
|
|
||||||
... ${WALLET_OTH} ${PUBLIC_CID} ${OBJECTS} ${RUN_TYPE}
|
|
||||||
|
|
||||||
# System isn't allowed to DELETE in Public Container
|
|
||||||
Run Storage Group Operations On System's Behalf In RO Container
|
|
||||||
... ${PUBLIC_CID} ${OBJECTS} ${RUN_TYPE}
|
|
|
@ -1,55 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library container.py
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource payment_operations.robot
|
|
||||||
Resource storage_group.robot
|
|
||||||
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
Basic ACL Operations for Read-Only Container
|
|
||||||
[Documentation] Testcase to validate NeoFS operations with ACL for Read-Only Container.
|
|
||||||
[Tags] ACL
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
Check Read-Only Container Simple
|
|
||||||
Check Read-Only Container Complex
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
|
|
||||||
Check Read-Only Container
|
|
||||||
[Arguments] ${COMPLEXITY}
|
|
||||||
|
|
||||||
${FILE} ${_} = Run Keyword If """${COMPLEXITY}""" == """Simple"""
|
|
||||||
... Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
... ELSE
|
|
||||||
... Generate file ${COMPLEX_OBJ_SIZE}
|
|
||||||
|
|
||||||
${USER_WALLET}
|
|
||||||
... ${_}
|
|
||||||
... ${_} = Prepare Wallet And Deposit
|
|
||||||
${WALLET_OTH}
|
|
||||||
... ${_}
|
|
||||||
... ${_} = Prepare Wallet And Deposit
|
|
||||||
${READONLY_CID} = Create Container ${USER_WALLET} basic_acl=public-read
|
|
||||||
|
|
||||||
${OID} = Put object ${USER_WALLET} ${FILE} ${READONLY_CID}
|
|
||||||
@{OBJECTS} = Create List ${OID}
|
|
||||||
|
|
||||||
${SG_1} = Put Storagegroup ${USER_WALLET} ${READONLY_CID} ${OBJECTS}
|
|
||||||
|
|
||||||
Run Storage Group Operations And Expect Success
|
|
||||||
... ${USER_WALLET} ${READONLY_CID} ${OBJECTS} ${COMPLEXITY}
|
|
||||||
|
|
||||||
Run Storage Group Operations On Other's Behalf in RO Container
|
|
||||||
... ${USER_WALLET} ${READONLY_CID} ${OBJECTS} ${COMPLEXITY}
|
|
||||||
|
|
||||||
Run Storage Group Operations On System's Behalf in RO Container
|
|
||||||
... ${READONLY_CID} ${OBJECTS} ${COMPLEXITY}
|
|
|
@ -1,69 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library Collections
|
|
||||||
Library acl.py
|
|
||||||
Library container.py
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource common_steps_acl_bearer.robot
|
|
||||||
Resource eacl_tables.robot
|
|
||||||
Resource payment_operations.robot
|
|
||||||
Resource storage_group.robot
|
|
||||||
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
BearerToken Operations
|
|
||||||
[Documentation] Testcase to validate NeoFS operations with BearerToken.
|
|
||||||
[Tags] ACL BearerToken
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
Check eACL Deny and Allow All Bearer Simple ${WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
${FILE_S} ${_} = Generate file ${COMPLEX_OBJ_SIZE}
|
|
||||||
Check eACL Deny and Allow All Bearer Complex ${WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Check eACL Deny and Allow All Bearer
|
|
||||||
[Arguments] ${RUN_TYPE} ${WALLET} ${FILE_S}
|
|
||||||
|
|
||||||
${CID} = Create Container ${WALLET} basic_acl=eacl-public-read-write
|
|
||||||
${OID} = Put object ${WALLET} ${FILE_S} ${CID}
|
|
||||||
@{OBJECTS} = Create List ${OID}
|
|
||||||
|
|
||||||
Run Storage Group Operations and Expect Success
|
|
||||||
... ${WALLET} ${CID} ${OBJECTS} ${RUN_TYPE}
|
|
||||||
|
|
||||||
${SG} = Put Storagegroup ${WALLET} ${CID} ${OBJECTS}
|
|
||||||
|
|
||||||
Prepare eACL Role rules ${CID}
|
|
||||||
Set eACL ${WALLET} ${CID} ${EACL_DENY_ALL_USER}
|
|
||||||
|
|
||||||
Run Storage Group Operations and Expect Failure
|
|
||||||
... ${WALLET} ${CID} ${OBJECTS} ${SG}
|
|
||||||
|
|
||||||
${RULE_GET} = Create Dictionary Operation=GET Access=ALLOW Role=USER
|
|
||||||
${RULE_HEAD} = Create Dictionary Operation=HEAD Access=ALLOW Role=USER
|
|
||||||
${RULE_PUT} = Create Dictionary Operation=PUT Access=ALLOW Role=USER
|
|
||||||
${RULE_DELETE} = Create Dictionary Operation=DELETE Access=ALLOW Role=USER
|
|
||||||
${RULE_SEARCH} = Create Dictionary Operation=SEARCH Access=ALLOW Role=USER
|
|
||||||
|
|
||||||
${eACL_gen}= Create List
|
|
||||||
... ${RULE_GET}
|
|
||||||
... ${RULE_HEAD}
|
|
||||||
... ${RULE_PUT}
|
|
||||||
... ${RULE_DELETE}
|
|
||||||
... ${RULE_SEARCH}
|
|
||||||
${EACL_TOKEN} = Form BearerToken File ${WALLET} ${CID} ${eACL_gen}
|
|
||||||
|
|
||||||
Run Storage Group Operations With Bearer Token
|
|
||||||
... ${WALLET} ${CID} ${OBJECTS} ${EACL_TOKEN} ${RUN_TYPE}
|
|
|
@ -1,55 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library Collections
|
|
||||||
Library Process
|
|
||||||
Library String
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource payment_operations.robot
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
${DEPOSIT_AMOUNT} = ${10}
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
CLI Accounting Balance Test
|
|
||||||
[Documentation] neofs-cli accounting balance test
|
|
||||||
[Timeout] 10 min
|
|
||||||
|
|
||||||
|
|
||||||
${WALLET} ${ADDR} ${_} = Prepare Wallet And Deposit ${DEPOSIT_AMOUNT}
|
|
||||||
|
|
||||||
# Getting balance with wallet and address
|
|
||||||
${OUTPUT} = Run Process ${NEOFS_CLI_EXEC} accounting balance -r ${NEOFS_ENDPOINT} --address ${ADDR} --wallet ${WALLET} --config ${WALLET_CONFIG}
|
|
||||||
... shell=True
|
|
||||||
Should Be Equal As Numbers ${OUTPUT.stdout} ${DEPOSIT_AMOUNT}
|
|
||||||
|
|
||||||
# Getting balance with wallet only
|
|
||||||
${OUTPUT} = Run Process ${NEOFS_CLI_EXEC} accounting balance -r ${NEOFS_ENDPOINT} --wallet ${WALLET} --config ${WALLET_CONFIG}
|
|
||||||
... shell=True
|
|
||||||
Should Be Equal As Numbers ${OUTPUT.stdout} ${DEPOSIT_AMOUNT}
|
|
||||||
|
|
||||||
# Getting balance with wallet and wrong address
|
|
||||||
${_} ${ANOTHER_ADDR} ${_} = Generate Wallet
|
|
||||||
${OUTPUT} = Run Process ${NEOFS_CLI_EXEC} accounting balance -r ${NEOFS_ENDPOINT} --address ${ANOTHER_ADDR} --wallet ${WALLET} --config ${WALLET_CONFIG}
|
|
||||||
... shell=True
|
|
||||||
Should Contain ${OUTPUT.stderr} --address option must be specified and valid
|
|
||||||
Should Be Equal As Numbers ${OUTPUT.rc} 1
|
|
||||||
|
|
||||||
# Getting balance with control API
|
|
||||||
${CONFIG_PATH} = Write API Config ${NEOFS_ENDPOINT} ${WALLET}
|
|
||||||
${OUTPUT} = Run Process ${NEOFS_CLI_EXEC} accounting balance --config ${CONFIG_PATH}
|
|
||||||
... shell=True
|
|
||||||
Should Be Equal As Numbers ${OUTPUT.stdout} ${DEPOSIT_AMOUNT}
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Write API Config
|
|
||||||
[Documentation] Write YAML config for requesting NeoFS API via CLI
|
|
||||||
[Arguments] ${ENDPOINT} ${WALLET}
|
|
||||||
|
|
||||||
Set Local Variable ${PATH} ${ASSETS_DIR}/config.yaml
|
|
||||||
Create File ${PATH} rpc-endpoint: ${ENDPOINT}\nwallet: ${WALLET}\npassword: ''
|
|
||||||
|
|
||||||
[Return] ${PATH}
|
|
|
@ -1,94 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library Collections
|
|
||||||
Library Process
|
|
||||||
Library String
|
|
||||||
Library epoch.py
|
|
||||||
|
|
||||||
Resource payment_operations.robot
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
${SN_01_ADDR} = s01.neofs.devenv:8080
|
|
||||||
${SN_02_ADDR} = s02.neofs.devenv:8080
|
|
||||||
${DEPOSIT} = ${30}
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
NetworkInfo RPC Method
|
|
||||||
[Documentation] Testcase to check NetworkInfo RPC method.
|
|
||||||
[Tags] RPC NetworkInfo
|
|
||||||
[Timeout] 10 min
|
|
||||||
|
|
||||||
|
|
||||||
######################################################################
|
|
||||||
# Checking if the command returns equal results for two storage nodes
|
|
||||||
######################################################################
|
|
||||||
${RESULT1_S01} = Run Process ${NEOFS_CLI_EXEC} netmap netinfo -r ${SN_01_ADDR} --wallet ${STORAGE_WALLET_PATH} --config ${WALLET_CONFIG}
|
|
||||||
... shell=True
|
|
||||||
Should Be Equal As Integers ${RESULT1_S01.rc} 0
|
|
||||||
${RESULT1_S02} = Run Process ${NEOFS_CLI_EXEC} netmap netinfo -r ${SN_02_ADDR} --wallet ${STORAGE_WALLET_PATH} --config ${WALLET_CONFIG}
|
|
||||||
... shell=True
|
|
||||||
Should Be Equal As Integers ${RESULT1_S02.rc} 0
|
|
||||||
|
|
||||||
#############################################
|
|
||||||
# Checking if morph magic number is relevant
|
|
||||||
#############################################
|
|
||||||
|
|
||||||
${NETWORK_MAGIC_S01} = Parse Magic ${RESULT1_S01.stdout}
|
|
||||||
Should Be Equal ${NETWORK_MAGIC_S01} ${MORPH_MAGIC}
|
|
||||||
|
|
||||||
${NETWORK_MAGIC_S02} = Parse Magic ${RESULT1_S02.stdout}
|
|
||||||
Should Be Equal ${NETWORK_MAGIC_S02} ${MORPH_MAGIC}
|
|
||||||
|
|
||||||
#######################################################################
|
|
||||||
# Checking if epoch numbers requested from two storage nodes are equal
|
|
||||||
#######################################################################
|
|
||||||
|
|
||||||
${EPOCH1_S01} = Parse Epoch ${RESULT1_S01.stdout}
|
|
||||||
${EPOCH1_S02} = Parse Epoch ${RESULT1_S02.stdout}
|
|
||||||
Should Be Equal As Integers ${EPOCH1_S01} ${EPOCH1_S02}
|
|
||||||
|
|
||||||
########################################
|
|
||||||
# Ticking epoch and getting new netinfo
|
|
||||||
########################################
|
|
||||||
|
|
||||||
Tick Epoch
|
|
||||||
|
|
||||||
${RESULT2_S01} = Run Process ${NEOFS_CLI_EXEC} netmap netinfo -r ${SN_01_ADDR} --wallet ${STORAGE_WALLET_PATH} --config ${WALLET_CONFIG}
|
|
||||||
... shell=True
|
|
||||||
Should Be Equal As Integers ${RESULT2_S01.rc} 0
|
|
||||||
${RESULT2_S02} = Run Process ${NEOFS_CLI_EXEC} netmap netinfo -r ${SN_02_ADDR} --wallet ${STORAGE_WALLET_PATH} --config ${WALLET_CONFIG}
|
|
||||||
... shell=True
|
|
||||||
Should Be Equal As Integers ${RESULT2_S02.rc} 0
|
|
||||||
|
|
||||||
Should Be Equal As Strings ${RESULT2_S01.stdout} ${RESULT2_S02.stdout}
|
|
||||||
|
|
||||||
${EPOCH2_S01} = Parse Epoch ${RESULT2_S01.stdout}
|
|
||||||
|
|
||||||
#################################################################
|
|
||||||
# Checking if the second epoch value is more than the first by 1
|
|
||||||
#################################################################
|
|
||||||
|
|
||||||
${NEW_EPOCH} = Evaluate ${EPOCH1_S01}+${1}
|
|
||||||
Should Be Equal ${EPOCH2_S01} ${NEW_EPOCH}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Parse Magic
|
|
||||||
[Arguments] ${RESULT_STDOUT}
|
|
||||||
@{MAGIC} = Split String ${RESULT_STDOUT} ${\n}
|
|
||||||
${NETWORK_MAGIC} = Get From List ${MAGIC} ${1}
|
|
||||||
@{MAGIC_INFO} = Split String ${NETWORK_MAGIC} ${SPACE}
|
|
||||||
${MAGIC_VALUE} = Get From List ${MAGIC_INFO} ${4}
|
|
||||||
[Return] ${MAGIC_VALUE}
|
|
||||||
|
|
||||||
Parse Epoch
|
|
||||||
[Arguments] ${RESULT_STDOUT}
|
|
||||||
@{EPOCH} = Split String ${RESULT_STDOUT} ${\n}
|
|
||||||
${NETWORK_EPOCH} = Get From List ${EPOCH} ${0}
|
|
||||||
@{EPOCH_INFO} = Split String ${NETWORK_EPOCH} ${SPACE}
|
|
||||||
${EPOCH_VALUE} = Get From List ${EPOCH_INFO} ${1}
|
|
||||||
${EPOCH_VALUE_INT} = Convert To Integer ${EPOCH_VALUE}
|
|
||||||
[Return] ${EPOCH_VALUE_INT}
|
|
|
@ -1,58 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library container.py
|
|
||||||
Library String
|
|
||||||
Library Collections
|
|
||||||
|
|
||||||
Resource payment_operations.robot
|
|
||||||
Resource common_steps_acl_bearer.robot
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
&{ATTR_TIME} = Timestamp=new
|
|
||||||
&{ATTR_NONE} = NoAttribute=
|
|
||||||
&{ATTR_SINGLE} = AttrNum=one
|
|
||||||
${ERROR_MSG} = invalid container attribute
|
|
||||||
|
|
||||||
*** Test Cases ***
|
|
||||||
Duplicated Container Attributes
|
|
||||||
[Documentation] Testcase to check duplicated container attributes.
|
|
||||||
[Tags] Container
|
|
||||||
[Timeout] 5 min
|
|
||||||
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
######################################################
|
|
||||||
# Checking that container attributes cannot duplicate
|
|
||||||
######################################################
|
|
||||||
|
|
||||||
# TODO: unstable case, the behaviour needs to be defined
|
|
||||||
# https://github.com/nspcc-dev/neofs-node/issues/1339
|
|
||||||
#Run Keyword And Expect Error *
|
|
||||||
#... Create container ${WALLET} attributes=${ATTR_TIME}
|
|
||||||
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Create Container ${WALLET} options=--attributes Size=small, Size=big
|
|
||||||
Should Contain ${ERR} ${ERROR_MSG}
|
|
||||||
|
|
||||||
######################################################
|
|
||||||
# Checking that container cannot have empty attribute
|
|
||||||
######################################################
|
|
||||||
|
|
||||||
# TODO: the same unstable case, referenced in the above issue
|
|
||||||
#${ERR} = Run Keyword And Expect Error *
|
|
||||||
# ... Create Container ${WALLET} attributes=${ATTR_NONE}
|
|
||||||
# Should Contain ${ERR} ${ERROR_MSG}
|
|
||||||
|
|
||||||
#####################################################
|
|
||||||
# Checking a successful step with a single attribute
|
|
||||||
#####################################################
|
|
||||||
|
|
||||||
${CID} = Create Container ${WALLET} attributes=${ATTR_SINGLE}
|
|
||||||
&{ATTRIBUTES} = Get Container ${WALLET} ${CID}
|
|
||||||
Dictionary Should Contain Sub Dictionary
|
|
||||||
... ${ATTRIBUTES}[attributes]
|
|
||||||
... ${ATTR_SINGLE}
|
|
||||||
... msg="No expected container attributes found"
|
|
||||||
|
|
|
@ -1,55 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library container.py
|
|
||||||
Library Collections
|
|
||||||
|
|
||||||
Resource payment_operations.robot
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
# The timeout during which the container should be deleted. The deletion after
|
|
||||||
# this time isn't guaranteed, but is expected as we run the test in an
|
|
||||||
# isolated environment.
|
|
||||||
${DELETE_TIMEOUT} = 30s
|
|
||||||
|
|
||||||
|
|
||||||
*** Test Cases ***
|
|
||||||
Delete Containers
|
|
||||||
[Documentation] Testcase to check if containers can be deleted by its owner only.
|
|
||||||
[Tags] Container
|
|
||||||
[Timeout] 3 min
|
|
||||||
|
|
||||||
|
|
||||||
${WALLET}
|
|
||||||
... ${_}
|
|
||||||
... ${_} = Prepare Wallet And Deposit
|
|
||||||
${ANOTHER_WALLET}
|
|
||||||
... ${_}
|
|
||||||
... ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
${CID} = Create container ${WALLET}
|
|
||||||
|
|
||||||
################################################################
|
|
||||||
# No explicit error is expected upon container deletion attempt
|
|
||||||
################################################################
|
|
||||||
Delete Container ${ANOTHER_WALLET} ${CID}
|
|
||||||
Sleep ${DELETE_TIMEOUT}
|
|
||||||
@{CONTAINERS} = List Containers ${WALLET}
|
|
||||||
List Should Contain Value
|
|
||||||
... ${CONTAINERS}
|
|
||||||
... ${CID}
|
|
||||||
... msg="A key which doesn't owe the container is able to delete ${CID}"
|
|
||||||
|
|
||||||
Delete Container ${WALLET} ${CID}
|
|
||||||
Sleep ${DELETE_TIMEOUT}
|
|
||||||
@{CONTAINERS} = List Containers ${WALLET}
|
|
||||||
List Should Not Contain Value
|
|
||||||
... ${CONTAINERS}
|
|
||||||
... ${CID}
|
|
||||||
... msg="${CID} is still in container list"
|
|
||||||
|
|
||||||
###################################################################################
|
|
||||||
# If one tries to delete an already deleted container, they should expect success.
|
|
||||||
###################################################################################
|
|
||||||
Delete Container ${WALLET} ${CID}
|
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Resource payment_operations.robot
|
|
||||||
|
|
||||||
Library container.py
|
|
||||||
Library session_token.py
|
|
||||||
|
|
||||||
*** Test Cases ***
|
|
||||||
|
|
||||||
Session Token for Container
|
|
||||||
[Documentation] Testcase to check container session token
|
|
||||||
[Tags] Container SessionToken
|
|
||||||
[Timeout] 5 min
|
|
||||||
|
|
||||||
|
|
||||||
${OWNER_WALLET} ${OWNER} ${_} = Prepare Wallet And Deposit
|
|
||||||
${SESSION_WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
${SESSION_TOKEN} = Generate Session Token ${OWNER} ${SESSION_WALLET}
|
|
||||||
${SIGNED_FILE} = Sign Session token ${SESSION_TOKEN} ${OWNER_WALLET}
|
|
||||||
|
|
||||||
${CID} = Create Container ${OWNER_WALLET}
|
|
||||||
... session_token=${SIGNED_FILE} session_wallet=${SESSION_WALLET}
|
|
||||||
|
|
||||||
########################
|
|
||||||
# Check container owner
|
|
||||||
########################
|
|
||||||
|
|
||||||
&{ATTRS} = Get Container ${SESSION_WALLET} ${CID}
|
|
||||||
Should Be Equal As Strings ${OWNER} ${ATTRS}[ownerID]
|
|
||||||
|
|
|
@ -1,50 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library Process
|
|
||||||
Library epoch.py
|
|
||||||
Library node_management.py
|
|
||||||
Library String
|
|
||||||
Library acl.py
|
|
||||||
|
|
||||||
Resource payment_operations.robot
|
|
||||||
|
|
||||||
*** Test Cases ***
|
|
||||||
Control Operations with storage nodes
|
|
||||||
[Documentation] Testcase to check NetworkInfo control command.
|
|
||||||
[Timeout] 5 min
|
|
||||||
|
|
||||||
|
|
||||||
${NODE_NUM} ${NODE} ${STORAGE_WALLET} = Get control endpoint and wallet
|
|
||||||
${empty_list} = Create List
|
|
||||||
|
|
||||||
${SNAPSHOT} = Run Process ${NEOFS_CLI_EXEC} control netmap-snapshot --endpoint ${NODE} --wallet ${STORAGE_WALLET} --config ${WALLET_CONFIG} shell=True
|
|
||||||
${HEALTHCHECK} = Run Process ${NEOFS_CLI_EXEC} control healthcheck --endpoint ${NODE} --wallet ${STORAGE_WALLET} --config ${WALLET_CONFIG} shell=True
|
|
||||||
Should Be Equal As Integers ${HEALTHCHECK.rc} 0
|
|
||||||
|
|
||||||
Run Process ${NEOFS_CLI_EXEC} control set-status --endpoint ${NODE} --wallet ${STORAGE_WALLET} --config ${WALLET_CONFIG} --status 'offline' shell=True
|
|
||||||
|
|
||||||
Sleep ${MAINNET_BLOCK_TIME}
|
|
||||||
Tick Epoch
|
|
||||||
|
|
||||||
${SNAPSHOT_OFFLINE}= Run Process ${NEOFS_CLI_EXEC} control netmap-snapshot --endpoint ${NODE} --wallet ${STORAGE_WALLET} --config ${WALLET_CONFIG} shell=True
|
|
||||||
${NODE_NUM_OFFLINE}= Get Regexp Matches ${SNAPSHOT_OFFLINE.stdout} ${NODE_NUM}
|
|
||||||
Should Be Equal ${NODE_NUM_OFFLINE} ${empty_list}
|
|
||||||
|
|
||||||
${HEALTHCHECK_OFFLINE} = Run Process ${NEOFS_CLI_EXEC} control healthcheck --endpoint ${NODE} --wallet ${STORAGE_WALLET} --config ${WALLET_CONFIG} shell=True
|
|
||||||
Should Be Equal As Integers ${HEALTHCHECK_OFFLINE.rc} 0
|
|
||||||
Should Not Be Equal ${HEALTHCHECK.stdout} ${HEALTHCHECK_OFFLINE.stdout}
|
|
||||||
|
|
||||||
Run Process ${NEOFS_CLI_EXEC} control set-status --endpoint ${NODE} --wallet ${STORAGE_WALLET} --config ${WALLET_CONFIG} --status 'online' shell=True
|
|
||||||
|
|
||||||
Sleep ${MAINNET_BLOCK_TIME}
|
|
||||||
Tick Epoch
|
|
||||||
|
|
||||||
${SNAPSHOT_ONLINE} = Run Process ${NEOFS_CLI_EXEC} control netmap-snapshot --endpoint ${NODE} --wallet ${STORAGE_WALLET} --config ${WALLET_CONFIG} shell=True
|
|
||||||
${NODE_NUM_ONLINE} = Get Regexp Matches ${SNAPSHOT_ONLINE.stdout} ${NODE_NUM}
|
|
||||||
Should Be Equal ${NODE_NUM_ONLINE}[0] ${NODE_NUM}
|
|
||||||
|
|
||||||
${HEALTHCHECK_ONLINE} = Run Process ${NEOFS_CLI_EXEC} control healthcheck --endpoint ${NODE} --wallet ${STORAGE_WALLET} --config ${WALLET_CONFIG} shell=True
|
|
||||||
Should Be Equal As Integers ${HEALTHCHECK_ONLINE.rc} 0
|
|
||||||
Should Be Equal ${HEALTHCHECK.stdout} ${HEALTHCHECK_ONLINE.stdout}
|
|
||||||
|
|
|
@ -1,76 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
Variables wellknown_acl.py
|
|
||||||
|
|
||||||
Library container.py
|
|
||||||
Library node_management.py
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource payment_operations.robot
|
|
||||||
Resource storage.robot
|
|
||||||
Resource complex_object_operations.robot
|
|
||||||
|
|
||||||
*** Test Cases ***
|
|
||||||
Drop command in control group
|
|
||||||
[Documentation] Testcase to check drop-objects command from control group.
|
|
||||||
[Timeout] 10 min
|
|
||||||
|
|
||||||
|
|
||||||
${_} ${NODE} ${STORAGE_WALLET}= Get control endpoint and wallet
|
|
||||||
${LOCODE} = Get Locode
|
|
||||||
|
|
||||||
${FILE_SIMPLE} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
${FILE_COMPLEX} ${_} = Generate file ${COMPLEX_OBJ_SIZE}
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
${PRIV_CID} = Create Container ${WALLET}
|
|
||||||
... rule=REP 1 CBF 1 SELECT 1 FROM * FILTER 'UN-LOCODE' EQ '${LOCODE}' AS LOC
|
|
||||||
|
|
||||||
#########################
|
|
||||||
# Dropping simple object
|
|
||||||
#########################
|
|
||||||
|
|
||||||
${S_OID} = Put object ${WALLET} ${FILE_SIMPLE} ${PRIV_CID}
|
|
||||||
Get object ${WALLET} ${PRIV_CID} ${S_OID} ${EMPTY} s_file_read
|
|
||||||
Head object ${WALLET} ${PRIV_CID} ${S_OID}
|
|
||||||
|
|
||||||
Drop object ${NODE} ${STORAGE_WALLET} ${PRIV_CID} ${S_OID}
|
|
||||||
|
|
||||||
Wait Until Keyword Succeeds 3x ${SHARD_0_GC_SLEEP}
|
|
||||||
... Run Keyword And Expect Error Error:*
|
|
||||||
... Get object ${WALLET} ${PRIV_CID} ${S_OID} ${EMPTY} s_file_read options=--ttl 1
|
|
||||||
Wait Until Keyword Succeeds 3x ${SHARD_0_GC_SLEEP}
|
|
||||||
... Run Keyword And Expect Error Error:*
|
|
||||||
... Head object ${WALLET} ${PRIV_CID} ${S_OID} options=--ttl 1
|
|
||||||
|
|
||||||
Drop object ${NODE} ${STORAGE_WALLET} ${PRIV_CID} ${S_OID}
|
|
||||||
|
|
||||||
##########################
|
|
||||||
# Dropping complex object
|
|
||||||
##########################
|
|
||||||
|
|
||||||
${C_OID} = Put object ${WALLET} ${FILE_COMPLEX} ${PRIV_CID}
|
|
||||||
Get object ${WALLET} ${PRIV_CID} ${C_OID} ${EMPTY} s_file_read
|
|
||||||
Head object ${WALLET} ${PRIV_CID} ${C_OID}
|
|
||||||
|
|
||||||
Drop object ${NODE} ${STORAGE_WALLET} ${PRIV_CID} ${C_OID}
|
|
||||||
|
|
||||||
Get object ${WALLET} ${PRIV_CID} ${C_OID} ${EMPTY} s_file_read
|
|
||||||
Head object ${WALLET} ${PRIV_CID} ${C_OID}
|
|
||||||
|
|
||||||
@{SPLIT_OIDS} = Get Object Parts By Link Object ${WALLET} ${PRIV_CID} ${C_OID}
|
|
||||||
FOR ${CHILD_OID} IN @{SPLIT_OIDS}
|
|
||||||
Drop object ${NODE} ${STORAGE_WALLET} ${PRIV_CID} ${CHILD_OID}
|
|
||||||
|
|
||||||
END
|
|
||||||
|
|
||||||
Wait Until Keyword Succeeds 3x ${SHARD_0_GC_SLEEP}
|
|
||||||
... Run Keyword And Expect Error Error:*
|
|
||||||
... Get object ${WALLET} ${PRIV_CID} ${C_OID} ${EMPTY} s_file_read options=--ttl 1
|
|
||||||
Wait Until Keyword Succeeds 3x ${SHARD_0_GC_SLEEP}
|
|
||||||
... Run Keyword And Expect Error Error:*
|
|
||||||
... Head object ${WALLET} ${PRIV_CID} ${C_OID} options=--ttl 1
|
|
||||||
|
|
||||||
|
|
|
@ -1,91 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Library container.py
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library storage_policy.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Library Collections
|
|
||||||
|
|
||||||
Resource payment_operations.robot
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
NeoFS Simple Netmap
|
|
||||||
[Documentation] Testcase to validate NeoFS Netmap.
|
|
||||||
[Tags] Netmap
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
Validate Object Copies ${WALLET} REP 2 IN X CBF 2 SELECT 2 FROM * AS X 2
|
|
||||||
|
|
||||||
Validate Object Copies ${WALLET} REP 2 IN X CBF 1 SELECT 2 FROM * AS X 2
|
|
||||||
|
|
||||||
Validate Object Copies ${WALLET} REP 3 IN X CBF 1 SELECT 3 FROM * AS X 3
|
|
||||||
|
|
||||||
Validate Object Copies ${WALLET} REP 1 IN X CBF 1 SELECT 1 FROM * AS X 1
|
|
||||||
|
|
||||||
Validate Object Copies ${WALLET} REP 1 IN X CBF 2 SELECT 1 FROM * AS X 1
|
|
||||||
|
|
||||||
Validate Object Copies ${WALLET} REP 4 IN X CBF 1 SELECT 4 FROM * AS X 4
|
|
||||||
|
|
||||||
Validate Object Copies ${WALLET} REP 2 IN X CBF 1 SELECT 4 FROM * AS X 2
|
|
||||||
|
|
||||||
@{EXPECTED} = Create List s01.neofs.devenv:8080 s02.neofs.devenv:8080 s03.neofs.devenv:8080 s04.neofs.devenv:8080
|
|
||||||
Validate Selected Nodes ${WALLET} REP 4 IN X CBF 1 SELECT 4 FROM * AS X 4 @{EXPECTED}
|
|
||||||
|
|
||||||
@{EXPECTED} = Create List s03.neofs.devenv:8080
|
|
||||||
Validate Selected Nodes ${WALLET} REP 1 IN LOC_PLACE CBF 1 SELECT 1 FROM LOC_SW AS LOC_PLACE FILTER Country EQ Sweden AS LOC_SW
|
|
||||||
... 1 @{EXPECTED}
|
|
||||||
|
|
||||||
@{EXPECTED} = Create List s02.neofs.devenv:8080
|
|
||||||
Validate Selected Nodes ${WALLET} REP 1 CBF 1 SELECT 1 FROM LOC_SPB FILTER 'UN-LOCODE' EQ 'RU LED' AS LOC_SPB 1 @{EXPECTED}
|
|
||||||
|
|
||||||
@{EXPECTED} = Create List s01.neofs.devenv:8080 s02.neofs.devenv:8080
|
|
||||||
Validate Selected Nodes ${WALLET}
|
|
||||||
... REP 1 IN LOC_SPB_PLACE REP 1 IN LOC_MSK_PLACE CBF 1 SELECT 1 FROM LOC_SPB AS LOC_SPB_PLACE SELECT 1 FROM LOC_MSK AS LOC_MSK_PLACE FILTER 'UN-LOCODE' EQ 'RU LED' AS LOC_SPB FILTER 'UN-LOCODE' EQ 'RU MOW' AS LOC_MSK
|
|
||||||
... 2 @{EXPECTED}
|
|
||||||
|
|
||||||
@{EXPECTED} = Create List s01.neofs.devenv:8080 s02.neofs.devenv:8080 s03.neofs.devenv:8080 s04.neofs.devenv:8080
|
|
||||||
Validate Selected Nodes ${WALLET} REP 4 CBF 1 SELECT 4 FROM LOC_EU FILTER Continent EQ Europe AS LOC_EU 4 @{EXPECTED}
|
|
||||||
|
|
||||||
@{EXPECTED} = Create List s02.neofs.devenv:8080
|
|
||||||
Validate Selected Nodes ${WALLET}
|
|
||||||
... REP 1 CBF 1 SELECT 1 FROM LOC_SPB FILTER 'UN-LOCODE' NE 'RU MOW' AND 'UN-LOCODE' NE 'SE STO' AND 'UN-LOCODE' NE 'FI HEL' AS LOC_SPB
|
|
||||||
... 1 @{EXPECTED}
|
|
||||||
|
|
||||||
@{EXPECTED} = Create List s01.neofs.devenv:8080 s02.neofs.devenv:8080
|
|
||||||
Validate Selected Nodes ${WALLET} REP 2 CBF 1 SELECT 2 FROM LOC_RU FILTER SubDivCode NE 'AB' AND SubDivCode NE '18' AS LOC_RU 2 @{EXPECTED}
|
|
||||||
|
|
||||||
@{EXPECTED} = Create List s01.neofs.devenv:8080 s02.neofs.devenv:8080
|
|
||||||
Validate Selected Nodes ${WALLET} REP 2 CBF 1 SELECT 2 FROM LOC_RU FILTER Country EQ 'Russia' AS LOC_RU 2 @{EXPECTED}
|
|
||||||
|
|
||||||
@{EXPECTED} = Create List s03.neofs.devenv:8080 s04.neofs.devenv:8080
|
|
||||||
Validate Selected Nodes ${WALLET} REP 2 CBF 1 SELECT 2 FROM LOC_EU FILTER Country NE 'Russia' AS LOC_EU 2 @{EXPECTED}
|
|
||||||
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Validate Selected Nodes ${WALLET} REP 2 IN X CBF 2 SELECT 6 FROM * AS X 2
|
|
||||||
Should Contain ${ERR} code = 1024 message = netmap: not enough nodes to SELECT from
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Validate Object Copies
|
|
||||||
[Arguments] ${WALLET} ${POLICY} ${EXPECTED_COPIES}
|
|
||||||
|
|
||||||
${FILE}
|
|
||||||
... ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
${CID} = Create container ${WALLET} rule=${POLICY}
|
|
||||||
${OID} = Put object ${WALLET} ${FILE} ${CID}
|
|
||||||
${COPIES} = Get Simple Object Copies ${WALLET} ${CID} ${OID}
|
|
||||||
Should Be Equal As Numbers ${EXPECTED_COPIES} ${COPIES}
|
|
||||||
[Return] ${CID} ${OID}
|
|
||||||
|
|
||||||
|
|
||||||
Validate Selected Nodes
|
|
||||||
[Arguments] ${WALLET} ${POLICY} ${EXPECTED_COPIES} @{EXPECTED_NODES}
|
|
||||||
|
|
||||||
${CID}
|
|
||||||
... ${OID} = Validate Object Copies ${WALLET} ${POLICY} ${EXPECTED_COPIES}
|
|
||||||
${NODES} = Get Nodes With Object ${WALLET} ${CID} ${OID}
|
|
||||||
Lists Should Be Equal ${EXPECTED_NODES} ${NODES}
|
|
|
@ -1,77 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
Variables wellknown_acl.py
|
|
||||||
|
|
||||||
Library container.py
|
|
||||||
Library epoch.py
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library node_management.py
|
|
||||||
Library storage_policy.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Library Collections
|
|
||||||
|
|
||||||
Resource payment_operations.robot
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
${EXPECTED_COPIES} = ${2}
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
NeoFS Object Replication
|
|
||||||
[Documentation] Testcase to validate NeoFS object replication.
|
|
||||||
[Tags] Migration Replication
|
|
||||||
[Timeout] 25 min
|
|
||||||
|
|
||||||
|
|
||||||
Log Check replication mechanism
|
|
||||||
Check Replication
|
|
||||||
Log Check Sticky Bit with SYSTEM Group via replication mechanism
|
|
||||||
Check Replication ${STICKYBIT_PUB_ACL}
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
Check Replication
|
|
||||||
[Arguments] ${ACL}=${EMPTY}
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
${CID} = Create Container ${WALLET} basic_acl=${ACL}
|
|
||||||
|
|
||||||
${FILE} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
|
|
||||||
${S_OID} = Put Object ${WALLET} ${FILE} ${CID}
|
|
||||||
|
|
||||||
${COPIES} = Get Object Copies Simple ${WALLET} ${CID} ${S_OID}
|
|
||||||
Should Be Equal ${EXPECTED_COPIES} ${COPIES}
|
|
||||||
|
|
||||||
@{NODES_OBJ} = Get Nodes With Object ${WALLET} ${CID} ${S_OID}
|
|
||||||
|
|
||||||
@{NODES_OBJ_STOPPED} = Stop Nodes 1 ${NODES_OBJ}
|
|
||||||
@{NETMAP} = Convert To List ${NEOFS_NETMAP}
|
|
||||||
Remove Values From List ${NETMAP} ${NODES_OBJ_STOPPED}
|
|
||||||
|
|
||||||
# We expect that during two epochs the missed copy will be replicated.
|
|
||||||
FOR ${i} IN RANGE 2
|
|
||||||
${COPIES} = Get Object Copies Simple ${WALLET} ${CID} ${S_OID}
|
|
||||||
${PASSED} = Run Keyword And Return Status
|
|
||||||
... Should Be Equal ${EXPECTED_COPIES} ${COPIES}
|
|
||||||
Exit For Loop If ${PASSED}
|
|
||||||
Tick Epoch
|
|
||||||
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
||||||
END
|
|
||||||
Run Keyword Unless ${PASSED} Fail
|
|
||||||
... Storage policy for object ${S_OID} in container ${CID} isn't valid
|
|
||||||
|
|
||||||
Start Nodes ${NODES_OBJ_STOPPED}
|
|
||||||
Tick Epoch
|
|
||||||
|
|
||||||
# We have 2 or 3 copies. Expected behaviour: during two epochs potential 3rd copy should be removed.
|
|
||||||
FOR ${i} IN RANGE 2
|
|
||||||
${COPIES} = Get Object Copies Simple ${WALLET} ${CID} ${S_OID}
|
|
||||||
${PASSED} = Run Keyword And Return Status
|
|
||||||
... Should Be Equal ${EXPECTED_COPIES} ${COPIES}
|
|
||||||
Exit For Loop If ${PASSED}
|
|
||||||
Tick Epoch
|
|
||||||
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
||||||
END
|
|
||||||
Run Keyword Unless ${PASSED} Fail
|
|
||||||
... Storage policy for object ${S_OID} in container ${CID} isn't valid
|
|
|
@ -1,75 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
Variables wellknown_acl.py
|
|
||||||
|
|
||||||
Library container.py
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
Library Collections
|
|
||||||
|
|
||||||
Resource payment_operations.robot
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
&{ATTR_FILENAME} = FileName=new
|
|
||||||
${ATTR_DUPLICATE} = FileType=jpg,FileType=png
|
|
||||||
&{ATTR_NONE} = NoAttribute=''
|
|
||||||
&{ATTR_SINGLE} = AttrNum=one
|
|
||||||
|
|
||||||
*** Test Cases ***
|
|
||||||
|
|
||||||
Object Attrubutes
|
|
||||||
[Timeout] 10 min
|
|
||||||
|
|
||||||
Check Various Object Attributes Simple
|
|
||||||
Check Various Object Attributes Complex
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Check Various Object Attributes
|
|
||||||
[Arguments] ${COMPLEXITY}
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
|
|
||||||
${PUBLIC_CID} = Create Container ${WALLET} basic_acl=${PUBLIC_ACL_F}
|
|
||||||
${OBJ_SIZE} = Run Keyword If """${COMPLEXITY}""" == """Simple"""
|
|
||||||
... Set Variable ${SIMPLE_OBJ_SIZE}
|
|
||||||
... ELSE
|
|
||||||
... Set Variable ${COMPLEX_OBJ_SIZE}
|
|
||||||
${FILE} ${_} = Generate File ${OBJ_SIZE}
|
|
||||||
|
|
||||||
###################################################
|
|
||||||
# Checking that object attributes cannot duplicate
|
|
||||||
###################################################
|
|
||||||
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Put object ${WALLET} ${FILE} ${PUBLIC_CID} user_headers=${ATTR_FILENAME}
|
|
||||||
Should Contain ${ERR} code = 1024 message = duplication of attributes detected
|
|
||||||
# Robot doesn't allow to create a dictionary with the same keys,
|
|
||||||
# so using plain text option here
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Put object ${WALLET} ${FILE} ${PUBLIC_CID} options=--attributes ${ATTR_DUPLICATE}
|
|
||||||
Should Contain ${ERR} code = 1024 message = duplication of attributes detected
|
|
||||||
|
|
||||||
##################################################
|
|
||||||
# Checking that object cannot have empty attibute
|
|
||||||
##################################################
|
|
||||||
|
|
||||||
${ERR} = Run Keyword And Expect Error *
|
|
||||||
... Put object ${WALLET} ${FILE} ${PUBLIC_CID} user_headers=${ATTR_NONE}
|
|
||||||
Should Contain ${ERR} code = 1024 message = empty attribute value
|
|
||||||
|
|
||||||
#####################################################
|
|
||||||
# Checking a successful step with a single attribute
|
|
||||||
#####################################################
|
|
||||||
|
|
||||||
${OID} = Put object ${WALLET} ${FILE} ${PUBLIC_CID} user_headers=${ATTR_SINGLE}
|
|
||||||
${HEADER} = Head object ${WALLET} ${PUBLIC_CID} ${OID}
|
|
||||||
Dictionary Should Contain Sub Dictionary
|
|
||||||
... ${HEADER}[header][attributes]
|
|
||||||
... ${ATTR_SINGLE}
|
|
||||||
... msg="No expected User Attribute in HEAD response"
|
|
||||||
${FOUND_OIDS} = Search Object ${WALLET} ${PUBLIC_CID} filters=${ATTR_SINGLE}
|
|
||||||
Should Be Equal ${OID} ${FOUND_OIDS}[0]
|
|
||||||
... msg="Cannot SEARCH an object by User Attribute"
|
|
|
@ -1,118 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
|
|
||||||
Library container.py
|
|
||||||
Library complex_object_actions.py
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library storage_policy.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Library Collections
|
|
||||||
|
|
||||||
Resource verbs.robot
|
|
||||||
Resource payment_operations.robot
|
|
||||||
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
NeoFS Complex Object Operations
|
|
||||||
[Documentation] Testcase to validate NeoFS operations with complex object.
|
|
||||||
[Tags] Object
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
${CID} = Create container ${WALLET}
|
|
||||||
|
|
||||||
${OID} =
|
|
||||||
... Run All Verbs Except Delete And Expect Success
|
|
||||||
... ${WALLET} ${CID} Complex
|
|
||||||
|
|
||||||
${COPIES} = Get Complex Object Copies ${WALLET} ${CID} ${OID}
|
|
||||||
Should Be Equal As Numbers 2 ${COPIES}
|
|
||||||
|
|
||||||
${PAYLOAD_LENGTH}
|
|
||||||
... ${SPLIT_ID}
|
|
||||||
... ${SPLIT_OBJECTS} =
|
|
||||||
... Restore Large Object By Last ${WALLET} ${CID} ${OID}
|
|
||||||
Compare With Link Object ${WALLET} ${CID} ${OID} ${SPLIT_ID} ${SPLIT_OBJECTS}
|
|
||||||
&{RESPONSE} = Head object ${WALLET} ${CID} ${OID}
|
|
||||||
Should Be Equal As Numbers ${RESPONSE.header.payloadLength} ${PAYLOAD_LENGTH}
|
|
||||||
|
|
||||||
Delete Object And Validate Tombstone
|
|
||||||
... ${WALLET} ${CID} ${OID}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
|
||||||
|
|
||||||
Restore Large Object By Last
|
|
||||||
[Documentation] In this keyword we assemble Large Object from its parts. First, we search for the
|
|
||||||
... Last Object; then, we try to restore the Large Object using Split Chain. We check
|
|
||||||
... that all Object Parts have identical SplitID, accumulate total payload length and
|
|
||||||
... compile a list of Object Parts. For the first part of split we also check if is
|
|
||||||
... has the only `splitID` field in the split header.
|
|
||||||
... The keyword returns total payload length, SplitID and list of Part Objects for
|
|
||||||
... these data might be verified by other keywords.
|
|
||||||
|
|
||||||
[Arguments] ${WALLET} ${CID} ${LARGE_OID}
|
|
||||||
|
|
||||||
${LAST_OID} = Get Last Object ${WALLET} ${CID} ${LARGE_OID}
|
|
||||||
&{LAST_OBJ_HEADER} = Head Object ${WALLET} ${CID} ${LAST_OID} is_raw=True
|
|
||||||
Should Be Equal ${LARGE_OID} ${LAST_OBJ_HEADER.header.split.parent}
|
|
||||||
|
|
||||||
${SPLIT_ID} = Set Variable ${LAST_OBJ_HEADER.header.split.splitID}
|
|
||||||
${PART_OID} = Set Variable ${LAST_OBJ_HEADER.objectID}
|
|
||||||
${PAYLOAD_LENGTH} = Set Variable 0
|
|
||||||
@{PART_OBJECTS} = Create List
|
|
||||||
|
|
||||||
FOR ${i} IN RANGE 1000
|
|
||||||
&{SPLIT_HEADER} = Head object ${WALLET} ${CID} ${PART_OID} is_raw=True
|
|
||||||
|
|
||||||
${PAYLOAD_LENGTH} = Evaluate ${PAYLOAD_LENGTH} + ${SPLIT_HEADER.header.payloadLength}
|
|
||||||
|
|
||||||
# Every Object of the given split contains the same SplitID
|
|
||||||
Should Be Equal ${SPLIT_HEADER.header.split.splitID} ${SPLIT_ID}
|
|
||||||
Should Be Equal ${SPLIT_HEADER.header.objectType} REGULAR
|
|
||||||
|
|
||||||
Append To List ${PART_OBJECTS} ${PART_OID}
|
|
||||||
|
|
||||||
# If we have reached the First Object, it has no `previous` field.
|
|
||||||
# Asserting this condition and exiting the loop.
|
|
||||||
${PASSED} = Run Keyword And Return Status
|
|
||||||
... Should Be Equal
|
|
||||||
... ${SPLIT_HEADER.header.split.previous} ${None}
|
|
||||||
|
|
||||||
Exit For Loop If ${PASSED}
|
|
||||||
${PART_OID} = Set Variable ${SPLIT_HEADER.header.split.previous}
|
|
||||||
END
|
|
||||||
|
|
||||||
[Return] ${PAYLOAD_LENGTH} ${SPLIT_ID} ${PART_OBJECTS}
|
|
||||||
|
|
||||||
|
|
||||||
Compare With Link Object
|
|
||||||
[Documentation] The keyword accepts Large Object SplitID and its Part Objects as
|
|
||||||
... a parameters. Then it requests the Link Object and verifies that
|
|
||||||
... a Split Chain which it stores is equal to the Part Objects list.
|
|
||||||
... In this way we check that Part Objects list restored from Last
|
|
||||||
... Object and the Split Chain from Link Object are equal and the
|
|
||||||
... system is able to restore the Large Object using any of these ways.
|
|
||||||
|
|
||||||
[Arguments] ${WALLET} ${CID} ${LARGE_OID} ${SPLIT_ID} ${SPLIT_OBJECTS}
|
|
||||||
|
|
||||||
${LINK_OID} = Get Link Object ${WALLET} ${CID} ${LARGE_OID}
|
|
||||||
&{LINK_HEADER} = Head Object ${WALLET} ${CID} ${LINK_OID} is_raw=True
|
|
||||||
|
|
||||||
Reverse List ${SPLIT_OBJECTS}
|
|
||||||
Lists Should Be Equal
|
|
||||||
... ${LINK_HEADER.header.split.children}
|
|
||||||
... ${SPLIT_OBJECTS}
|
|
||||||
|
|
||||||
Should Be Equal As Numbers
|
|
||||||
... ${LINK_HEADER.header.payloadLength} 0
|
|
||||||
|
|
||||||
Should Be Equal
|
|
||||||
... ${LINK_HEADER.header.objectType} REGULAR
|
|
||||||
|
|
||||||
Should Be Equal
|
|
||||||
... ${LINK_HEADER.header.split.splitID} ${SPLIT_ID}
|
|
|
@ -1,65 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library container.py
|
|
||||||
Library epoch.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource payment_operations.robot
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
${CLEANUP_TIMEOUT} = 10s
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
NeoFS Simple Object Operations
|
|
||||||
[Documentation] Testcase to validate NeoFS object expiration option.
|
|
||||||
[Tags] Object NeoFS NeoCLI
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
${CID} = Create container ${WALLET}
|
|
||||||
|
|
||||||
${FILE} ${FILE_HASH} = Generate File ${SIMPLE_OBJ_SIZE}
|
|
||||||
${EPOCH} = Get Epoch
|
|
||||||
|
|
||||||
${EPOCH_PRE} = Evaluate ${EPOCH}-1
|
|
||||||
${EPOCH_NEXT} = Evaluate ${EPOCH}+1
|
|
||||||
${EPOCH_POST} = Evaluate ${EPOCH}+1000
|
|
||||||
|
|
||||||
# Failed on attempt to create epoch from the past
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Put object ${WALLET} ${FILE} ${CID} options= --attributes __NEOFS__EXPIRATION_EPOCH=${EPOCH_PRE}
|
|
||||||
|
|
||||||
# Put object with different expiration epoch numbers (current, next, and from the distant future)
|
|
||||||
${OID_CUR} = Put object ${WALLET} ${FILE} ${CID} options= --attributes __NEOFS__EXPIRATION_EPOCH=${EPOCH}
|
|
||||||
${OID_NXT} = Put object ${WALLET} ${FILE} ${CID} options= --attributes __NEOFS__EXPIRATION_EPOCH=${EPOCH_NEXT}
|
|
||||||
${OID_PST} = Put object ${WALLET} ${FILE} ${CID} options= --attributes __NEOFS__EXPIRATION_EPOCH=${EPOCH_POST}
|
|
||||||
|
|
||||||
# Check objects for existence
|
|
||||||
Get object ${WALLET} ${CID} ${OID_CUR} ${EMPTY} file_read_cur
|
|
||||||
Get object ${WALLET} ${CID} ${OID_NXT} ${EMPTY} file_read_nxt
|
|
||||||
Get object ${WALLET} ${CID} ${OID_PST} ${EMPTY} file_read_pst
|
|
||||||
|
|
||||||
# Increment epoch to check that expired objects (OID_CUR) will be removed
|
|
||||||
Tick Epoch
|
|
||||||
# we assume that during this time objects must be deleted
|
|
||||||
Sleep ${CLEANUP_TIMEOUT}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get object ${WALLET} ${CID} ${OID_CUR} ${EMPTY} file_read
|
|
||||||
|
|
||||||
# Check that correct object with expiration in the future is existed
|
|
||||||
Get object ${WALLET} ${CID} ${OID_NXT} ${EMPTY} file_read
|
|
||||||
Get object ${WALLET} ${CID} ${OID_PST} ${EMPTY} file_read_pst
|
|
||||||
|
|
||||||
# Increment one more epoch to check that expired object (OID_NXT) will be removed
|
|
||||||
Tick Epoch
|
|
||||||
# we assume that during this time objects must be deleted
|
|
||||||
Sleep ${CLEANUP_TIMEOUT}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Get object ${WALLET} ${CID} ${OID_NXT} ${EMPTY} file_read
|
|
||||||
|
|
||||||
# Check that correct object with expiration in the distant future is existed
|
|
||||||
Get object ${WALLET} ${CID} ${OID_PST} ${EMPTY} file_read_pst
|
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library container.py
|
|
||||||
Library storage_policy.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource payment_operations.robot
|
|
||||||
Resource verbs.robot
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
NeoFS Simple Object Operations
|
|
||||||
[Documentation] Testcase to validate NeoFS operations with simple object.
|
|
||||||
[Tags] Object
|
|
||||||
[Timeout] 10 min
|
|
||||||
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
${CID} = Create container ${WALLET}
|
|
||||||
|
|
||||||
${OID} =
|
|
||||||
... Run All Verbs Except Delete And Expect Success
|
|
||||||
... ${WALLET} ${CID} Simple
|
|
||||||
|
|
||||||
${COPIES} = Get Simple Object Copies ${WALLET} ${CID} ${OID}
|
|
||||||
Should Be Equal As Numbers 2 ${COPIES}
|
|
||||||
|
|
||||||
Delete Object And Validate Tombstone
|
|
||||||
... ${WALLET} ${CID} ${OID}
|
|
||||||
|
|
||||||
|
|
|
@ -1,44 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library container.py
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library storage_group.py
|
|
||||||
Library Collections
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource payment_operations.robot
|
|
||||||
Resource storage_group.robot
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
@{UNEXIST_OID} = B2DKvkHnLnPvapbDgfpU1oVUPuXQo5LTfKVxmNDZXQff
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
NeoFS Complex Storagegroup
|
|
||||||
[Documentation] Testcase to validate NeoFS operations with Storagegroup.
|
|
||||||
[Tags] Object
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
${CID} = Create container ${WALLET}
|
|
||||||
|
|
||||||
${FILE} ${_} = Generate file ${COMPLEX_OBJ_SIZE}
|
|
||||||
|
|
||||||
${OID_1} = Put object ${WALLET} ${FILE} ${CID}
|
|
||||||
${OID_2} = Put object ${WALLET} ${FILE} ${CID}
|
|
||||||
|
|
||||||
@{ONE_OBJECT} = Create List ${OID_1}
|
|
||||||
@{TWO_OBJECTS} = Create List ${OID_1} ${OID_2}
|
|
||||||
|
|
||||||
Run Storage Group Operations And Expect Success
|
|
||||||
... ${WALLET} ${CID} ${ONE_OBJECT} Complex
|
|
||||||
|
|
||||||
Run Storage Group Operations And Expect Success
|
|
||||||
... ${WALLET} ${CID} ${TWO_OBJECTS} Complex
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Put Storagegroup ${WALLET} ${CID} ${UNEXIST_OID}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete Storagegroup ${WALLET} ${CID} ${UNEXIST_OID}
|
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library neofs_verbs.py
|
|
||||||
Library container.py
|
|
||||||
Library storage_group.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
Resource payment_operations.robot
|
|
||||||
Resource storage_group.robot
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
@{UNEXIST_OID} = B2DKvkHnLnPvapbDgfpU1oVUPuXQo5LTfKVxmNDZXQff
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
NeoFS Simple Storagegroup
|
|
||||||
[Documentation] Testcase to validate NeoFS operations with Storagegroup.
|
|
||||||
[Tags] Object
|
|
||||||
[Timeout] 20 min
|
|
||||||
|
|
||||||
|
|
||||||
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
|
||||||
${CID} = Create container ${WALLET}
|
|
||||||
|
|
||||||
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
||||||
|
|
||||||
${OID_1} = Put object ${WALLET} ${FILE_S} ${CID}
|
|
||||||
${OID_2} = Put object ${WALLET} ${FILE_S} ${CID}
|
|
||||||
|
|
||||||
@{ONE_OBJECT} = Create List ${OID_1}
|
|
||||||
@{TWO_OBJECTS} = Create List ${OID_1} ${OID_2}
|
|
||||||
|
|
||||||
Run Storage Group Operations And Expect Success
|
|
||||||
... ${WALLET} ${CID} ${ONE_OBJECT} Simple
|
|
||||||
|
|
||||||
Run Storage Group Operations And Expect Success
|
|
||||||
... ${WALLET} ${CID} ${TWO_OBJECTS} Simple
|
|
||||||
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Put Storagegroup ${WALLET} ${CID} ${UNEXIST_OID}
|
|
||||||
Run Keyword And Expect Error *
|
|
||||||
... Delete Storagegroup ${WALLET} ${CID} ${UNEXIST_OID}
|
|
||||||
|
|
|
@ -1,50 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library payment_neogo.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
Library Process
|
|
||||||
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
|
|
||||||
${DEPOSIT_AMOUNT} = ${25}
|
|
||||||
${DEPOSIT} = ${60}
|
|
||||||
@{INCLUDE_SVC} = ir
|
|
||||||
&{CONFIG_CHANGE} = NEOFS_IR_EMIT_GAS_BALANCE_THRESHOLD=${10**16}
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
IR GAS emission threshold value
|
|
||||||
[Documentation] Testcase to check sidechain balance when emission threshold is exceeded.
|
|
||||||
[Tags] GAS Sidechain
|
|
||||||
[Timeout] 5 min
|
|
||||||
|
|
||||||
|
|
||||||
${WALLET} ${ADDR} ${_} = Generate Wallet
|
|
||||||
|
|
||||||
${SC_BALANCE} = Get Sidechain Balance ${ADDR}
|
|
||||||
Transfer Mainnet Gas ${WALLET} ${DEPOSIT}
|
|
||||||
|
|
||||||
##########################################################################################
|
|
||||||
# Threshold is set to default 0 and sidechain balance has changed after deposit operation
|
|
||||||
##########################################################################################
|
|
||||||
|
|
||||||
NeoFS Deposit ${WALLET} ${DEPOSIT_AMOUNT}
|
|
||||||
Sleep ${MAINNET_BLOCK_TIME}
|
|
||||||
|
|
||||||
${BALANCE_CHANGED} = Get Sidechain Balance ${ADDR}
|
|
||||||
Should Not Be Equal ${SC_BALANCE} ${BALANCE_CHANGED}
|
|
||||||
|
|
||||||
Make Down ${INCLUDE_SVC}
|
|
||||||
Make Up ${INCLUDE_SVC} ${CONFIG_CHANGE}
|
|
||||||
|
|
||||||
######################################################################################
|
|
||||||
# Threshold is exceeded and sidechain balance has not changed after deposit operation
|
|
||||||
######################################################################################
|
|
||||||
|
|
||||||
NeoFS Deposit ${WALLET} ${DEPOSIT_AMOUNT}
|
|
||||||
Sleep ${MAINNET_BLOCK_TIME}
|
|
||||||
|
|
||||||
${BALANCE_UNCHANGED} = Get Sidechain Balance ${ADDR}
|
|
||||||
Should Be Equal ${BALANCE_UNCHANGED} ${BALANCE_CHANGED}
|
|
||||||
|
|
|
@ -1,55 +0,0 @@
|
||||||
*** Settings ***
|
|
||||||
Variables common.py
|
|
||||||
|
|
||||||
Library payment_neogo.py
|
|
||||||
Library utility_keywords.py
|
|
||||||
|
|
||||||
|
|
||||||
*** Variables ***
|
|
||||||
${DEPOSIT_AMOUNT} = ${10}
|
|
||||||
${WITHDRAW_AMOUNT} = ${10}
|
|
||||||
${TRANSFER_AMOUNT} = ${15}
|
|
||||||
|
|
||||||
*** Test cases ***
|
|
||||||
NeoFS Deposit and Withdraw
|
|
||||||
[Documentation] Testcase to validate NeoFS Withdraw operation.
|
|
||||||
[Timeout] 10 min
|
|
||||||
|
|
||||||
|
|
||||||
${WALLET} ${ADDR} ${_} = Generate Wallet
|
|
||||||
|
|
||||||
##########################################################
|
|
||||||
# Transferring GAS from initial wallet to our test wallet
|
|
||||||
##########################################################
|
|
||||||
Transfer Mainnet Gas ${WALLET} ${TRANSFER_AMOUNT}
|
|
||||||
${MAINNET_BALANCE} = Get Mainnet Balance ${ADDR}
|
|
||||||
Should Be Equal As Numbers ${MAINNET_BALANCE} ${TRANSFER_AMOUNT}
|
|
||||||
|
|
||||||
############################
|
|
||||||
# Making deposit into NeoFS
|
|
||||||
############################
|
|
||||||
NeoFS Deposit ${WALLET} ${DEPOSIT_AMOUNT}
|
|
||||||
|
|
||||||
${MAINNET_BALANCE} = Get Mainnet Balance ${ADDR}
|
|
||||||
${EXPECTED_BALANCE} = Evaluate ${TRANSFER_AMOUNT}-${DEPOSIT_AMOUNT}
|
|
||||||
Should Be True ${MAINNET_BALANCE} < ${EXPECTED_BALANCE}
|
|
||||||
|
|
||||||
${NEOFS_BALANCE} = Get NeoFS Balance ${WALLET}
|
|
||||||
Should Be Equal As Numbers ${NEOFS_BALANCE} ${DEPOSIT_AMOUNT}
|
|
||||||
|
|
||||||
# TODO: try to withdraw more than was deposited
|
|
||||||
|
|
||||||
###########################
|
|
||||||
# Withdrawing deposit back
|
|
||||||
###########################
|
|
||||||
Withdraw Mainnet Gas ${WALLET} ${WITHDRAW_AMOUNT}
|
|
||||||
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
||||||
|
|
||||||
${NEOFS_BALANCE} = Get NeoFS Balance ${WALLET}
|
|
||||||
${EXPECTED_BALANCE} = Evaluate ${DEPOSIT_AMOUNT} - ${WITHDRAW_AMOUNT}
|
|
||||||
Should Be Equal As numbers ${NEOFS_BALANCE} ${EXPECTED_BALANCE}
|
|
||||||
|
|
||||||
${MAINNET_BALANCE_AFTER} = Get Mainnet Balance ${ADDR}
|
|
||||||
${MAINNET_BALANCE_DIFF} = Evaluate ${MAINNET_BALANCE_AFTER} - ${MAINNET_BALANCE}
|
|
||||||
Should Be True ${MAINNET_BALANCE_DIFF} < ${WITHDRAW_AMOUNT}
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
# DevEnv variables
|
|
||||||
export NEOFS_MORPH_DISABLE_CACHE=true
|
|
||||||
export DEVENV_PATH="${DEVENV_PATH:-${VIRTUAL_ENV}/../../neofs-dev-env}"
|
|
||||||
pushd $DEVENV_PATH > /dev/null
|
|
||||||
export `make env`
|
|
||||||
popd > /dev/null
|
|
||||||
|
|
||||||
export PYTHONPATH=${PYTHONPATH}:${VIRTUAL_ENV}/../neofs-keywords/lib:${VIRTUAL_ENV}/../neofs-keywords/robot:${VIRTUAL_ENV}/../robot/resources/lib/python_keywords:${VIRTUAL_ENV}/../robot/resources/lib/robot:${VIRTUAL_ENV}/../robot/variables
|
|
|
@ -1,18 +0,0 @@
|
||||||
robotframework==4.1.2
|
|
||||||
requests==2.25.1
|
|
||||||
pexpect==4.8.0
|
|
||||||
boto3==1.16.33
|
|
||||||
docker==4.4.0
|
|
||||||
botocore==1.19.33
|
|
||||||
urllib3==1.26.3
|
|
||||||
base58==2.1.0
|
|
||||||
robotframework==4.1.2
|
|
||||||
requests==2.25.1
|
|
||||||
pexpect==4.8.0
|
|
||||||
boto3==1.16.33
|
|
||||||
docker==4.4.0
|
|
||||||
botocore==1.19.33
|
|
||||||
urllib3==1.26.3
|
|
||||||
base58==2.1.0
|
|
||||||
allure-pytest==2.9.45
|
|
||||||
pytest==7.1.2
|
|
Loading…
Reference in a new issue