Refactored Head object operation: removed placeholders for optional

parameters; JSON output set as a default

Signed-off-by: anastasia prasolova <anastasia@nspcc.ru>
This commit is contained in:
anastasia prasolova 2022-03-15 14:58:59 +03:00 committed by Anastasia Prasolova
parent 0ef41a8495
commit d66ae5b7fc
28 changed files with 710 additions and 722 deletions

View file

@ -11,6 +11,7 @@ import random
import uuid import uuid
import docker import docker
import base58 import base58
from functools import reduce
from neo3 import wallet from neo3 import wallet
from common import * from common import *
@ -24,6 +25,7 @@ ROBOT_AUTO_KEYWORDS = False
NEOFS_CLI_EXEC = os.getenv('NEOFS_CLI_EXEC', 'neofs-cli') NEOFS_CLI_EXEC = os.getenv('NEOFS_CLI_EXEC', 'neofs-cli')
# TODO: move to neofs-keywords
@keyword('Get ScriptHash') @keyword('Get ScriptHash')
def get_scripthash(wif: str): def get_scripthash(wif: str):
acc = wallet.Account.from_wif(wif, '') acc = wallet.Account.from_wif(wif, '')
@ -186,7 +188,7 @@ def container_existing(private_key: str, cid: str):
@keyword('Search object') @keyword('Search object')
def search_object(private_key: str, cid: str, keys: str, bearer: str, filters: str, def search_object(private_key: str, cid: str, keys: str="", bearer: str="", filters: dict={},
expected_objects_list=[], options:str=""): expected_objects_list=[], options:str=""):
bearer_token = "" bearer_token = ""
filters_result = "" filters_result = ""
@ -194,9 +196,10 @@ def search_object(private_key: str, cid: str, keys: str, bearer: str, filters: s
if bearer: if bearer:
bearer_token = f"--bearer {bearer}" bearer_token = f"--bearer {bearer}"
if filters: if filters:
for filter_item in filters.split(','): filters_result += "--filters "
filter_item = re.sub(r'=', ' EQ ', filter_item) logger.info(filters)
filters_result += f"--filters '{filter_item}' " for k, v in filters.items():
filters_result += f"'{k} EQ {v}' "
object_cmd = ( object_cmd = (
f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wallet {private_key} ' f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wallet {private_key} '
@ -224,7 +227,8 @@ def get_component_objects(private_key: str, cid: str, oid: str):
split_id = "" split_id = ""
for node in NEOFS_NETMAP: for node in NEOFS_NETMAP:
try: try:
header_virtual = head_object(private_key, cid, oid, '', '', '--raw --ttl 1', node, True) header_virtual = head_object(private_key, cid, oid, options=' --ttl 1',
endpoint=node, is_raw=True)
if header_virtual: if header_virtual:
parsed_header_virtual = parse_object_virtual_raw_header(header_virtual) parsed_header_virtual = parse_object_virtual_raw_header(header_virtual)
@ -243,8 +247,7 @@ def get_component_objects(private_key: str, cid: str, oid: str):
# Search expected Linking object # Search expected Linking object
for targer_oid in full_obj_list: for targer_oid in full_obj_list:
header = head_object(private_key, cid, targer_oid, '', '', '--raw') header_parsed = head_object(private_key, cid, targer_oid, is_raw=True)
header_parsed = _get_raw_split_information(header)
if header_parsed['Split ID'] == split_id and 'Split ChildID' in header_parsed.keys(): if header_parsed['Split ID'] == split_id and 'Split ChildID' in header_parsed.keys():
logger.info("Linking object has been found in additional check (head of all objects).") logger.info("Linking object has been found in additional check (head of all objects).")
return _collect_split_objects_from_header(private_key, cid, parsed_header_virtual) return _collect_split_objects_from_header(private_key, cid, parsed_header_virtual)
@ -252,13 +255,12 @@ def get_component_objects(private_key: str, cid: str, oid: str):
raise Exception("Linking object is not found at all - all existed objects have been headed.") raise Exception("Linking object is not found at all - all existed objects have been headed.")
def _collect_split_objects_from_header(private_key, cid, parsed_header): def _collect_split_objects_from_header(private_key, cid, parsed_header):
header_link = head_object(private_key, cid, parsed_header['Linking object'], '', '', '--raw') header_link_parsed = head_object(private_key, cid, parsed_header['Linking object'], is_raw=True)
header_link_parsed = _get_raw_split_information(header_link)
return header_link_parsed['Split ChildID'] return header_link_parsed['Split ChildID']
@keyword('Verify Split Chain') @keyword('Verify Split Chain')
def verify_split_chain(private_key: str, cid: str, oid: str): def verify_split_chain(wif: str, cid: str, oid: str):
header_virtual_parsed = dict() header_virtual_parsed = dict()
header_last_parsed = dict() header_last_parsed = dict()
@ -272,24 +274,25 @@ def verify_split_chain(private_key: str, cid: str, oid: str):
logger.info("Collect Split objects information and verify chain of the objects.") logger.info("Collect Split objects information and verify chain of the objects.")
for node in NEOFS_NETMAP: for node in NEOFS_NETMAP:
try: try:
header_virtual = head_object(private_key, cid, oid, '', '', '--raw --ttl 1', node, True) header_virtual = head_object(wif, cid, oid, options=' --ttl 1',
endpoint=node, json_output=False, is_raw=True)
parsed_header_virtual = parse_object_virtual_raw_header(header_virtual) parsed_header_virtual = parse_object_virtual_raw_header(header_virtual)
if 'Last object' in parsed_header_virtual.keys(): if 'Last object' in parsed_header_virtual.keys():
header_last = head_object(private_key, cid, header_last = head_object(wif, cid,
parsed_header_virtual['Last object'], parsed_header_virtual['Last object'],
'', '', '--raw') is_raw=True, json_output=False)
header_last_parsed = _get_raw_split_information(header_last) header_last_parsed = _get_raw_split_information(header_last)
marker_last_obj = 1 marker_last_obj = 1
# Recursive chain validation up to the first object # Recursive chain validation up to the first object
final_verif_data = _verify_child_link(private_key, cid, oid, header_last_parsed, final_verif_data) final_verif_data = _verify_child_link(wif, cid, oid, header_last_parsed, final_verif_data)
break break
logger.info(f"Found Split Object with header:\n\t{parsed_header_virtual}") logger.info(f"Found Split Object with header:\n\t{parsed_header_virtual}")
logger.info("Continue to search Last Split Object") logger.info("Continue to search Last Split Object")
except RuntimeError as e: except Exception as exc:
logger.info(f"Failed while collectiong Split Objects: {e}") logger.info(f"Failed while collectiong Split Objects: {exc}")
continue continue
if marker_last_obj == 0: if marker_last_obj == 0:
@ -297,15 +300,15 @@ def verify_split_chain(private_key: str, cid: str, oid: str):
# Get Linking object # Get Linking object
logger.info("Compare Split objects result information with Linking object.") logger.info("Compare Split objects result information with Linking object.")
for node in nodes: for node in NEOFS_NETMAP:
try: try:
header_virtual = head_object(private_key, cid, oid, '', '', '--raw --ttl 1', node, True) header_virtual = head_object(wif, cid, oid, options=' --ttl 1',
endpoint=node, json_output=False, is_raw=True)
parsed_header_virtual = parse_object_virtual_raw_header(header_virtual) parsed_header_virtual = parse_object_virtual_raw_header(header_virtual)
if 'Linking object' in parsed_header_virtual.keys(): if 'Linking object' in parsed_header_virtual.keys():
header_link = head_object(wif, cid,
header_link = head_object(private_key, cid,
parsed_header_virtual['Linking object'], parsed_header_virtual['Linking object'],
'', '', '--raw') is_raw=True, json_output=False)
header_link_parsed = _get_raw_split_information(header_link) header_link_parsed = _get_raw_split_information(header_link)
marker_link_obj = 1 marker_link_obj = 1
@ -348,7 +351,7 @@ def verify_split_chain(private_key: str, cid: str, oid: str):
logger.info("Compare Split objects result information with Virtual object.") logger.info("Compare Split objects result information with Virtual object.")
header_virtual = head_object(private_key, cid, oid, '', '', '') header_virtual = head_object(wif, cid, oid, json_output=False)
header_virtual_parsed = _get_raw_split_information(header_virtual) header_virtual_parsed = _get_raw_split_information(header_virtual)
if int(header_virtual_parsed['PayloadLength']) == int(final_verif_data['PayloadLength']): if int(header_virtual_parsed['PayloadLength']) == int(final_verif_data['PayloadLength']):
@ -364,40 +367,6 @@ def verify_split_chain(private_key: str, cid: str, oid: str):
else: else:
raise Exception("Object Type is not 'regular'.") raise Exception("Object Type is not 'regular'.")
return 1
def _verify_child_link(private_key: str, cid: str, oid: str, header_last_parsed: dict, final_verif_data: dict):
if 'PayloadLength' in final_verif_data.keys():
final_verif_data['PayloadLength'] = int(final_verif_data['PayloadLength']) + int(header_last_parsed['PayloadLength'])
else:
final_verif_data['PayloadLength'] = int(header_last_parsed['PayloadLength'])
if header_last_parsed['Type'] != 'regular':
raise Exception("Object Type is not 'regular'.")
if 'Split ID' in final_verif_data.keys():
if final_verif_data['Split ID'] != header_last_parsed['Split ID']:
raise Exception(f"Object Split ID ({header_last_parsed['Split ID']}) is not expected ({final_verif_data['Split ID']}).")
else:
final_verif_data['Split ID'] = header_last_parsed['Split ID']
if 'ID List' in final_verif_data.keys():
final_verif_data['ID List'].append(header_last_parsed['ID'])
else:
final_verif_data['ID List'] = []
final_verif_data['ID List'].append(header_last_parsed['ID'])
if 'Split PreviousID' in header_last_parsed.keys():
header_virtual = head_object(private_key, cid, header_last_parsed['Split PreviousID'], '', '', '--raw')
parsed_header_virtual = _get_raw_split_information(header_virtual)
final_verif_data = _verify_child_link(private_key, cid, oid, parsed_header_virtual, final_verif_data)
else:
logger.info("Chain of the objects has been parsed from the last object ot the first.")
return final_verif_data
def _get_raw_split_information(header): def _get_raw_split_information(header):
result_header = dict() result_header = dict()
@ -450,6 +419,40 @@ def _get_raw_split_information(header):
return result_header return result_header
def _verify_child_link(wif: str, cid: str, oid: str, header_last_parsed: dict, final_verif_data: dict):
if 'PayloadLength' in final_verif_data.keys():
final_verif_data['PayloadLength'] = int(final_verif_data['PayloadLength']) + int(header_last_parsed['PayloadLength'])
else:
final_verif_data['PayloadLength'] = int(header_last_parsed['PayloadLength'])
if header_last_parsed['Type'] != 'regular':
raise Exception("Object Type is not 'regular'.")
if 'Split ID' in final_verif_data.keys():
if final_verif_data['Split ID'] != header_last_parsed['Split ID']:
raise Exception(f"Object Split ID ({header_last_parsed['Split ID']}) is not expected ({final_verif_data['Split ID']}).")
else:
final_verif_data['Split ID'] = header_last_parsed['Split ID']
if 'ID List' in final_verif_data.keys():
final_verif_data['ID List'].append(header_last_parsed['ID'])
else:
final_verif_data['ID List'] = []
final_verif_data['ID List'].append(header_last_parsed['ID'])
if 'Split PreviousID' in header_last_parsed.keys():
header_virtual = head_object(wif, cid, header_last_parsed['Split PreviousID'], is_raw=True, json_output=False)
parsed_header_virtual = _get_raw_split_information(header_virtual)
final_verif_data = _verify_child_link(wif, cid, oid, parsed_header_virtual, final_verif_data)
else:
logger.info("Chain of the objects has been parsed from the last object ot the first.")
return final_verif_data
@keyword('Verify Head Tombstone') @keyword('Verify Head Tombstone')
def verify_head_tombstone(private_key: str, cid: str, oid_ts: str, oid: str, addr: str): def verify_head_tombstone(private_key: str, cid: str, oid_ts: str, oid: str, addr: str):
object_cmd = ( object_cmd = (
@ -504,29 +507,62 @@ def _json_cli_decode(data: str):
@keyword('Head object') @keyword('Head object')
def head_object(private_key: str, cid: str, oid: str, bearer_token: str="", def head_object(private_key: str, cid: str, oid: str, bearer_token: str="",
user_headers:str="", options:str="", endpoint: str="", json_output: bool = False): options:str="", endpoint: str="", json_output: bool = True,
is_raw: bool = False):
if bearer_token: cmd = (
bearer_token = f"--bearer {bearer_token}" f'{NEOFS_CLI_EXEC} --rpc-endpoint {endpoint if endpoint else NEOFS_ENDPOINT} '
if endpoint == "": f'--wallet {private_key} '
endpoint = NEOFS_ENDPOINT f'object head --cid {cid} --oid {oid} {options} '
f'{"--bearer " + bearer_token if bearer_token else ""} '
object_cmd = ( f'{"--json" if json_output else ""} '
f'{NEOFS_CLI_EXEC} --rpc-endpoint {endpoint} --wallet {private_key} object ' f'{"--raw" if is_raw else ""}'
f'head --cid {cid} --oid {oid} {bearer_token} {options} {"--json" if json_output else ""}'
) )
logger.info(f"Cmd: {object_cmd}") logger.info(f"cmd: {cmd}")
output = _cmd_run(object_cmd) output = _cmd_run(cmd)
if json_output:
decoded = json.loads(output)
output = _decode_json_output(decoded)
if user_headers:
for key in user_headers.split(","):
if re.search(fr'({key})', output):
logger.info(f"User header {key} was parsed from command output")
else:
raise Exception(f"User header {key} was not found in the command output: \t{output}")
return output return output
def _decode_json_output(data: dict):
'''
We get JSON output as an automatically decoded structure from
protobuf. Some fields are decoded with boilerplates and binary
values are Base64-encoded.
This function rearranges the structure and reencodes binary
data from Base64 to Base58.
Args:
data (dict): a dictionary which neofs-cli returns to reencode.
Returns:
dict: dictionary which contains data in a more organized form.
'''
try:
# reencoding binary IDs
data["objectID"] = _json_cli_decode(data["objectID"]["value"])
data["header"]["containerID"] = _json_cli_decode(data["header"]["containerID"]["value"])
data["header"]["ownerID"] = _json_cli_decode(data["header"]["ownerID"]["value"])
data["header"]["homomorphicHash"] = _json_cli_decode(data["header"]["homomorphicHash"]["sum"])
data["header"]["payloadHash"] = _json_cli_decode(data["header"]["payloadHash"]["sum"])
data["header"]["version"] = f"{data['header']['version']['major']}{data['header']['version']['minor']}"
# object attributes view normalization
ugly_attrs = data["header"]["attributes"]
data["header"]["attributes"] = {}
for attr in ugly_attrs:
data["header"]["attributes"][attr["key"]] = attr["value"]
except Exception as exc:
raise RuntimeError(f"failed to decode JSON output: {exc}") from exc
return data
@keyword('Get container attributes') @keyword('Get container attributes')
def get_container_attributes(private_key: str, cid: str, endpoint: str="", json_output: bool = False): def get_container_attributes(private_key: str, cid: str, endpoint: str="", json_output: bool = False):
@ -541,6 +577,8 @@ def get_container_attributes(private_key: str, cid: str, endpoint: str="", json_
output = _cmd_run(container_cmd) output = _cmd_run(container_cmd)
return output return output
# TODO: replace with JSON parser when https://github.com/nspcc-dev/neofs-node/issues/1233
# is done
@keyword('Parse Object Virtual Raw Header') @keyword('Parse Object Virtual Raw Header')
def parse_object_virtual_raw_header(header: str): def parse_object_virtual_raw_header(header: str):
result_header = dict() result_header = dict()
@ -560,99 +598,6 @@ def parse_object_virtual_raw_header(header: str):
result_header['Last object'] = m.group(1) result_header['Last object'] = m.group(1)
logger.info(f"Result: {result_header}") logger.info(f"Result: {result_header}")
return result_header
@keyword('Decode Object System Header Json')
def decode_object_system_header_json(header):
result_header = dict()
json_header = json.loads(header)
# Header - Constant attributes
# ID
oid = json_header["objectID"]["value"]
if oid is not None:
result_header["ID"] = _json_cli_decode(oid)
else:
raise Exception(f"no ID was parsed from header: \t{header}" )
# CID
cid = json_header["header"]["containerID"]["value"]
if cid is not None:
result_header["CID"] = _json_cli_decode(cid)
else:
raise Exception(f"no CID was parsed from header: \t{header}")
# OwnerID
owner_id = json_header["header"]["ownerID"]["value"]
if owner_id is not None:
result_header["OwnerID"] = _json_cli_decode(owner_id)
else:
raise Exception(f"no OwnerID was parsed from header: \t{header}")
# CreatedAtEpoch
created_at_epoch = json_header["header"]["creationEpoch"]
if created_at_epoch is not None:
result_header["CreatedAtEpoch"] = created_at_epoch
else:
raise Exception(f"no CreatedAtEpoch was parsed from header: \t{header}")
# PayloadLength
payload_length = json_header["header"]["payloadLength"]
if payload_length is not None:
result_header["PayloadLength"] = payload_length
else:
raise Exception(f"no PayloadLength was parsed from header: \t{header}")
# HomoHash
homo_hash = json_header["header"]["homomorphicHash"]["sum"]
if homo_hash is not None:
homo_hash_64_d = base64.b64decode(homo_hash)
homo_hash_bytes = binascii.hexlify(homo_hash_64_d)
result_header["HomoHash"] = bytes.decode(homo_hash_bytes)
else:
raise Exception(f"no HomoHash was parsed from header: \t{header}")
# PayloadHash
payload_hash = json_header["header"]["payloadHash"]["sum"]
if payload_hash is not None:
payload_hash_64_d = base64.b64decode(payload_hash)
payload_hash_bytes = binascii.hexlify(payload_hash_64_d)
result_header["PayloadHash"] = bytes.decode(payload_hash_bytes)
else:
raise Exception(f"no Checksum was parsed from header: \t{header}")
# Type
object_type = json_header["header"]["objectType"]
if object_type is not None:
result_header["Type"] = object_type
else:
raise Exception(f"no Type was parsed from header: \t{header}")
# Version
version = json_header["header"]["version"]
if version is not None:
version_full = f'v{version["major"]}.{version["minor"]}'
result_header["Version"] = version_full
else:
raise Exception(f"no version was parsed from header: \t{header}" )
# Header - Optional attributes
# Attributes
attributes = []
attribute_list = json_header["header"]["attributes"]
if attribute_list is not None:
for e in attribute_list:
values_list = list(e.values())
attribute = values_list[0] + '=' + values_list[1]
attributes.append(attribute)
result_header["Attributes"] = attributes
else:
raise Exception(f"no Attributes were parsed from header: \t{header}")
return result_header
@keyword('Decode Container Attributes Json') @keyword('Decode Container Attributes Json')
@ -674,17 +619,8 @@ def decode_container_attributes_json(header):
return result_header return result_header
@keyword('Verify Head Attribute')
def verify_head_attribute(header, attribute):
attribute_list = header["Attributes"]
if (attribute in attribute_list):
logger.info(f"Attribute {attribute} is found")
else:
raise Exception(f"Attribute {attribute} was not found")
@keyword('Delete object') @keyword('Delete object')
def delete_object(private_key: str, cid: str, oid: str, bearer: str, options: str=""): def delete_object(private_key: str, cid: str, oid: str, bearer: str="", options: str=""):
bearer_token = "" bearer_token = ""
if bearer: if bearer:
bearer_token = f"--bearer {bearer}" bearer_token = f"--bearer {bearer}"
@ -718,39 +654,41 @@ def get_file_hash(filename : str):
return file_hash return file_hash
@keyword('Verify file hash')
def verify_file_hash(filename, expected_hash):
file_hash = _get_file_hash(filename)
if file_hash == expected_hash:
logger.info(f"Hash is equal to expected: {file_hash}")
else:
raise Exception(f"File hash '{file_hash}' is not equal to {expected_hash}")
@keyword('Put object') @keyword('Put object')
def put_object(private_key: str, path: str, cid: str, bearer: str, user_headers: str="", def put_object(private_key: str, path: str, cid: str, bearer: str="", user_headers: dict={},
endpoint: str="", options: str="" ): endpoint: str="", options: str="" ):
logger.info("Going to put the object")
if not endpoint: if not endpoint:
endpoint = random.sample(NEOFS_NETMAP, 1)[0] endpoint = random.sample(NEOFS_NETMAP, 1)[0]
if user_headers:
user_headers = f"--attributes {user_headers}"
if bearer: if bearer:
bearer = f"--bearer {bearer}" bearer = f"--bearer {bearer}"
putobject_cmd = ( putobject_cmd = (
f'{NEOFS_CLI_EXEC} --rpc-endpoint {endpoint} --wallet {private_key} object ' f'{NEOFS_CLI_EXEC} --rpc-endpoint {endpoint} --wallet {private_key} object '
f'put --no-progress --file {path} --cid {cid} {bearer} {user_headers} {options}' f'put --no-progress --file {path} --cid {cid} {bearer} {options} '
f'{"--attributes " + _dict_to_attrs(user_headers) if user_headers else ""}'
) )
logger.info(f"Cmd: {putobject_cmd}") logger.info(f"cmd: {putobject_cmd}")
output = _cmd_run(putobject_cmd) output = _cmd_run(putobject_cmd)
oid = _parse_oid(output) oid = _parse_oid(output)
return oid return oid
def _dict_to_attrs(attrs: dict):
'''
This function takes dictionary of object attributes and converts them
into the string. The string is passed to `--attibutes` key of the
neofs-cli.
Args:
attrs (dict): object attirbutes in {"a": "b", "c": "d"} format.
Returns:
(str): string in "a=b,c=d" format.
'''
return reduce(lambda a,b: f"{a},{b}", map(lambda i: f"{i}={attrs[i]}", attrs))
@keyword('Get control endpoint with wif') @keyword('Get control endpoint with wif')
def get_control_endpoint_with_wif(endpoint_number: str = ''): def get_control_endpoint_with_wif(endpoint_number: str = ''):
if endpoint_number == '': if endpoint_number == '':
@ -853,9 +791,11 @@ def get_range_hash(private_key: str, cid: str, oid: str, bearer_token: str,
@keyword('Get object') @keyword('Get object')
def get_object(private_key: str, cid: str, oid: str, bearer_token: str, def get_object(private_key: str, cid: str, oid: str, bearer_token: str="",
write_object: str, endpoint: str="", options: str="" ): write_object: str="", endpoint: str="", options: str="" ):
if not write_object:
write_object = str(uuid.uuid4())
file_path = f"{ASSETS_DIR}/{write_object}" file_path = f"{ASSETS_DIR}/{write_object}"
logger.info("Going to get the object") logger.info("Going to get the object")

View file

@ -2,11 +2,6 @@
Variables common.py Variables common.py
Variables wellknown_acl.py Variables wellknown_acl.py
*** Variables ***
${FILE_USR_HEADER} = key1=1,key2=abc
${FILE_USR_HEADER_DEL} = key1=del,key2=del
${FILE_OTH_HEADER} = key1=oth,key2=oth
*** Keywords *** *** Keywords ***
Create Container Public Create Container Public
[Arguments] ${USER_KEY} [Arguments] ${USER_KEY}

View file

@ -10,9 +10,9 @@ Resource common_steps_acl_basic.robot
Resource payment_operations.robot Resource payment_operations.robot
*** Variables *** *** Variables ***
${FILE_USR_HEADER} = key1=1,key2=abc &{USER_HEADER} = key1=1 key2=abc
${FILE_USR_HEADER_DEL} = key1=del,key2=del &{USER_HEADER_DEL} = key1=del key2=del
${FILE_OTH_HEADER} = key1=oth,key2=oth &{ANOTHER_HEADER} = key1=oth key2=oth
${OBJECT_PATH} = testfile ${OBJECT_PATH} = testfile
${EACL_ERR_MSG} = * ${EACL_ERR_MSG} = *
@ -41,19 +41,19 @@ Check eACL Deny and Allow All
[Arguments] ${KEY} ${DENY_EACL} ${ALLOW_EACL} ${USER_KEY} [Arguments] ${KEY} ${DENY_EACL} ${ALLOW_EACL} ${USER_KEY}
${CID} = Create Container Public ${USER_KEY} ${CID} = Create Container Public ${USER_KEY}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} ${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER_DEL}
@{S_OBJ_H} = Create List ${S_OID_USER} @{S_OBJ_H} = Create List ${S_OID_USER}
Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} Put object ${KEY} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Search object ${KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} Search object ${KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
Head object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} Head object ${KEY} ${CID} ${S_OID_USER}
Get Range ${KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 Get Range ${KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Get Range Hash ${KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 Get Range Hash ${KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256
Delete object ${KEY} ${CID} ${D_OID_USER} ${EMPTY} Delete object ${KEY} ${CID} ${D_OID_USER}
Set eACL ${USER_KEY} ${CID} ${DENY_EACL} Set eACL ${USER_KEY} ${CID} ${DENY_EACL}
@ -61,37 +61,37 @@ Check eACL Deny and Allow All
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ... Put object ${KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl ... Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Search object ${KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} ... Search object ${KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Head object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} ... Head object ${KEY} ${CID} ${S_OID_USER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get Range ${KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 ... Get Range ${KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get Range Hash ${KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 ... Get Range Hash ${KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} ... Delete object ${KEY} ${CID} ${S_OID_USER}
Set eACL ${USER_KEY} ${CID} ${ALLOW_EACL} Set eACL ${USER_KEY} ${CID} ${ALLOW_EACL}
# The current ACL cache lifetime is 30 sec # The current ACL cache lifetime is 30 sec
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} Put object ${KEY} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Search object ${KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} Search object ${KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
Head object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} Head object ${KEY} ${CID} ${S_OID_USER}
Get Range ${KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 Get Range ${KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Get Range Hash ${KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 Get Range Hash ${KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256
Delete object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} Delete object ${KEY} ${CID} ${S_OID_USER}
Compose eACL Custom Compose eACL Custom
[Arguments] ${HEADER_DICT} ${MATCH_TYPE} ${FILTER} ${ACCESS} ${ROLE} [Arguments] ${HEADER_DICT} ${MATCH_TYPE} ${FILTER} ${ACCESS} ${ROLE}
${filter_value} = Get From dictionary ${HEADER_DICT} ${EACL_OBJ_FILTERS}[${FILTER}] ${filter_value} = Get From dictionary ${HEADER_DICT}[header] ${EACL_OBJ_FILTERS}[${FILTER}]
${filters} = Create Dictionary headerType=OBJECT matchType=${MATCH_TYPE} key=${FILTER} value=${filter_value} ${filters} = Create Dictionary headerType=OBJECT matchType=${MATCH_TYPE} key=${FILTER} value=${filter_value}
${rule_get}= Create Dictionary Operation=GET Access=${ACCESS} Role=${ROLE} Filters=${filters} ${rule_get}= Create Dictionary Operation=GET Access=${ACCESS} Role=${ROLE} Filters=${filters}
@ -109,12 +109,11 @@ Compose eACL Custom
[Return] ${EACL_CUSTOM} [Return] ${EACL_CUSTOM}
Object Header Decoded Object Header Decoded
[Arguments] ${USER_KEY} ${CID} ${S_OID_USER} [Arguments] ${USER_KEY} ${CID} ${OID}
${HEADER} = Head Object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} json_output=True &{HEADER} = Head Object ${USER_KEY} ${CID} ${OID}
&{HEADER_DICT} = Decode Object System Header Json ${HEADER}
[Return] &{HEADER_DICT} [Return] &{HEADER}
Check eACL Filters with MatchType String Equal Check eACL Filters with MatchType String Equal
[Arguments] ${FILTER} [Arguments] ${FILTER}
@ -125,16 +124,16 @@ Check eACL Filters with MatchType String Equal
${CID} = Create Container Public ${USER_KEY} ${CID} = Create Container Public ${USER_KEY}
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE} ${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
${S_OID_USER} = Put Object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${S_OID_USER} = Put Object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${D_OID_USER} = Put Object ${USER_KEY} ${FILE_S} ${CID}
@{S_OBJ_H} = Create List ${S_OID_USER} @{S_OBJ_H} = Create List ${S_OID_USER}
Get Object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Get Object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Search Object ${OTHER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} Search Object ${OTHER_KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
Head Object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} Head Object ${OTHER_KEY} ${CID} ${S_OID_USER}
Get Range ${OTHER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 Get Range ${OTHER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Get Range Hash ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 Get Range Hash ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256
Delete Object ${OTHER_KEY} ${CID} ${D_OID_USER} ${EMPTY} Delete Object ${OTHER_KEY} ${CID} ${D_OID_USER}
&{HEADER_DICT} = Object Header Decoded ${USER_KEY} ${CID} ${S_OID_USER} &{HEADER_DICT} = Object Header Decoded ${USER_KEY} ${CID} ${S_OID_USER}
${EACL_CUSTOM} = Compose eACL Custom ${HEADER_DICT} STRING_EQUAL ${FILTER} DENY OTHERS ${EACL_CUSTOM} = Compose eACL Custom ${HEADER_DICT} STRING_EQUAL ${FILTER} DENY OTHERS
@ -146,7 +145,7 @@ Check eACL Filters with MatchType String Equal
END END
IF 'HEAD' in ${VERB_FILTER_DEP}[${FILTER}] IF 'HEAD' in ${VERB_FILTER_DEP}[${FILTER}]
Run Keyword And Expect error ${EACL_ERR_MSG} Run Keyword And Expect error ${EACL_ERR_MSG}
... Head object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ... Head object ${OTHER_KEY} ${CID} ${S_OID_USER}
END END
IF 'RANGE' in ${VERB_FILTER_DEP}[${FILTER}] IF 'RANGE' in ${VERB_FILTER_DEP}[${FILTER}]
Run Keyword And Expect error ${EACL_ERR_MSG} Run Keyword And Expect error ${EACL_ERR_MSG}
@ -154,7 +153,7 @@ Check eACL Filters with MatchType String Equal
END END
IF 'SEARCH' in ${VERB_FILTER_DEP}[${FILTER}] IF 'SEARCH' in ${VERB_FILTER_DEP}[${FILTER}]
Run Keyword And Expect Error ${EACL_ERR_MSG} Run Keyword And Expect Error ${EACL_ERR_MSG}
... Search Object ${OTHER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} ... Search Object ${OTHER_KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
END END
IF 'RANGEHASH' in ${VERB_FILTER_DEP}[${FILTER}] IF 'RANGEHASH' in ${VERB_FILTER_DEP}[${FILTER}]
Run Keyword And Expect error ${EACL_ERR_MSG} Run Keyword And Expect error ${EACL_ERR_MSG}
@ -162,7 +161,7 @@ Check eACL Filters with MatchType String Equal
END END
IF 'DELETE' in ${VERB_FILTER_DEP}[${FILTER}] IF 'DELETE' in ${VERB_FILTER_DEP}[${FILTER}]
Run Keyword And Expect error ${EACL_ERR_MSG} Run Keyword And Expect error ${EACL_ERR_MSG}
... Delete Object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ... Delete Object ${OTHER_KEY} ${CID} ${S_OID_USER}
END END
Check eACL Filters with MatchType String Not Equal Check eACL Filters with MatchType String Not Equal
@ -174,14 +173,14 @@ Check eACL Filters with MatchType String Not Equal
${CID} = Create Container Public ${USER_KEY} ${CID} = Create Container Public ${USER_KEY}
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE} ${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
${S_OID_OTH} = Put Object ${OTHER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} ${S_OID_OTH} = Put Object ${OTHER_KEY} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
${S_OID_USER} = Put Object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${S_OID_USER} = Put Object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID}
@{S_OBJ_H} = Create List ${S_OID_USER} @{S_OBJ_H} = Create List ${S_OID_USER}
Get Object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Get Object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Head Object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} Head Object ${USER_KEY} ${CID} ${S_OID_USER}
Search Object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} Search Object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Get Range Hash ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 Get Range Hash ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256
@ -196,13 +195,13 @@ Check eACL Filters with MatchType String Not Equal
END END
IF 'HEAD' in ${VERB_FILTER_DEP}[${FILTER}] IF 'HEAD' in ${VERB_FILTER_DEP}[${FILTER}]
Run Keyword And Expect error ${EACL_ERR_MSG} Run Keyword And Expect error ${EACL_ERR_MSG}
... Head object ${OTHER_KEY} ${CID} ${S_OID_OTH} ${EMPTY} ... Head object ${OTHER_KEY} ${CID} ${S_OID_OTH}
Head object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} Head object ${OTHER_KEY} ${CID} ${S_OID_USER}
END END
IF 'SEARCH' in ${VERB_FILTER_DEP}[${FILTER}] IF 'SEARCH' in ${VERB_FILTER_DEP}[${FILTER}]
Run Keyword And Expect error ${EACL_ERR_MSG} Run Keyword And Expect error ${EACL_ERR_MSG}
... Search object ${OTHER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_OTH_HEADER} ${S_OBJ_H} ... Search object ${OTHER_KEY} ${CID} ${EMPTY} ${EMPTY} ${ANOTHER_HEADER} ${S_OBJ_H}
Search object ${OTHER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} Search object ${OTHER_KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
END END
IF 'RANGE' in ${VERB_FILTER_DEP}[${FILTER}] IF 'RANGE' in ${VERB_FILTER_DEP}[${FILTER}]
Run Keyword And Expect error ${EACL_ERR_MSG} Run Keyword And Expect error ${EACL_ERR_MSG}
@ -216,6 +215,6 @@ Check eACL Filters with MatchType String Not Equal
END END
IF 'DELETE' in ${VERB_FILTER_DEP}[${FILTER}] IF 'DELETE' in ${VERB_FILTER_DEP}[${FILTER}]
Run Keyword And Expect error ${EACL_ERR_MSG} Run Keyword And Expect error ${EACL_ERR_MSG}
... Delete Object ${OTHER_KEY} ${CID} ${S_OID_OTH} ${EMPTY} ... Delete Object ${OTHER_KEY} ${CID} ${S_OID_OTH}
Delete Object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} Delete Object ${OTHER_KEY} ${CID} ${S_OID_USER}
END END

View file

@ -5,9 +5,6 @@ Library wallet_keywords.py
Library rpc_call_keywords.py Library rpc_call_keywords.py
*** Variables *** *** Variables ***
${FILE_USR_HEADER} = key1=1,key2=abc
${FILE_USR_HEADER_OTH} = key1=2
${UNEXIST_OID} = B2DKvkHnLnPvapbDgfpU1oVUPuXQo5LTfKVxmNDZXQff
${PLACEMENT_RULE} = REP 2 IN X CBF 1 SELECT 2 FROM * AS X ${PLACEMENT_RULE} = REP 2 IN X CBF 1 SELECT 2 FROM * AS X
${CONTAINER_WAIT_INTERVAL} = 1 min ${CONTAINER_WAIT_INTERVAL} = 1 min

View file

@ -12,20 +12,20 @@ Resource setup_teardown.robot
*** Test cases *** *** Test cases ***
Basic ACL Operations for Private Container Basic ACL Operations for Private Container
[Documentation] Testcase to validate NeoFS operations with ACL for Private Container. [Documentation] Testcase to validate NeoFS operations with ACL for Private Container.
[Tags] ACL NeoFS NeoCLI [Tags] ACL
[Timeout] 20 min [Timeout] 20 min
[Setup] Setup [Setup] Setup
${WALLET} ${ADDR} ${USER_KEY} = Prepare Wallet And Deposit ${_} ${_} ${USER_KEY} = Prepare Wallet And Deposit
${WALLET_OTH} ${ADDR_OTH} ${OTHER_KEY} = Prepare Wallet And Deposit ${_} ${_} ${OTHER_KEY} = Prepare Wallet And Deposit
${PRIV_CID} = Create Private Container ${USER_KEY} ${PRIV_CID} = Create Private Container ${USER_KEY}
${FILE_S} ${FILE_S_HASH} = Generate file ${SIMPLE_OBJ_SIZE} ${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
Check Private Container ${USER_KEY} ${FILE_S} ${PRIV_CID} ${OTHER_KEY} Check Private Container ${USER_KEY} ${FILE_S} ${PRIV_CID} ${OTHER_KEY}
${PRIV_CID} = Create Private Container ${USER_KEY} ${PRIV_CID} = Create Private Container ${USER_KEY}
${FILE_S} ${FILE_S_HASH} = Generate file ${COMPLEX_OBJ_SIZE} ${FILE_S} ${_} = Generate file ${COMPLEX_OBJ_SIZE}
Check Private Container ${USER_KEY} ${FILE_S} ${PRIV_CID} ${OTHER_KEY} Check Private Container ${USER_KEY} ${FILE_S} ${PRIV_CID} ${OTHER_KEY}
[Teardown] Teardown acl_basic_private_container [Teardown] Teardown acl_basic_private_container
@ -37,11 +37,13 @@ Check Private Container
[Arguments] ${USER_KEY} ${FILE_S} ${PRIV_CID} ${OTHER_KEY} [Arguments] ${USER_KEY} ${FILE_S} ${PRIV_CID} ${OTHER_KEY}
# Put # Put
${S_OID_USER} = Put Object ${USER_KEY} ${FILE_S} ${PRIV_CID} ${EMPTY} ${EMPTY} ${S_OID_USER} = Put Object ${USER_KEY} ${FILE_S} ${PRIV_CID}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Put object ${OTHER_KEY} ${FILE_S} ${PRIV_CID} ${EMPTY} ${EMPTY} ... Put object ${OTHER_KEY} ${FILE_S} ${PRIV_CID}
${S_OID_SYS_IR} = Put Object ${NEOFS_IR_WIF} ${FILE_S} ${PRIV_CID} ${EMPTY} ${EMPTY} ${S_OID_SYS_IR} = Put Object ${NEOFS_IR_WIF} ${FILE_S} ${PRIV_CID}
${S_OID_SYS_SN} = Put Object ${NEOFS_SN_WIF} ${FILE_S} ${PRIV_CID} ${EMPTY} ${EMPTY} ${S_OID_SYS_SN} = Put Object ${NEOFS_SN_WIF} ${FILE_S} ${PRIV_CID}
Sleep 5s
# Get # Get
Get Object ${USER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} s_file_read Get Object ${USER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} s_file_read
@ -68,26 +70,26 @@ Check Private Container
# Search # Search
@{S_OBJ_PRIV} = Create List ${S_OID_USER} ${S_OID_SYS_SN} ${S_OID_SYS_IR} @{S_OBJ_PRIV} = Create List ${S_OID_USER} ${S_OID_SYS_SN} ${S_OID_SYS_IR}
Search Object ${USER_KEY} ${PRIV_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_PRIV} Search Object ${USER_KEY} ${PRIV_CID} keys=--root expected_objects_list=${S_OBJ_PRIV}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Search object ${OTHER_KEY} ${PRIV_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_PRIV} ... Search object ${OTHER_KEY} ${PRIV_CID} keys=--root expected_objects_list=${S_OBJ_PRIV}
Search Object ${NEOFS_IR_WIF} ${PRIV_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_PRIV} Search Object ${NEOFS_IR_WIF} ${PRIV_CID} keys=--root expected_objects_list=${S_OBJ_PRIV}
Search Object ${NEOFS_SN_WIF} ${PRIV_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_PRIV} Search Object ${NEOFS_SN_WIF} ${PRIV_CID} keys=--root expected_objects_list=${S_OBJ_PRIV}
# Head # Head
Head Object ${USER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} ${EMPTY} Head Object ${USER_KEY} ${PRIV_CID} ${S_OID_USER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Head object ${OTHER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} ${EMPTY} ... Head object ${OTHER_KEY} ${PRIV_CID} ${S_OID_USER}
Head Object ${NEOFS_IR_WIF} ${PRIV_CID} ${S_OID_USER} ${EMPTY} ${EMPTY} Head Object ${NEOFS_IR_WIF} ${PRIV_CID} ${S_OID_USER}
Head Object ${NEOFS_SN_WIF} ${PRIV_CID} ${S_OID_USER} ${EMPTY} ${EMPTY} Head Object ${NEOFS_SN_WIF} ${PRIV_CID} ${S_OID_USER}
# Delete # Delete
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${OTHER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} ... Delete object ${OTHER_KEY} ${PRIV_CID} ${S_OID_USER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${NEOFS_IR_WIF} ${PRIV_CID} ${S_OID_USER} ${EMPTY} ... Delete object ${NEOFS_IR_WIF} ${PRIV_CID} ${S_OID_USER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${NEOFS_SN_WIF} ${PRIV_CID} ${S_OID_USER} ${EMPTY} ... Delete object ${NEOFS_SN_WIF} ${PRIV_CID} ${S_OID_USER}
Delete Object ${USER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} Delete Object ${USER_KEY} ${PRIV_CID} ${S_OID_USER}

View file

@ -11,16 +11,20 @@ Resource common_steps_acl_bearer.robot
Resource payment_operations.robot Resource payment_operations.robot
Resource setup_teardown.robot Resource setup_teardown.robot
*** Variables ***
&{USER_HEADER} = key1=1 key2=abc
&{USER_HEADER_DEL} = key1=del key2=del
&{ANOTHER_HEADER} = key1=oth key2=oth
*** Test cases *** *** Test cases ***
BearerToken Operations BearerToken Operations
[Documentation] Testcase to validate NeoFS operations with BearerToken. [Documentation] Testcase to validate NeoFS operations with BearerToken.
[Tags] ACL NeoFS NeoCLI BearerToken [Tags] ACL BearerToken
[Timeout] 20 min [Timeout] 20 min
[Setup] Setup [Setup] Setup
${WALLET} ${ADDR} ${USER_KEY} = Prepare Wallet And Deposit ${_} ${_} ${USER_KEY} = Prepare Wallet And Deposit
Prepare eACL Role rules Prepare eACL Role rules
Log Check Bearer token with simple object Log Check Bearer token with simple object
@ -42,16 +46,16 @@ Check eACL Deny and Allow All Bearer
[Arguments] ${USER_KEY} ${FILE_S} [Arguments] ${USER_KEY} ${FILE_S}
${CID} = Create Container Public ${USER_KEY} ${CID} = Create Container Public ${USER_KEY}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} ${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER_DEL}
@{S_OBJ_H} = Create List ${S_OID_USER} @{S_OBJ_H} = Create List ${S_OID_USER}
Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} Head object ${USER_KEY} ${CID} ${S_OID_USER}
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Delete object ${USER_KEY} ${CID} ${D_OID_USER} ${EMPTY} Delete object ${USER_KEY} ${CID} ${D_OID_USER}
Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_USER} Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_USER}
@ -71,23 +75,22 @@ Check eACL Deny and Allow All Bearer
${EACL_TOKEN} = Form BearerToken File ${USER_KEY} ${CID} ${eACL_gen} ${EACL_TOKEN} = Form BearerToken File ${USER_KEY} ${CID} ${eACL_gen}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ... Put object ${USER_KEY} ${FILE_S} ${CID}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl ... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} ... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ... Head object ${USER_KEY} ${CID} ${S_OID_USER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 ... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ... Delete object ${USER_KEY} ${CID} ${S_OID_USER}
# All operations on object should be passed with bearer token # All operations on object should be passed with bearer token
Put object ${USER_KEY} ${FILE_S} ${CID} ${EACL_TOKEN} ${FILE_OTH_HEADER} Put object ${USER_KEY} ${FILE_S} ${CID} bearer=${EACL_TOKEN}
Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} local_file_eacl Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} local_file_eacl
Search object ${USER_KEY} ${CID} ${EMPTY} ${EACL_TOKEN} ${FILE_USR_HEADER} ${S_OBJ_H} Search object ${USER_KEY} ${CID} ${EMPTY} ${EACL_TOKEN} ${USER_HEADER} ${S_OBJ_H}
Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} Head object ${USER_KEY} ${CID} ${S_OID_USER} bearer_token=${EACL_TOKEN}
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EACL_TOKEN} 0:256 Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EACL_TOKEN} 0:256
Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} Delete object ${USER_KEY} ${CID} ${S_OID_USER} bearer=${EACL_TOKEN}

View file

@ -13,17 +13,19 @@ Resource setup_teardown.robot
*** Variables *** *** Variables ***
${SYSTEM_KEY} = ${NEOFS_IR_WIF} ${SYSTEM_KEY} = ${NEOFS_IR_WIF}
&{USER_HEADER} = key1=1 key2=abc
&{ANOTHER_HEADER} = key1=oth key2=oth
*** Test cases *** *** Test cases ***
BearerToken Operations for Сompound Operations BearerToken Operations for Сompound Operations
[Documentation] Testcase to validate NeoFS operations with BearerToken for Сompound Operations. [Documentation] Testcase to validate NeoFS operations with BearerToken for Сompound Operations.
[Tags] ACL NeoFSCLI BearerToken [Tags] ACL BearerToken
[Timeout] 20 min [Timeout] 20 min
[Setup] Setup [Setup] Setup
${WALLET} ${ADDR} ${USER_KEY} = Prepare Wallet And Deposit ${_} ${_} ${USER_KEY} = Prepare Wallet And Deposit
${WALLET_OTH} ${ADDR_OTH} ${OTHER_KEY} = Prepare Wallet And Deposit ${_} ${_} ${OTHER_KEY} = Prepare Wallet And Deposit
Prepare eACL Role rules Prepare eACL Role rules
Log Check Bearer token with simple object Log Check Bearer token with simple object
@ -56,11 +58,11 @@ Check Bearer Сompound Get
[Arguments] ${KEY} ${DENY_GROUP} ${DENY_EACL} ${FILE_S} ${USER_KEY} [Arguments] ${KEY} ${DENY_GROUP} ${DENY_EACL} ${FILE_S} ${USER_KEY}
${CID} = Create Container Public ${USER_KEY} ${CID} = Create Container Public ${USER_KEY}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
@{S_OBJ_H} = Create List ${S_OID_USER} @{S_OBJ_H} = Create List ${S_OID_USER}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} Put object ${KEY} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Set eACL ${USER_KEY} ${CID} ${DENY_EACL} Set eACL ${USER_KEY} ${CID} ${DENY_EACL}
@ -74,7 +76,7 @@ Check Bearer Сompound Get
${EACL_TOKEN} = Form BearerToken File ${USER_KEY} ${CID} ${eACL_gen} ${EACL_TOKEN} = Form BearerToken File ${USER_KEY} ${CID} ${eACL_gen}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Head object ${KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} ... Head object ${KEY} ${CID} ${S_OID_USER} bearer_token=${EACL_TOKEN}
Get object ${KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} local_file_eacl Get object ${KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} local_file_eacl
IF "${KEY}" == "${NEOFS_IR_WIF}" IF "${KEY}" == "${NEOFS_IR_WIF}"
@ -90,14 +92,14 @@ Check Bearer Сompound Delete
[Arguments] ${KEY} ${DENY_GROUP} ${DENY_EACL} ${FILE_S} ${USER_KEY} [Arguments] ${KEY} ${DENY_GROUP} ${DENY_EACL} ${FILE_S} ${USER_KEY}
${CID} = Create Container Public ${USER_KEY} ${CID} = Create Container Public ${USER_KEY}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${EMPTY} ${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID}
Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} Put object ${KEY} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
IF "${KEY}" == "${NEOFS_IR_WIF}" IF "${KEY}" == "${NEOFS_IR_WIF}"
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${KEY} ${CID} ${D_OID_USER} ${EMPTY} ... Delete object ${KEY} ${CID} ${D_OID_USER}
ELSE ELSE
Delete object ${KEY} ${CID} ${D_OID_USER} ${EMPTY} Delete object ${KEY} ${CID} ${D_OID_USER}
END END
Set eACL ${USER_KEY} ${CID} ${DENY_EACL} Set eACL ${USER_KEY} ${CID} ${DENY_EACL}
@ -112,11 +114,11 @@ Check Bearer Сompound Delete
${EACL_TOKEN} = Form BearerToken File ${USER_KEY} ${CID} ${eACL_gen} ${EACL_TOKEN} = Form BearerToken File ${USER_KEY} ${CID} ${eACL_gen}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Head object ${KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} ... Head object ${KEY} ${CID} ${S_OID_USER} bearer_token=${EACL_TOKEN}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Put object ${KEY} ${FILE_S} ${CID} ${EACL_TOKEN} ${FILE_OTH_HEADER} ... Put object ${KEY} ${FILE_S} ${CID} bearer=${EACL_TOKEN} user_headers=${ANOTHER_HEADER}
Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} Delete object ${USER_KEY} ${CID} ${S_OID_USER} bearer=${EACL_TOKEN}
@ -125,8 +127,8 @@ Check Bearer Сompound Get Range Hash
${CID} = Create Container Public ${USER_KEY} ${CID} = Create Container Public ${USER_KEY}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} Put object ${KEY} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
Get Range Hash ${NEOFS_SN_WIF} ${CID} ${S_OID_USER} ${EMPTY} 0:256 Get Range Hash ${NEOFS_SN_WIF} ${CID} ${S_OID_USER} ${EMPTY} 0:256
Set eACL ${USER_KEY} ${CID} ${DENY_EACL} Set eACL ${USER_KEY} ${CID} ${DENY_EACL}

View file

@ -11,11 +11,15 @@ Resource common_steps_acl_bearer.robot
Resource payment_operations.robot Resource payment_operations.robot
Resource setup_teardown.robot Resource setup_teardown.robot
*** Variables ***
&{USER_HEADER} = key1=1 key2=abc
&{USER_HEADER_DEL} = key1=del key2=del
&{ANOTHER_HEADER} = key1=oth key2=oth
*** Test cases *** *** Test cases ***
BearerToken Operations with Filter OID Equal BearerToken Operations with Filter OID Equal
[Documentation] Testcase to validate NeoFS operations with BearerToken with Filter OID Equal. [Documentation] Testcase to validate NeoFS operations with BearerToken with Filter OID Equal.
[Tags] ACL NeoFS NeoCLI BearerToken [Tags] ACL BearerToken
[Timeout] 20 min [Timeout] 20 min
[Setup] Setup [Setup] Setup
@ -42,17 +46,17 @@ Check eACL Deny and Allow All Bearer Filter OID Equal
[Arguments] ${USER_KEY} ${FILE_S} [Arguments] ${USER_KEY} ${FILE_S}
${CID} = Create Container Public ${USER_KEY} ${CID} = Create Container Public ${USER_KEY}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${EMPTY} ${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID}
${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} ${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER_DEL}
@{S_OBJ_H} = Create List ${S_OID_USER} @{S_OBJ_H} = Create List ${S_OID_USER}
Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} Head object ${USER_KEY} ${CID} ${S_OID_USER}
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Delete object ${USER_KEY} ${CID} ${D_OID_USER} ${EMPTY} Delete object ${USER_KEY} ${CID} ${D_OID_USER}
Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_USER} Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_USER}
@ -74,28 +78,28 @@ Check eACL Deny and Allow All Bearer Filter OID Equal
${EACL_TOKEN} = Form BearerToken File ${USER_KEY} ${CID} ${eACL_gen} ${EACL_TOKEN} = Form BearerToken File ${USER_KEY} ${CID} ${eACL_gen}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ... Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl ... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} ... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ... Head object ${USER_KEY} ${CID} ${S_OID_USER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 ... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ... Delete object ${USER_KEY} ${CID} ${S_OID_USER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Search object ${USER_KEY} ${CID} ${EMPTY} ${EACL_TOKEN} ${FILE_USR_HEADER} ${S_OBJ_H} ... Search object ${USER_KEY} ${CID} ${EMPTY} ${EACL_TOKEN} ${USER_HEADER} ${S_OBJ_H}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EACL_TOKEN} ${FILE_OTH_HEADER} ... Put object ${USER_KEY} ${FILE_S} ${CID} bearer=${EACL_TOKEN} user_headers=${ANOTHER_HEADER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get object ${USER_KEY} ${CID} ${S_OID_USER_2} ${EACL_TOKEN} local_file_eacl ... Get object ${USER_KEY} ${CID} ${S_OID_USER_2} ${EACL_TOKEN} local_file_eacl
Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} local_file_eacl Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} local_file_eacl
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EACL_TOKEN} 0:256 Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EACL_TOKEN} 0:256
Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} Head object ${USER_KEY} ${CID} ${S_OID_USER} bearer_token=${EACL_TOKEN}
Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} Delete object ${USER_KEY} ${CID} ${S_OID_USER} bearer=${EACL_TOKEN}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${USER_KEY} ${CID} ${D_OID_USER} ${EACL_TOKEN} ... Delete object ${USER_KEY} ${CID} ${D_OID_USER} bearer=${EACL_TOKEN}

View file

@ -12,15 +12,18 @@ Resource payment_operations.robot
Resource setup_teardown.robot Resource setup_teardown.robot
*** Variables ***
&{USER_HEADER} = key1=1 key2=abc
*** Test cases *** *** Test cases ***
BearerToken Operations with Filter OID NotEqual BearerToken Operations with Filter OID NotEqual
[Documentation] Testcase to validate NeoFS operations with BearerToken with Filter OID NotEqual. [Documentation] Testcase to validate NeoFS operations with BearerToken with Filter OID NotEqual.
[Tags] ACL NeoFSCLI BearerToken [Tags] ACL BearerToken
[Timeout] 20 min [Timeout] 20 min
[Setup] Setup [Setup] Setup
${WALLET} ${ADDR} ${USER_KEY} = Prepare Wallet And Deposit ${_} ${_} ${USER_KEY} = Prepare Wallet And Deposit
Prepare eACL Role rules Prepare eACL Role rules
Log Check Bearer token with simple object Log Check Bearer token with simple object
@ -41,17 +44,17 @@ Check eACL Deny and Allow All Bearer Filter OID NotEqual
[Arguments] ${USER_KEY} ${FILE_S} [Arguments] ${USER_KEY} ${FILE_S}
${CID} = Create Container Public ${USER_KEY} ${CID} = Create Container Public ${USER_KEY}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${EMPTY} ${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID}
${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} ${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID}
@{S_OBJ_H} = Create List ${S_OID_USER} @{S_OBJ_H} = Create List ${S_OID_USER}
Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} Put object ${USER_KEY} ${FILE_S} ${CID}
Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} Head object ${USER_KEY} ${CID} ${S_OID_USER}
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Delete object ${USER_KEY} ${CID} ${D_OID_USER} ${EMPTY} Delete object ${USER_KEY} ${CID} ${D_OID_USER}
Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_USER} Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_USER}
@ -73,19 +76,19 @@ Check eACL Deny and Allow All Bearer Filter OID NotEqual
${EACL_TOKEN} = Form BearerToken File ${USER_KEY} ${CID} ${eACL_gen} ${EACL_TOKEN} = Form BearerToken File ${USER_KEY} ${CID} ${eACL_gen}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ... Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl ... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} ... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ... Head object ${USER_KEY} ${CID} ${S_OID_USER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 ... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ... Delete object ${USER_KEY} ${CID} ${S_OID_USER}
Put object ${USER_KEY} ${FILE_S} ${CID} ${EACL_TOKEN} ${FILE_OTH_HEADER} Put object ${USER_KEY} ${FILE_S} ${CID} bearer=${EACL_TOKEN}
Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} local_file_eacl Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} local_file_eacl
Run Keyword And Expect Error * Run Keyword And Expect Error *
@ -95,14 +98,14 @@ Check eACL Deny and Allow All Bearer Filter OID NotEqual
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get Range ${USER_KEY} ${CID} ${S_OID_USER_2} s_get_range ${EACL_TOKEN} 0:256 ... Get Range ${USER_KEY} ${CID} ${S_OID_USER_2} s_get_range ${EACL_TOKEN} 0:256
Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} Head object ${USER_KEY} ${CID} ${S_OID_USER} bearer_token=${EACL_TOKEN}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Head object ${USER_KEY} ${CID} ${S_OID_USER_2} ${EACL_TOKEN} ... Head object ${USER_KEY} ${CID} ${S_OID_USER_2} bearer_token=${EACL_TOKEN}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Search object ${USER_KEY} ${CID} ${EMPTY} ${EACL_TOKEN} ${FILE_USR_HEADER} ${S_OBJ_H} ... Search object ${USER_KEY} ${CID} ${EMPTY} ${EACL_TOKEN} ${USER_HEADER} ${S_OBJ_H}
Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} Delete object ${USER_KEY} ${CID} ${S_OID_USER} bearer=${EACL_TOKEN}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${USER_KEY} ${CID} ${D_OID_USER_2} ${EACL_TOKEN} ... Delete object ${USER_KEY} ${CID} ${D_OID_USER_2} bearer=${EACL_TOKEN}

View file

@ -11,15 +11,20 @@ Resource common_steps_acl_bearer.robot
Resource payment_operations.robot Resource payment_operations.robot
Resource setup_teardown.robot Resource setup_teardown.robot
*** Variables ***
&{USER_HEADER} = key1=1 key2=abc
&{USER_HEADER_DEL} = key1=del key2=del
&{ANOTHER_HEADER} = key1=oth key2=oth
*** Test cases *** *** Test cases ***
BearerToken Operations with Filter UserHeader Equal BearerToken Operations with Filter UserHeader Equal
[Documentation] Testcase to validate NeoFS operations with BearerToken with Filter UserHeader Equal. [Documentation] Testcase to validate NeoFS operations with BearerToken with Filter UserHeader Equal.
[Tags] ACL NeoFSCLI BearerToken [Tags] ACL BearerToken
[Timeout] 20 min [Timeout] 20 min
[Setup] Setup [Setup] Setup
${WALLET} ${ADDR} ${USER_KEY} = Prepare Wallet And Deposit ${_} ${_} ${USER_KEY} = Prepare Wallet And Deposit
Prepare eACL Role rules Prepare eACL Role rules
Log Check Bearer token with simple object Log Check Bearer token with simple object
@ -37,17 +42,17 @@ BearerToken Operations with Filter UserHeader Equal
Check eACL Deny and Allow All Bearer Filter UserHeader Equal Check eACL Deny and Allow All Bearer Filter UserHeader Equal
[Arguments] ${USER_KEY} ${FILE_S} [Arguments] ${USER_KEY} ${FILE_S}
${CID} = Create Container Public ${USER_KEY} ${CID} = Create Container Public ${USER_KEY}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${EMPTY} ${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID}
${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} ${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER_DEL}
@{S_OBJ_H} = Create List ${S_OID_USER} @{S_OBJ_H} = Create List ${S_OID_USER}
Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} Head object ${USER_KEY} ${CID} ${S_OID_USER}
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Delete object ${USER_KEY} ${CID} ${D_OID_USER} ${EMPTY} Delete object ${USER_KEY} ${CID} ${D_OID_USER}
Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_USER} Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_USER}
@ -69,22 +74,22 @@ Check eACL Deny and Allow All Bearer Filter UserHeader Equal
${EACL_TOKEN} = Form BearerToken File ${USER_KEY} ${CID} ${eACL_gen} ${EACL_TOKEN} = Form BearerToken File ${USER_KEY} ${CID} ${eACL_gen}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ... Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl ... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} ... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ... Head object ${USER_KEY} ${CID} ${S_OID_USER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 ... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ... Delete object ${USER_KEY} ${CID} ${S_OID_USER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Search object ${USER_KEY} ${CID} ${EMPTY} ${EACL_TOKEN} ${FILE_USR_HEADER} ${S_OBJ_H} ... Search object ${USER_KEY} ${CID} ${EMPTY} ${EACL_TOKEN} ${USER_HEADER} ${S_OBJ_H}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EACL_TOKEN} ${FILE_OTH_HEADER} ... Put object ${USER_KEY} ${FILE_S} ${CID} bearer=${EACL_TOKEN} user_headers=${ANOTHER_HEADER}
Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} local_file_eacl Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} local_file_eacl
Run Keyword And Expect Error * Run Keyword And Expect Error *
@ -96,12 +101,12 @@ Check eACL Deny and Allow All Bearer Filter UserHeader Equal
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get Range Hash ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} 0:256 ... Get Range Hash ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} 0:256
Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} Head object ${USER_KEY} ${CID} ${S_OID_USER} bearer_token=${EACL_TOKEN}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Head object ${USER_KEY} ${CID} ${S_OID_USER_2} ${EACL_TOKEN} ... Head object ${USER_KEY} ${CID} ${S_OID_USER_2} bearer_token=${EACL_TOKEN}
# Delete can not be filtered by UserHeader. # Delete can not be filtered by UserHeader.
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} ... Delete object ${USER_KEY} ${CID} ${S_OID_USER} bearer=${EACL_TOKEN}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${USER_KEY} ${CID} ${S_OID_USER_2} ${EACL_TOKEN} ... Delete object ${USER_KEY} ${CID} ${S_OID_USER_2} bearer=${EACL_TOKEN}

View file

@ -11,15 +11,20 @@ Resource eacl_tables.robot
Resource payment_operations.robot Resource payment_operations.robot
Resource setup_teardown.robot Resource setup_teardown.robot
*** Variables ***
&{USER_HEADER} = key1=1 key2=abc
&{USER_HEADER_DEL} = key1=del key2=del
&{ANOTHER_HEADER} = key1=oth key2=oth
*** Test cases *** *** Test cases ***
BearerToken Operations Filter UserHeader NotEqual BearerToken Operations Filter UserHeader NotEqual
[Documentation] Testcase to validate NeoFS operations with BearerToken Filter UserHeader NotEqual. [Documentation] Testcase to validate NeoFS operations with BearerToken Filter UserHeader NotEqual.
[Tags] ACL NeoFSCLI BearerToken [Tags] ACL BearerToken
[Timeout] 20 min [Timeout] 20 min
[Setup] Setup [Setup] Setup
${WALLET} ${ADDR} ${USER_KEY} = Prepare Wallet And Deposit ${_} ${_} ${USER_KEY} = Prepare Wallet And Deposit
Prepare eACL Role rules Prepare eACL Role rules
Log Check Bearer token with simple object Log Check Bearer token with simple object
@ -38,17 +43,17 @@ Check eACL Deny and Allow All Bearer Filter UserHeader NotEqual
[Arguments] ${USER_KEY} ${FILE_S} [Arguments] ${USER_KEY} ${FILE_S}
${CID} = Create Container Public ${USER_KEY} ${CID} = Create Container Public ${USER_KEY}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} ${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER_DEL}
@{S_OBJ_H} = Create List ${S_OID_USER_2} @{S_OBJ_H} = Create List ${S_OID_USER_2}
Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} Put object ${USER_KEY} ${FILE_S} ${CID}
Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} Head object ${USER_KEY} ${CID} ${S_OID_USER}
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Delete object ${USER_KEY} ${CID} ${D_OID_USER} ${EMPTY} Delete object ${USER_KEY} ${CID} ${D_OID_USER}
Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_USER} Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_USER}
@ -70,13 +75,13 @@ Check eACL Deny and Allow All Bearer Filter UserHeader NotEqual
${EACL_TOKEN} = Form BearerToken File ${USER_KEY} ${CID} ${eACL_gen} ${EACL_TOKEN} = Form BearerToken File ${USER_KEY} ${CID} ${eACL_gen}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ... Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl ... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} ... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ... Head object ${USER_KEY} ${CID} ${S_OID_USER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 ... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Run Keyword And Expect Error * Run Keyword And Expect Error *
@ -84,10 +89,10 @@ Check eACL Deny and Allow All Bearer Filter UserHeader NotEqual
# Search can not use filter by headers # Search can not use filter by headers
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Search object ${USER_KEY} ${CID} ${EMPTY} ${EACL_TOKEN} ${FILE_USR_HEADER} ${S_OBJ_H} ... Search object ${USER_KEY} ${CID} ${EMPTY} ${EACL_TOKEN} ${USER_HEADER} ${S_OBJ_H}
# Different behaviour for big and small objects! # Different behaviour for big and small objects!
# Put object ${USER_KEY} ${FILE_S} ${CID} ${EACL_TOKEN} ${FILE_OTH_HEADER} # Put object ${USER_KEY} ${FILE_S} ${CID} ${EACL_TOKEN} ${ANOTHER_HEADER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EACL_TOKEN} ${EMPTY} ... Put object ${USER_KEY} ${FILE_S} ${CID} ${EACL_TOKEN} ${EMPTY}

View file

@ -14,12 +14,12 @@ Resource setup_teardown.robot
*** Test cases *** *** Test cases ***
BearerToken Operations for Inaccessible Container BearerToken Operations for Inaccessible Container
[Documentation] Testcase to validate NeoFS operations with BearerToken for Inaccessible Container. [Documentation] Testcase to validate NeoFS operations with BearerToken for Inaccessible Container.
[Tags] ACL NeoFSCLI BearerToken [Tags] ACL BearerToken
[Timeout] 20 min [Timeout] 20 min
[Setup] Setup [Setup] Setup
${WALLET} ${ADDR} ${USER_KEY} = Prepare Wallet And Deposit ${_} ${_} ${USER_KEY} = Prepare Wallet And Deposit
Prepare eACL Role rules Prepare eACL Role rules
Log Check Bearer token with simple object Log Check Bearer token with simple object
@ -40,17 +40,17 @@ Check Container Inaccessible and Allow All Bearer
${CID} = Create Container Inaccessible ${USER_KEY} ${CID} = Create Container Inaccessible ${USER_KEY}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ... Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${FILE_USR_HEADER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl ... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ... Head object ${USER_KEY} ${CID} ${S_OID_USER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 ... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ... Delete object ${USER_KEY} ${CID} ${S_OID_USER}
${rule1} = Create Dictionary Operation=PUT Access=ALLOW Role=USER ${rule1} = Create Dictionary Operation=PUT Access=ALLOW Role=USER
${rule2} = Create Dictionary Operation=SEARCH Access=ALLOW Role=USER ${rule2} = Create Dictionary Operation=SEARCH Access=ALLOW Role=USER
@ -59,6 +59,6 @@ Check Container Inaccessible and Allow All Bearer
${EACL_TOKEN} = Form BearerToken File ${USER_KEY} ${CID} ${eACL_gen} ${EACL_TOKEN} = Form BearerToken File ${USER_KEY} ${CID} ${eACL_gen}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EACL_TOKEN} ${FILE_USR_HEADER} ... Put object ${USER_KEY} ${FILE_S} ${CID} bearer=${EACL_TOKEN} user_headers=${FILE_USR_HEADER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Search object ${USER_KEY} ${CID} ${EMPTY} ${EACL_TOKEN} ${FILE_USR_HEADER} ... Search object ${USER_KEY} ${CID} ${EMPTY} ${EACL_TOKEN} ${FILE_USR_HEADER}

View file

@ -11,15 +11,20 @@ Resource common_steps_acl_bearer.robot
Resource payment_operations.robot Resource payment_operations.robot
Resource setup_teardown.robot Resource setup_teardown.robot
*** Variables ***
&{USER_HEADER} = key1=1 key2=abc
&{USER_HEADER_DEL} = key1=del key2=del
&{ANOTHER_HEADER} = key1=oth key2=oth
*** Test cases *** *** Test cases ***
BearerToken Operations BearerToken Operations
[Documentation] Testcase to validate NeoFS operations with BearerToken. [Documentation] Testcase to validate NeoFS operations with BearerToken.
[Tags] ACL NeoFS NeoCLI BearerToken [Tags] ACL BearerToken
[Timeout] 20 min [Timeout] 20 min
[Setup] Setup [Setup] Setup
${WALLET} ${ADDR} ${USER_KEY} = Prepare Wallet And Deposit ${_} ${_} ${USER_KEY} = Prepare Wallet And Deposit
Prepare eACL Role rules Prepare eACL Role rules
Log Check Bearer token with simple object Log Check Bearer token with simple object
@ -40,9 +45,9 @@ Check eACL Allow All Bearer Filter Requst Equal Deny
[Arguments] ${USER_KEY} ${FILE_S} [Arguments] ${USER_KEY} ${FILE_S}
${CID} = Create Container Public ${USER_KEY} ${CID} = Create Container Public ${USER_KEY}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${EMPTY} ${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID}
${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} ${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER_DEL}
@{S_OBJ_H} = Create List ${S_OID_USER} @{S_OBJ_H} = Create List ${S_OID_USER}
@ -58,25 +63,25 @@ Check eACL Allow All Bearer Filter Requst Equal Deny
${EACL_TOKEN} = Form BearerToken File ${USER_KEY} ${CID} ${eACL_gen} ${EACL_TOKEN} = Form BearerToken File ${USER_KEY} ${CID} ${eACL_gen}
Put object ${USER_KEY} ${FILE_S} ${CID} ${EACL_TOKEN} ${FILE_OTH_HEADER} ${EMPTY} --xhdr a=2 Put object ${USER_KEY} ${FILE_S} ${CID} bearer=${EACL_TOKEN} user_headers=${ANOTHER_HEADER} options=--xhdr a=2
Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} local_file_eacl ${EMPTY} --xhdr a=2 Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} local_file_eacl ${EMPTY} --xhdr a=2
Search object ${USER_KEY} ${CID} ${EMPTY} ${EACL_TOKEN} ${FILE_USR_HEADER} ${S_OBJ_H} --xhdr a=2 Search object ${USER_KEY} ${CID} ${EMPTY} ${EACL_TOKEN} ${USER_HEADER} ${S_OBJ_H} --xhdr a=2
Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} ${EMPTY} --xhdr a=2 Head object ${USER_KEY} ${CID} ${S_OID_USER} bearer_token=${EACL_TOKEN} options=--xhdr a=2
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EACL_TOKEN} 0:256 --xhdr a=2 Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EACL_TOKEN} 0:256 --xhdr a=2
Get Range Hash ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} 0:256 --xhdr a=2 Get Range Hash ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} 0:256 --xhdr a=2
Delete object ${USER_KEY} ${CID} ${D_OID_USER} ${EACL_TOKEN} --xhdr a=2 Delete object ${USER_KEY} ${CID} ${D_OID_USER} bearer=${EACL_TOKEN} options=--xhdr a=2
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EACL_TOKEN} ${FILE_USR_HEADER} ${EMPTY} --xhdr a=256 ... Put object ${USER_KEY} ${FILE_S} ${CID} bearer=${EACL_TOKEN} user_headers=${USER_HEADER} options=--xhdr a=256
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} local_file_eacl ${EMPTY} --xhdr a=256 ... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} local_file_eacl ${EMPTY} --xhdr a=256
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Search object ${USER_KEY} ${CID} ${EMPTY} ${EACL_TOKEN} ${FILE_USR_HEADER} ${EMPTY} --xhdr a=256 ... Search object ${USER_KEY} ${CID} ${EMPTY} ${EACL_TOKEN} ${USER_HEADER} ${EMPTY} --xhdr a=256
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} ${EMPTY} --xhdr a=256 ... Head object ${USER_KEY} ${CID} ${S_OID_USER} bearer_token=${EACL_TOKEN} options=--xhdr a=256
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EACL_TOKEN} 0:256 --xhdr a=256 ... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EACL_TOKEN} 0:256 --xhdr a=256
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get Range Hash ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} 0:256 --xhdr a=256 ... Get Range Hash ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} 0:256 --xhdr a=256
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} --xhdr a=256 ... Delete object ${USER_KEY} ${CID} ${S_OID_USER} bearer=${EACL_TOKEN} options=--xhdr a=256

View file

@ -11,16 +11,20 @@ Resource common_steps_acl_bearer.robot
Resource payment_operations.robot Resource payment_operations.robot
Resource setup_teardown.robot Resource setup_teardown.robot
*** Variables ***
&{USER_HEADER} = key1=1 key2=abc
&{USER_HEADER_DEL} = key1=del key2=del
${EACL_ERROR_MSG} = *
*** Test cases *** *** Test cases ***
BearerToken Operations with Filter Requst Equal BearerToken Operations with Filter Requst Equal
[Documentation] Testcase to validate NeoFS operations with BearerToken with Filter Requst Equal. [Documentation] Testcase to validate NeoFS operations with BearerToken with Filter Requst Equal.
[Tags] ACL NeoFSCLI BearerToken [Tags] ACL BearerToken
[Timeout] 20 min [Timeout] 20 min
[Setup] Setup [Setup] Setup
${WALLET} ${ADDR} ${USER_KEY} = Prepare Wallet And Deposit ${_} ${_} ${USER_KEY} = Prepare Wallet And Deposit
Prepare eACL Role rules Prepare eACL Role rules
Log Check Bearer token with simple object Log Check Bearer token with simple object
@ -41,17 +45,17 @@ Check eACL Deny and Allow All Bearer Filter Requst Equal
[Arguments] ${USER_KEY} ${FILE_S} [Arguments] ${USER_KEY} ${FILE_S}
${CID} = Create Container Public ${USER_KEY} ${CID} = Create Container Public ${USER_KEY}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${EMPTY} ${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID}
${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} ${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER_DEL}
@{S_OBJ_H} = Create List ${S_OID_USER} @{S_OBJ_H} = Create List ${S_OID_USER}
Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} Put object ${USER_KEY} ${FILE_S} ${CID}
Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} Head object ${USER_KEY} ${CID} ${S_OID_USER}
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Delete object ${USER_KEY} ${CID} ${D_OID_USER} ${EMPTY} Delete object ${USER_KEY} ${CID} ${D_OID_USER}
Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_USER} Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_USER}
@ -69,23 +73,23 @@ Check eACL Deny and Allow All Bearer Filter Requst Equal
${eACL_gen}= Create List ${rule1} ${rule2} ${rule3} ${rule4} ${rule5} ${rule6} ${rule7} ${eACL_gen}= Create List ${rule1} ${rule2} ${rule3} ${rule4} ${rule5} ${rule6} ${rule7}
${EACL_TOKEN} = Form BearerToken File ${USER_KEY} ${CID} ${eACL_gen} ${EACL_TOKEN} = Form BearerToken File ${USER_KEY} ${CID} ${eACL_gen}
Run Keyword And Expect Error * Run Keyword And Expect Error ${EACL_ERROR_MSG}
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ... Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
Run Keyword And Expect Error * Run Keyword And Expect Error ${EACL_ERROR_MSG}
... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl ... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Run Keyword And Expect Error * Run Keyword And Expect Error ${EACL_ERROR_MSG}
... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} ... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
Run Keyword And Expect Error * Run Keyword And Expect Error ${EACL_ERROR_MSG}
... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ... Head object ${USER_KEY} ${CID} ${S_OID_USER}
Run Keyword And Expect Error * Run Keyword And Expect Error ${EACL_ERROR_MSG}
... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 ... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Run Keyword And Expect Error * Run Keyword And Expect Error ${EACL_ERROR_MSG}
... Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ... Delete object ${USER_KEY} ${CID} ${S_OID_USER}
Put object ${USER_KEY} ${FILE_S} ${CID} ${EACL_TOKEN} ${FILE_USR_HEADER} ${EMPTY} --xhdr a=256 Put object ${USER_KEY} ${FILE_S} ${CID} bearer=${EACL_TOKEN} user_headers=${USER_HEADER} options=--xhdr a=256
Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} local_file_eacl ${EMPTY} --xhdr a=256 Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} local_file_eacl ${EMPTY} --xhdr a=256
Search object ${USER_KEY} ${CID} ${EMPTY} ${EACL_TOKEN} ${FILE_USR_HEADER} ${EMPTY} --xhdr a=256 Search object ${USER_KEY} ${CID} ${EMPTY} ${EACL_TOKEN} ${USER_HEADER} ${EMPTY} --xhdr a=256
Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} ${EMPTY} --xhdr a=256 Head object ${USER_KEY} ${CID} ${S_OID_USER} bearer_token=${EACL_TOKEN} options=--xhdr a=256
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EACL_TOKEN} 0:256 --xhdr a=256 Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EACL_TOKEN} 0:256 --xhdr a=256
Get Range Hash ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} 0:256 --xhdr a=256 Get Range Hash ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} 0:256 --xhdr a=256
Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} --xhdr a=256 Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} --xhdr a=256

View file

@ -11,6 +11,10 @@ Resource common_steps_acl_bearer.robot
Resource payment_operations.robot Resource payment_operations.robot
Resource setup_teardown.robot Resource setup_teardown.robot
*** Variables ***
&{USER_HEADER} = key1=1 key2=abc
&{USER_HEADER_DEL} = key1=del key2=del
&{ANOTHER_USER_HEADER} = key1=oth key2=oth
*** Test cases *** *** Test cases ***
BearerToken Operations with Filter Requst NotEqual BearerToken Operations with Filter Requst NotEqual
@ -40,17 +44,17 @@ Check eACL Deny and Allow All Bearer Filter Requst NotEqual
[Arguments] ${USER_KEY} ${FILE_S} [Arguments] ${USER_KEY} ${FILE_S}
${CID} = Create Container Public ${USER_KEY} ${CID} = Create Container Public ${USER_KEY}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${EMPTY} ${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID}
${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} ${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER_DEL}
@{S_OBJ_H} = Create List ${S_OID_USER} @{S_OBJ_H} = Create List ${S_OID_USER}
Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${ANOTHER_USER_HEADER}
Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} Head object ${USER_KEY} ${CID} ${S_OID_USER}
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Delete object ${USER_KEY} ${CID} ${D_OID_USER} ${EMPTY} Delete object ${USER_KEY} ${CID} ${D_OID_USER}
Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_USER} Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_USER}
@ -69,22 +73,22 @@ Check eACL Deny and Allow All Bearer Filter Requst NotEqual
${EACL_TOKEN} = Form BearerToken File ${USER_KEY} ${CID} ${eACL_gen} ${EACL_TOKEN} = Form BearerToken File ${USER_KEY} ${CID} ${eACL_gen}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ... Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl ... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
#Run Keyword And Expect Error * #Run Keyword And Expect Error *
#... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} #... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ... Head object ${USER_KEY} ${CID} ${S_OID_USER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 ... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ... Delete object ${USER_KEY} ${CID} ${S_OID_USER}
Put object ${USER_KEY} ${FILE_S} ${CID} ${EACL_TOKEN} ${FILE_USR_HEADER} ${EMPTY} --xhdr a=2 Put object ${USER_KEY} ${FILE_S} ${CID} bearer=${EACL_TOKEN} user_headers=${USER_HEADER} options=--xhdr a=2
Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} local_file_eacl ${EMPTY} --xhdr a=2 Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} local_file_eacl ${EMPTY} --xhdr a=2
Search object ${USER_KEY} ${CID} ${EMPTY} ${EACL_TOKEN} ${FILE_USR_HEADER} ${EMPTY} --xhdr a=2 Search object ${USER_KEY} ${CID} ${EMPTY} ${EACL_TOKEN} ${USER_HEADER} ${EMPTY} --xhdr a=2
Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} ${EMPTY} --xhdr a=2 Head object ${USER_KEY} ${CID} ${S_OID_USER} bearer_token=${EACL_TOKEN} options=--xhdr a=2
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EACL_TOKEN} 0:256 --xhdr a=2 Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EACL_TOKEN} 0:256 --xhdr a=2
Get Range Hash ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} 0:256 --xhdr a=2 Get Range Hash ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} 0:256 --xhdr a=2
Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_TOKEN} --xhdr a=2 Delete object ${USER_KEY} ${CID} ${S_OID_USER} bearer=${EACL_TOKEN} options=--xhdr a=2

View file

@ -13,18 +13,21 @@ Resource eacl_tables.robot
*** Variables *** *** Variables ***
${EACL_KEY} = L1FGTLE6shum3EC7mNTPArUqSCKnmtEweRzyuawtYRZwGjpeRuw1 ${EACL_KEY} = L1FGTLE6shum3EC7mNTPArUqSCKnmtEweRzyuawtYRZwGjpeRuw1
&{USER_HEADER} = key1=1 key2=abc
&{USER_HEADER_DEL} = key1=del key2=del
&{ANOTHER_HEADER} = key1=oth key2=oth
*** Test cases *** *** Test cases ***
Extended ACL Operations Extended ACL Operations
[Documentation] Testcase to validate NeoFS operations with extended ACL. [Documentation] Testcase to validate NeoFS operations with extended ACL.
[Tags] ACL eACL NeoFS NeoCLI [Tags] ACL eACL
[Timeout] 20 min [Timeout] 20 min
[Setup] Setup [Setup] Setup
${WALLET} ${ADDR} ${USER_KEY} = Prepare Wallet And Deposit ${_} ${_} ${USER_KEY} = Prepare Wallet And Deposit
${WALLET_OTH} ${ADDR_OTH} ${OTHER_KEY} = Prepare Wallet And Deposit ${_} ${_} ${OTHER_KEY} = Prepare Wallet And Deposit
Log Check extended ACL with simple object Log Check extended ACL with simple object
Generate files ${SIMPLE_OBJ_SIZE} Generate files ${SIMPLE_OBJ_SIZE}
@ -44,17 +47,17 @@ Check eACL Deny All Other and Allow All Pubkey
[Arguments] ${USER_KEY} ${FILE_S} ${OTHER_KEY} [Arguments] ${USER_KEY} ${FILE_S} ${OTHER_KEY}
${CID} = Create Container Public ${USER_KEY} ${CID} = Create Container Public ${USER_KEY}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} ${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER_DEL}
@{S_OBJ_H} = Create List ${S_OID_USER} @{S_OBJ_H} = Create List ${S_OID_USER}
Put object ${EACL_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} Put object ${EACL_KEY} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
Get object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Get object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Search object ${EACL_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} Search object ${EACL_KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
Head object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} Head object ${EACL_KEY} ${CID} ${S_OID_USER}
Get Range ${EACL_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 Get Range ${EACL_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Get Range Hash ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 Get Range Hash ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256
Delete object ${EACL_KEY} ${CID} ${D_OID_USER} ${EMPTY} Delete object ${EACL_KEY} ${CID} ${D_OID_USER}
Set eACL ${USER_KEY} ${CID} ${EACL_ALLOW_ALL_Pubkey} Set eACL ${USER_KEY} ${CID} ${EACL_ALLOW_ALL_Pubkey}
@ -64,24 +67,24 @@ Check eACL Deny All Other and Allow All Pubkey
Get eACL ${USER_KEY} ${CID} Get eACL ${USER_KEY} ${CID}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Put object ${OTHER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ... Put object ${OTHER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl ... Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Search object ${OTHER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} ... Search object ${OTHER_KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Head object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ... Head object ${OTHER_KEY} ${CID} ${S_OID_USER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get Range ${OTHER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 ... Get Range ${OTHER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get Range Hash ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 ... Get Range Hash ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ... Delete object ${OTHER_KEY} ${CID} ${S_OID_USER}
Put object ${EACL_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} Put object ${EACL_KEY} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
Get object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Get object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Search object ${EACL_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} Search object ${EACL_KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
Head object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} Head object ${EACL_KEY} ${CID} ${S_OID_USER}
Get Range ${EACL_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 Get Range ${EACL_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Get Range Hash ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 Get Range Hash ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256
Delete object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} Delete object ${EACL_KEY} ${CID} ${S_OID_USER}

View file

@ -11,6 +11,10 @@ Resource payment_operations.robot
Resource setup_teardown.robot Resource setup_teardown.robot
Resource eacl_tables.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
*** Test cases *** *** Test cases ***
Extended ACL Operations Extended ACL Operations
@ -40,23 +44,23 @@ Check eACL Deny and Allow All System
${CID} = Create Container Public ${USER_KEY} ${CID} = Create Container Public ${USER_KEY}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
${D_OID_USER_S} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} ${D_OID_USER_S} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER_DEL}
${D_OID_USER_SN} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} ${D_OID_USER_SN} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER_DEL}
@{S_OBJ_H} = Create List ${S_OID_USER} @{S_OBJ_H} = Create List ${S_OID_USER}
Put object ${NEOFS_IR_WIF} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} Put object ${NEOFS_IR_WIF} ${FILE_S} ${CID} user_headers=${ANOTHER_USER_HEADER}
Put object ${NEOFS_SN_WIF} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} Put object ${NEOFS_SN_WIF} ${FILE_S} ${CID} user_headers=${ANOTHER_USER_HEADER}
Get object ${NEOFS_IR_WIF} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Get object ${NEOFS_IR_WIF} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Get object ${NEOFS_SN_WIF} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Get object ${NEOFS_SN_WIF} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Search object ${NEOFS_IR_WIF} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} Search object ${NEOFS_IR_WIF} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
Search object ${NEOFS_SN_WIF} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} Search object ${NEOFS_SN_WIF} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
Head object ${NEOFS_IR_WIF} ${CID} ${S_OID_USER} ${EMPTY} Head object ${NEOFS_IR_WIF} ${CID} ${S_OID_USER}
Head object ${NEOFS_SN_WIF} ${CID} ${S_OID_USER} ${EMPTY} Head object ${NEOFS_SN_WIF} ${CID} ${S_OID_USER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get Range ${NEOFS_IR_WIF} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 ... Get Range ${NEOFS_IR_WIF} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
@ -67,9 +71,9 @@ Check eACL Deny and Allow All System
Get Range Hash ${NEOFS_SN_WIF} ${CID} ${S_OID_USER} ${EMPTY} 0:256 Get Range Hash ${NEOFS_SN_WIF} ${CID} ${S_OID_USER} ${EMPTY} 0:256
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${NEOFS_IR_WIF} ${CID} ${D_OID_USER_S} ${EMPTY} ... Delete object ${NEOFS_IR_WIF} ${CID} ${D_OID_USER_S}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${NEOFS_SN_WIF} ${CID} ${D_OID_USER_SN} ${EMPTY} ... Delete object ${NEOFS_SN_WIF} ${CID} ${D_OID_USER_SN}
Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_SYSTEM} Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_SYSTEM}
@ -77,9 +81,9 @@ Check eACL Deny and Allow All System
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Put object ${NEOFS_IR_WIF} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} ... Put object ${NEOFS_IR_WIF} ${FILE_S} ${CID} user_headers=${ANOTHER_USER_HEADER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Put object ${NEOFS_SN_WIF} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} ... Put object ${NEOFS_SN_WIF} ${FILE_S} ${CID} user_headers=${ANOTHER_USER_HEADER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get object ${NEOFS_IR_WIF} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl ... Get object ${NEOFS_IR_WIF} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
@ -87,15 +91,15 @@ Check eACL Deny and Allow All System
... Get object ${NEOFS_SN_WIF} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl ... Get object ${NEOFS_SN_WIF} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Search object ${NEOFS_IR_WIF} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} ... Search object ${NEOFS_IR_WIF} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Search object ${NEOFS_SN_WIF} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} ... Search object ${NEOFS_SN_WIF} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Head object ${NEOFS_IR_WIF} ${CID} ${S_OID_USER} ${EMPTY} ... Head object ${NEOFS_IR_WIF} ${CID} ${S_OID_USER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Head object ${NEOFS_SN_WIF} ${CID} ${S_OID_USER} ${EMPTY} ... Head object ${NEOFS_SN_WIF} ${CID} ${S_OID_USER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get Range ${NEOFS_IR_WIF} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 ... Get Range ${NEOFS_IR_WIF} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
@ -110,9 +114,9 @@ Check eACL Deny and Allow All System
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${NEOFS_IR_WIF} ${CID} ${S_OID_USER} ${EMPTY} ... Delete object ${NEOFS_IR_WIF} ${CID} ${S_OID_USER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${NEOFS_SN_WIF} ${CID} ${S_OID_USER} ${EMPTY} ... Delete object ${NEOFS_SN_WIF} ${CID} ${S_OID_USER}
Set eACL ${USER_KEY} ${CID} ${EACL_ALLOW_ALL_SYSTEM} Set eACL ${USER_KEY} ${CID} ${EACL_ALLOW_ALL_SYSTEM}
@ -120,23 +124,23 @@ Check eACL Deny and Allow All System
# The current ACL cache lifetime is 30 sec # The current ACL cache lifetime is 30 sec
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
Delete object ${USER_KEY} ${CID} ${D_OID_USER_S} ${EMPTY} Delete object ${USER_KEY} ${CID} ${D_OID_USER_S}
Delete object ${USER_KEY} ${CID} ${D_OID_USER_SN} ${EMPTY} Delete object ${USER_KEY} ${CID} ${D_OID_USER_SN}
${D_OID_USER_S} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} ${D_OID_USER_S} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER_DEL}
${D_OID_USER_SN} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL} ${D_OID_USER_SN} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER_DEL}
Put object ${NEOFS_IR_WIF} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} Put object ${NEOFS_IR_WIF} ${FILE_S} ${CID} user_headers=${ANOTHER_USER_HEADER}
Put object ${NEOFS_SN_WIF} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} Put object ${NEOFS_SN_WIF} ${FILE_S} ${CID} user_headers=${ANOTHER_USER_HEADER}
Get object ${NEOFS_IR_WIF} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Get object ${NEOFS_IR_WIF} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Get object ${NEOFS_SN_WIF} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Get object ${NEOFS_SN_WIF} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Search object ${NEOFS_IR_WIF} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} Search object ${NEOFS_IR_WIF} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
Search object ${NEOFS_SN_WIF} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} Search object ${NEOFS_SN_WIF} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
Head object ${NEOFS_IR_WIF} ${CID} ${S_OID_USER} ${EMPTY} Head object ${NEOFS_IR_WIF} ${CID} ${S_OID_USER}
Head object ${NEOFS_SN_WIF} ${CID} ${S_OID_USER} ${EMPTY} Head object ${NEOFS_SN_WIF} ${CID} ${S_OID_USER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get Range ${NEOFS_IR_WIF} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 ... Get Range ${NEOFS_IR_WIF} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
@ -147,6 +151,6 @@ Check eACL Deny and Allow All System
Get Range Hash ${NEOFS_SN_WIF} ${CID} ${S_OID_USER} ${EMPTY} 0:256 Get Range Hash ${NEOFS_SN_WIF} ${CID} ${S_OID_USER} ${EMPTY} 0:256
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${NEOFS_IR_WIF} ${CID} ${D_OID_USER_S} ${EMPTY} ... Delete object ${NEOFS_IR_WIF} ${CID} ${D_OID_USER_S}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${NEOFS_SN_WIF} ${CID} ${D_OID_USER_SN} ${EMPTY} ... Delete object ${NEOFS_SN_WIF} ${CID} ${D_OID_USER_SN}

View file

@ -13,18 +13,20 @@ Resource eacl_tables.robot
*** Variables *** *** Variables ***
${SYSTEM_KEY} = ${NEOFS_IR_WIF} ${SYSTEM_KEY} = ${NEOFS_IR_WIF}
&{USER_HEADER} = key1=1 key2=abc
&{ANOTHER_HEADER} = key1=oth key2=oth
*** Test cases *** *** Test cases ***
Extended ACL Operations Extended ACL Operations
[Documentation] Testcase to validate NeoFS operations with extended ACL. [Documentation] Testcase to validate NeoFS operations with extended ACL.
[Tags] ACL eACL NeoFS NeoCLI [Tags] ACL eACL
[Timeout] 20 min [Timeout] 20 min
[Setup] Setup [Setup] Setup
${WALLET} ${ADDR} ${USER_KEY} = Prepare Wallet And Deposit ${_} ${_} ${USER_KEY} = Prepare Wallet And Deposit
${WALLET_OTH} ${ADDR_OTH} ${OTHER_KEY} = Prepare Wallet And Deposit ${_} ${_} ${OTHER_KEY} = Prepare Wallet And Deposit
Log Check extended ACL with simple object Log Check extended ACL with simple object
Generate files ${SIMPLE_OBJ_SIZE} Generate files ${SIMPLE_OBJ_SIZE}
@ -60,8 +62,8 @@ Check eACL Сompound Get
${CID} = Create Container Public ${USER_KEY} ${CID} = Create Container Public ${USER_KEY}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} Put object ${KEY} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Set eACL ${USER_KEY} ${CID} ${DENY_EACL} Set eACL ${USER_KEY} ${CID} ${DENY_EACL}
@ -69,7 +71,7 @@ Check eACL Сompound Get
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Head object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} ... Head object ${KEY} ${CID} ${S_OID_USER}
Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
IF "${KEY}" == "${NEOFS_IR_WIF}" IF "${KEY}" == "${NEOFS_IR_WIF}"
@ -86,14 +88,14 @@ Check eACL Сompound Delete
${CID} = Create Container Public ${USER_KEY} ${CID} = Create Container Public ${USER_KEY}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${EMPTY} ${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID}
Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} Put object ${KEY} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
IF "${KEY}" == "${NEOFS_IR_WIF}" IF "${KEY}" == "${NEOFS_IR_WIF}"
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${KEY} ${CID} ${D_OID_USER} ${EMPTY} ... Delete object ${KEY} ${CID} ${D_OID_USER}
ELSE ELSE
Delete object ${KEY} ${CID} ${D_OID_USER} ${EMPTY} Delete object ${KEY} ${CID} ${D_OID_USER}
END END
Set eACL ${USER_KEY} ${CID} ${DENY_EACL} Set eACL ${USER_KEY} ${CID} ${DENY_EACL}
@ -102,14 +104,14 @@ Check eACL Сompound Delete
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT} Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Head object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} ... Head object ${KEY} ${CID} ${S_OID_USER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} ... Put object ${KEY} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
IF "${KEY}" == "${NEOFS_IR_WIF}" IF "${KEY}" == "${NEOFS_IR_WIF}"
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} ... Delete object ${KEY} ${CID} ${S_OID_USER}
ELSE ELSE
Delete object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} Delete object ${KEY} ${CID} ${S_OID_USER}
END END
@ -119,8 +121,8 @@ Check eACL Сompound Get Range Hash
${CID} = Create Container Public ${USER_KEY} ${CID} = Create Container Public ${USER_KEY}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} Put object ${KEY} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
Get Range Hash ${NEOFS_SN_WIF} ${CID} ${S_OID_USER} ${EMPTY} 0:256 Get Range Hash ${NEOFS_SN_WIF} ${CID} ${S_OID_USER} ${EMPTY} 0:256
Set eACL ${USER_KEY} ${CID} ${DENY_EACL} Set eACL ${USER_KEY} ${CID} ${DENY_EACL}

View file

@ -14,17 +14,19 @@ Resource eacl_tables.robot
*** Variables *** *** Variables ***
${PATH} = testfile ${PATH} = testfile
&{USER_HEADER} = key1=1 key2=abc
&{ANOTHER_HEADER} = key1=oth key2=oth
*** Test cases *** *** Test cases ***
Extended ACL Operations Extended ACL Operations
[Documentation] Testcase to validate NeoFS operations with extended ACL. [Documentation] Testcase to validate NeoFS operations with extended ACL.
[Tags] ACL eACL NeoFS NeoCLI [Tags] ACL eACL
[Timeout] 20 min [Timeout] 20 min
[Setup] Setup [Setup] Setup
${WALLET} ${ADDR} ${USER_KEY} = Prepare Wallet And Deposit ${_} ${_} ${USER_KEY} = Prepare Wallet And Deposit
${WALLET_OTH} ${ADDR_OTH} ${OTHER_KEY} = Prepare Wallet And Deposit ${_} ${_} ${OTHER_KEY} = Prepare Wallet And Deposit
Log Check extended ACL with simple object Log Check extended ACL with simple object
Generate files ${SIMPLE_OBJ_SIZE} Generate files ${SIMPLE_OBJ_SIZE}
@ -50,15 +52,9 @@ Check Filters
Check eACL MatchType String Equal Request Deny Check eACL MatchType String Equal Request Deny
[Arguments] ${USER_KEY} ${OTHER_KEY} [Arguments] ${USER_KEY} ${OTHER_KEY}
${CID} = Create Container Public ${USER_KEY} ${CID} = Create Container Public ${USER_KEY}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
${HEADER} = Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} json_output=True
&{HEADER_DICT} = Decode Object System Header Json ${HEADER}
Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${PATH} Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${PATH}
${ID_value} = Get From Dictionary ${HEADER_DICT} ID
Set eACL ${USER_KEY} ${CID} ${EACL_XHEADER_DENY_ALL} Set eACL ${USER_KEY} ${CID} ${EACL_XHEADER_DENY_ALL}
# The current ACL cache lifetime is 30 sec # The current ACL cache lifetime is 30 sec
@ -69,13 +65,13 @@ Check eACL MatchType String Equal Request Deny
Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${PATH} ${EMPTY} --xhdr a=256 Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${PATH} ${EMPTY} --xhdr a=256
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Put object ${OTHER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} ${EMPTY} --xhdr a=2 ... Put object ${OTHER_KEY} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER} options=--xhdr a=2
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${PATH} ${EMPTY} --xhdr a=2 ... Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${PATH} ${EMPTY} --xhdr a=2
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Search object ${OTHER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${EMPTY} --xhdr a=2 ... Search object ${OTHER_KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${EMPTY} --xhdr a=2
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Head object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${EMPTY} --xhdr a=2 ... Head object ${OTHER_KEY} ${CID} ${S_OID_USER} options=--xhdr a=2
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get Range ${OTHER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 --xhdr a="2" ... Get Range ${OTHER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 --xhdr a="2"
Run Keyword And Expect Error * Run Keyword And Expect Error *
@ -83,28 +79,22 @@ Check eACL MatchType String Equal Request Deny
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} --xhdr a=2 ... Delete object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} --xhdr a=2
Put object ${OTHER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} ${EMPTY} --xhdr a=256 Put object ${OTHER_KEY} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER} options=--xhdr a=256
Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${PATH} ${EMPTY} --xhdr a=* Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${PATH} ${EMPTY} --xhdr a=*
Search object ${OTHER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${EMPTY} --xhdr a= Search object ${OTHER_KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${EMPTY} --xhdr a=
Head object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${EMPTY} --xhdr a=.* Head object ${OTHER_KEY} ${CID} ${S_OID_USER} options=--xhdr a=.*
Get Range ${OTHER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 --xhdr a="2 2" Get Range ${OTHER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 --xhdr a="2 2"
Get Range Hash ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 --xhdr a=256 Get Range Hash ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 --xhdr a=256
Delete object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} --xhdr a=22 Delete object ${OTHER_KEY} ${CID} ${S_OID_USER} options=--xhdr a=22
Check eACL MatchType String Equal Request Allow Check eACL MatchType String Equal Request Allow
[Arguments] ${USER_KEY} ${OTHER_KEY} [Arguments] ${USER_KEY} ${OTHER_KEY}
${CID} = Create Container Public ${USER_KEY} ${CID} = Create Container Public ${USER_KEY}
${S_OID_USER} = Put Object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${S_OID_USER} = Put Object ${USER_KEY} ${FILE_S} ${CID}
${HEADER} = Head Object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} json_output=True
&{HEADER_DICT} = Decode Object System Header Json ${HEADER}
Get Object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${PATH} Get Object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${PATH}
${ID_value} = Get From Dictionary ${HEADER_DICT} ID
Set eACL ${USER_KEY} ${CID} ${EACL_XHEADER_ALLOW_ALL} Set eACL ${USER_KEY} ${CID} ${EACL_XHEADER_ALLOW_ALL}
# The current ACL cache lifetime is 30 sec # The current ACL cache lifetime is 30 sec
@ -115,42 +105,39 @@ Check eACL MatchType String Equal Request Allow
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${PATH} ${EMPTY} ... Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${PATH} ${EMPTY}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Put object ${OTHER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} ${EMPTY} ... Put object ${OTHER_KEY} ${FILE_S} ${CID}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${PATH} ${EMPTY} ... Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${PATH} ${EMPTY}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Search object ${OTHER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${EMPTY} ... Search object ${OTHER_KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${EMPTY}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Head object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${EMPTY} ... Head object ${OTHER_KEY} ${CID} ${S_OID_USER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get Range ${OTHER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 ... Get Range ${OTHER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get Range Hash ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 ... Get Range Hash ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ... Delete object ${OTHER_KEY} ${CID} ${S_OID_USER}
Put object ${OTHER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} ${EMPTY} --xhdr a=2 Put object ${OTHER_KEY} ${FILE_S} ${CID} options=--xhdr a=2
Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${PATH} ${EMPTY} --xhdr a=2 Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${PATH} ${EMPTY} --xhdr a=2
Search object ${OTHER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${EMPTY} --xhdr a=2 Search object ${OTHER_KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${EMPTY} --xhdr a=2
Head object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${EMPTY} --xhdr a=2 Head object ${OTHER_KEY} ${CID} ${S_OID_USER} options=--xhdr a=2
Get Range ${OTHER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 --xhdr a=2 Get Range ${OTHER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 --xhdr a=2
Get Range Hash ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 --xhdr a=2 Get Range Hash ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 --xhdr a=2
Delete object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} --xhdr a=2 Delete object ${OTHER_KEY} ${CID} ${S_OID_USER} options=--xhdr a=2
Check eACL MatchType String Equal Object Check eACL MatchType String Equal Object
[Arguments] ${USER_KEY} ${OTHER_KEY} [Arguments] ${USER_KEY} ${OTHER_KEY}
${CID} = Create Container Public ${USER_KEY} ${CID} = Create Container Public ${USER_KEY}
${S_OID_USER} = Put Object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${S_OID_USER} = Put Object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
${HEADER} = Head Object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} json_output=True
&{HEADER_DICT} = Decode Object System Header Json ${HEADER}
Get Object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${PATH} Get Object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${PATH}
Log Set eACL for Deny GET operation with StringEqual Object ID Log Set eACL for Deny GET operation with StringEqual Object ID
${ID_value} = Get From dictionary ${HEADER_DICT} ID &{HEADER_DICT} = Head Object ${USER_KEY} ${CID} ${S_OID_USER}
${ID_value} = Get From dictionary ${HEADER_DICT} objectID
${filters} = Create Dictionary headerType=OBJECT matchType=STRING_EQUAL key=$Object:objectID value=${ID_value} ${filters} = Create Dictionary headerType=OBJECT matchType=STRING_EQUAL key=$Object:objectID value=${ID_value}
${rule1} = Create Dictionary Operation=GET Access=DENY Role=OTHERS Filters=${filters} ${rule1} = Create Dictionary Operation=GET Access=DENY Role=OTHERS Filters=${filters}
@ -163,7 +150,7 @@ Check eACL MatchType String Equal Object
Log Set eACL for Deny GET operation with StringEqual Object Extended User Header Log Set eACL for Deny GET operation with StringEqual Object Extended User Header
${S_OID_USER_OTH} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} ${S_OID_USER_OTH} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
${filters} = Create Dictionary headerType=OBJECT matchType=STRING_EQUAL key=key1 value=1 ${filters} = Create Dictionary headerType=OBJECT matchType=STRING_EQUAL key=key1 value=1
${rule1} = Create Dictionary Operation=GET Access=DENY Role=OTHERS Filters=${filters} ${rule1} = Create Dictionary Operation=GET Access=DENY Role=OTHERS Filters=${filters}
@ -183,19 +170,14 @@ Check eACL MatchType String Not Equal Object
${CID} = Create Container Public ${USER_KEY} ${CID} = Create Container Public ${USER_KEY}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
${S_OID_OTHER} = Put object ${OTHER_KEY} ${FILE_S_2} ${CID} ${EMPTY} ${FILE_OTH_HEADER} ${S_OID_OTHER} = Put object ${OTHER_KEY} ${FILE_S_2} ${CID} user_headers=${ANOTHER_HEADER}
${HEADER} = Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} json_output=True
Head object ${USER_KEY} ${CID} ${S_OID_OTHER} ${EMPTY} json_output=True
&{HEADER_DICT} = Decode Object System Header Json ${HEADER}
Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${PATH} Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${PATH}
Get object ${OTHER_KEY} ${CID} ${S_OID_OTHER} ${EMPTY} ${PATH} Get object ${OTHER_KEY} ${CID} ${S_OID_OTHER} ${EMPTY} ${PATH}
Log Set eACL for Deny GET operation with StringNotEqual Object ID Log Set eACL for Deny GET operation with StringNotEqual Object ID
${ID_value} = Get From Dictionary ${HEADER_DICT} ID &{HEADER_DICT} = Head object ${USER_KEY} ${CID} ${S_OID_USER}
${ID_value} = Get From Dictionary ${HEADER_DICT} objectID
${filters} = Create Dictionary headerType=OBJECT matchType=STRING_NOT_EQUAL key=$Object:objectID value=${ID_value} ${filters} = Create Dictionary headerType=OBJECT matchType=STRING_NOT_EQUAL key=$Object:objectID value=${ID_value}
${rule1} = Create Dictionary Operation=GET Access=DENY Role=OTHERS Filters=${filters} ${rule1} = Create Dictionary Operation=GET Access=DENY Role=OTHERS Filters=${filters}
@ -209,7 +191,7 @@ Check eACL MatchType String Not Equal Object
Log Set eACL for Deny GET operation with StringEqual Object Extended User Header Log Set eACL for Deny GET operation with StringEqual Object Extended User Header
${S_OID_USER_OTH} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} ${S_OID_USER_OTH} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
${filters} = Create Dictionary headerType=OBJECT matchType=STRING_NOT_EQUAL key=key1 value=1 ${filters} = Create Dictionary headerType=OBJECT matchType=STRING_NOT_EQUAL key=key1 value=1
${rule1} = Create Dictionary Operation=GET Access=DENY Role=OTHERS Filters=${filters} ${rule1} = Create Dictionary Operation=GET Access=DENY Role=OTHERS Filters=${filters}

View file

@ -19,7 +19,7 @@ ${EACL_ERR_MSG} = *
*** Test cases *** *** Test cases ***
Creation Epoch Object Filter for Extended ACL Creation Epoch Object Filter for Extended ACL
[Documentation] Testcase to validate if $Object:creationEpoch eACL filter is correctly handled. [Documentation] Testcase to validate if $Object:creationEpoch eACL filter is correctly handled.
[Tags] ACL eACL NeoFS NeoCLI [Tags] ACL eACL
[Timeout] 20 min [Timeout] 20 min
[Setup] Setup [Setup] Setup
@ -40,14 +40,13 @@ Check $Object:creationEpoch Filter with MatchType String Not Equal
${CID} = Create Container Public ${USER_KEY} ${CID} = Create Container Public ${USER_KEY}
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE} ${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
${S_OID} = Put Object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${S_OID} = Put Object ${USER_KEY} ${FILE_S} ${CID}
Tick Epoch Tick Epoch
${S_OID_NEW} = Put Object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${S_OID_NEW} = Put Object ${USER_KEY} ${FILE_S} ${CID}
Get Object ${USER_KEY} ${CID} ${S_OID_NEW} ${EMPTY} local_file_eacl Get Object ${USER_KEY} ${CID} ${S_OID_NEW} ${EMPTY} local_file_eacl
Head Object ${USER_KEY} ${CID} ${S_OID_NEW} ${EMPTY}
&{HEADER_DICT} = Object Header Decoded ${USER_KEY} ${CID} ${S_OID_NEW} &{HEADER_DICT} = Head Object ${USER_KEY} ${CID} ${S_OID_NEW}
${EACL_CUSTOM} = Compose eACL Custom ${HEADER_DICT} STRING_NOT_EQUAL ${FILTER} DENY OTHERS ${EACL_CUSTOM} = Compose eACL Custom ${HEADER_DICT} STRING_NOT_EQUAL ${FILTER} DENY OTHERS
Set eACL ${USER_KEY} ${CID} ${EACL_CUSTOM} Set eACL ${USER_KEY} ${CID} ${EACL_CUSTOM}
@ -55,7 +54,7 @@ Check $Object:creationEpoch Filter with MatchType String Not Equal
... Get object ${OTHER_KEY} ${CID} ${S_OID} ${EMPTY} ${OBJECT_PATH} ... Get object ${OTHER_KEY} ${CID} ${S_OID} ${EMPTY} ${OBJECT_PATH}
Get object ${OTHER_KEY} ${CID} ${S_OID_NEW} ${EMPTY} ${OBJECT_PATH} Get object ${OTHER_KEY} ${CID} ${S_OID_NEW} ${EMPTY} ${OBJECT_PATH}
Run Keyword And Expect error ${EACL_ERR_MSG} Run Keyword And Expect error ${EACL_ERR_MSG}
... Head object ${OTHER_KEY} ${CID} ${S_OID} ${EMPTY} ... Head object ${OTHER_KEY} ${CID} ${S_OID}
Head object ${OTHER_KEY} ${CID} ${S_OID_NEW} ${EMPTY} Head object ${OTHER_KEY} ${CID} ${S_OID_NEW}
[Teardown] Teardown creation_epoch_filter [Teardown] Teardown creation_epoch_filter

View file

@ -18,7 +18,7 @@ ${EACL_ERR_MSG} = *
*** Test cases *** *** Test cases ***
Payload Length Object Filter for Extended ACL Payload Length Object Filter for Extended ACL
[Documentation] Testcase to validate if $Object:payloadLength eACL filter is correctly handled. [Documentation] Testcase to validate if $Object:payloadLength eACL filter is correctly handled.
[Tags] ACL eACL NeoFS NeoCLI [Tags] ACL eACL
[Timeout] 20 min [Timeout] 20 min
[Setup] Setup [Setup] Setup
@ -40,11 +40,11 @@ Check $Object:payloadLength Filter with MatchType String Not Equal
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE} ${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
${FILE_0} ${_} = Generate file ${0} ${FILE_0} ${_} = Generate file ${0}
${S_OID_0} = Put Object ${USER_KEY} ${FILE_0} ${CID} ${EMPTY} ${S_OID_0} = Put Object ${USER_KEY} ${FILE_0} ${CID}
${S_OID} = Put Object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${S_OID} = Put Object ${USER_KEY} ${FILE_S} ${CID}
Get Object ${USER_KEY} ${CID} ${S_OID} ${EMPTY} local_file_eacl Get Object ${USER_KEY} ${CID} ${S_OID} ${EMPTY} local_file_eacl
Head Object ${USER_KEY} ${CID} ${S_OID} ${EMPTY} Head Object ${USER_KEY} ${CID} ${S_OID}
&{HEADER_DICT} = Object Header Decoded ${USER_KEY} ${CID} ${S_OID} &{HEADER_DICT} = Object Header Decoded ${USER_KEY} ${CID} ${S_OID}
${EACL_CUSTOM} = Compose eACL Custom ${HEADER_DICT} STRING_NOT_EQUAL ${FILTER} DENY OTHERS ${EACL_CUSTOM} = Compose eACL Custom ${HEADER_DICT} STRING_NOT_EQUAL ${FILTER} DENY OTHERS
@ -54,8 +54,8 @@ Check $Object:payloadLength Filter with MatchType String Not Equal
... Get object ${OTHER_KEY} ${CID} ${S_OID_0} ${EMPTY} ${OBJECT_PATH} ... Get object ${OTHER_KEY} ${CID} ${S_OID_0} ${EMPTY} ${OBJECT_PATH}
Get object ${OTHER_KEY} ${CID} ${S_OID} ${EMPTY} ${OBJECT_PATH} Get object ${OTHER_KEY} ${CID} ${S_OID} ${EMPTY} ${OBJECT_PATH}
Run Keyword And Expect error ${EACL_ERR_MSG} Run Keyword And Expect error ${EACL_ERR_MSG}
... Head object ${OTHER_KEY} ${CID} ${S_OID_0} ${EMPTY} ... Head object ${OTHER_KEY} ${CID} ${S_OID_0}
Head object ${OTHER_KEY} ${CID} ${S_OID} ${EMPTY} Head object ${OTHER_KEY} ${CID} ${S_OID}
[Teardown] Teardown payload_length_filter [Teardown] Teardown payload_length_filter

View file

@ -24,13 +24,13 @@ Drop command in control group
[Setup] Setup [Setup] Setup
${NODE_NUM} ${NODE} ${WIF} = Get control endpoint with wif ${_} ${NODE} ${WIF} = Get control endpoint with wif
${LOCODE} = Get Locode ${LOCODE} = Get Locode
${FILE_SIMPLE} = Generate file of bytes ${SIMPLE_OBJ_SIZE} ${FILE_SIMPLE} = Generate file of bytes ${SIMPLE_OBJ_SIZE}
${FILE_COMPLEX} = Generate file of bytes ${COMPLEX_OBJ_SIZE} ${FILE_COMPLEX} = Generate file of bytes ${COMPLEX_OBJ_SIZE}
${WALLET} ${ADDR} ${USER_KEY} = Prepare Wallet And Deposit ${_} ${_} ${USER_KEY} = Prepare Wallet And Deposit
${PRIV_CID} = Create container ${USER_KEY} ${PRIVATE_ACL_F} REP 1 CBF 1 SELECT 1 FROM * FILTER 'UN-LOCODE' EQ '${LOCODE}' AS LOC ${PRIV_CID} = Create container ${USER_KEY} ${PRIVATE_ACL_F} REP 1 CBF 1 SELECT 1 FROM * FILTER 'UN-LOCODE' EQ '${LOCODE}' AS LOC
Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL} Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL}
@ -40,9 +40,9 @@ Drop command in control group
# Dropping simple object # Dropping simple object
######################### #########################
${S_OID} = Put object ${USER_KEY} ${FILE_SIMPLE} ${PRIV_CID} ${EMPTY} ${EMPTY} ${S_OID} = Put object ${USER_KEY} ${FILE_SIMPLE} ${PRIV_CID}
Get object ${USER_KEY} ${PRIV_CID} ${S_OID} ${EMPTY} s_file_read Get object ${USER_KEY} ${PRIV_CID} ${S_OID} ${EMPTY} s_file_read
Head object ${USER_KEY} ${PRIV_CID} ${S_OID} ${EMPTY} ${EMPTY} Head object ${USER_KEY} ${PRIV_CID} ${S_OID}
Drop object ${NODE} ${WIF} ${PRIV_CID} ${S_OID} Drop object ${NODE} ${WIF} ${PRIV_CID} ${S_OID}
@ -51,7 +51,7 @@ Drop command in control group
... Get object ${USER_KEY} ${PRIV_CID} ${S_OID} ${EMPTY} s_file_read options=--ttl 1 ... Get object ${USER_KEY} ${PRIV_CID} ${S_OID} ${EMPTY} s_file_read options=--ttl 1
Wait Until Keyword Succeeds 3x ${SHARD_0_GC_SLEEP} Wait Until Keyword Succeeds 3x ${SHARD_0_GC_SLEEP}
... Run Keyword And Expect Error Error:* ... Run Keyword And Expect Error Error:*
... Head object ${USER_KEY} ${PRIV_CID} ${S_OID} ${EMPTY} ${EMPTY} options=--ttl 1 ... Head object ${USER_KEY} ${PRIV_CID} ${S_OID} options=--ttl 1
Drop object ${NODE} ${WIF} ${PRIV_CID} ${S_OID} Drop object ${NODE} ${WIF} ${PRIV_CID} ${S_OID}
@ -59,14 +59,14 @@ Drop command in control group
# Dropping complex object # Dropping complex object
########################## ##########################
${C_OID} = Put object ${USER_KEY} ${FILE_COMPLEX} ${PRIV_CID} ${EMPTY} ${EMPTY} ${C_OID} = Put object ${USER_KEY} ${FILE_COMPLEX} ${PRIV_CID}
Get object ${USER_KEY} ${PRIV_CID} ${C_OID} ${EMPTY} s_file_read Get object ${USER_KEY} ${PRIV_CID} ${C_OID} ${EMPTY} s_file_read
Head object ${USER_KEY} ${PRIV_CID} ${C_OID} ${EMPTY} ${EMPTY} Head object ${USER_KEY} ${PRIV_CID} ${C_OID}
Drop object ${NODE} ${WIF} ${PRIV_CID} ${C_OID} Drop object ${NODE} ${WIF} ${PRIV_CID} ${C_OID}
Get object ${USER_KEY} ${PRIV_CID} ${C_OID} ${EMPTY} s_file_read Get object ${USER_KEY} ${PRIV_CID} ${C_OID} ${EMPTY} s_file_read
Head object ${USER_KEY} ${PRIV_CID} ${C_OID} ${EMPTY} ${EMPTY} Head object ${USER_KEY} ${PRIV_CID} ${C_OID}
@{SPLIT_OIDS} = Get Split objects ${USER_KEY} ${PRIV_CID} ${C_OID} @{SPLIT_OIDS} = Get Split objects ${USER_KEY} ${PRIV_CID} ${C_OID}
FOR ${CHILD_OID} IN @{SPLIT_OIDS} FOR ${CHILD_OID} IN @{SPLIT_OIDS}
@ -79,7 +79,7 @@ Drop command in control group
... Get object ${USER_KEY} ${PRIV_CID} ${C_OID} ${EMPTY} s_file_read options=--ttl 1 ... Get object ${USER_KEY} ${PRIV_CID} ${C_OID} ${EMPTY} s_file_read options=--ttl 1
Wait Until Keyword Succeeds 3x ${SHARD_0_GC_SLEEP} Wait Until Keyword Succeeds 3x ${SHARD_0_GC_SLEEP}
... Run Keyword And Expect Error Error:* ... Run Keyword And Expect Error Error:*
... Head object ${USER_KEY} ${PRIV_CID} ${C_OID} ${EMPTY} ${EMPTY} options=--ttl 1 ... Head object ${USER_KEY} ${PRIV_CID} ${C_OID} options=--ttl 1
[Teardown] Teardown netmap_control_drop [Teardown] Teardown netmap_control_drop

View file

@ -12,10 +12,10 @@ Resource payment_operations.robot
*** Variables *** *** Variables ***
${POLICY} = REP 2 IN X CBF 1 SELECT 2 FROM * AS X ${POLICY} = REP 2 IN X CBF 1 SELECT 2 FROM * AS X
${ATTR_FILENAME} = FileName=new &{ATTR_FILENAME} = FileName=new
${ATTR_DUPLICATE} = FileType=jpg, FileType=png ${ATTR_DUPLICATE} = FileType=jpg,FileType=png
${ATTR_NONE} = NoAttribute='' &{ATTR_NONE} = NoAttribute=''
${ATTR_SINGLE} = AttrNum=one &{ATTR_SINGLE} = AttrNum=one
*** Test Cases *** *** Test Cases ***
@ -38,24 +38,27 @@ Duplicated Object Attributes
################################################### ###################################################
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${PUBLIC_CID} ${EMPTY} ${ATTR_FILENAME} ... Put object ${USER_KEY} ${FILE_S} ${PUBLIC_CID} user_headers=${ATTR_FILENAME}
# Robot doesn't allow to create a dictionary with the same keys, so using plain text option here
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${PUBLIC_CID} ${EMPTY} ${ATTR_DUPLICATE} ... Put object ${USER_KEY} ${FILE_S} ${PUBLIC_CID} options=--attributes ${ATTR_DUPLICATE}
################################################## ##################################################
# Checking that object cannot have empty attibute # Checking that object cannot have empty attibute
################################################## ##################################################
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${PUBLIC_CID} ${EMPTY} ${ATTR_NONE} ... Put object ${USER_KEY} ${FILE_S} ${PUBLIC_CID} user_headers=${ATTR_NONE}
##################################################### #####################################################
# Checking a successful step with a single attribute # Checking a successful step with a single attribute
##################################################### #####################################################
${OID} = Put object ${USER_KEY} ${FILE_S} ${PUBLIC_CID} ${EMPTY} ${ATTR_SINGLE} ${OID} = Put object ${USER_KEY} ${FILE_S} ${PUBLIC_CID} user_headers=${ATTR_SINGLE}
${HEAD} = Head object ${USER_KEY} ${PUBLIC_CID} ${OID} json_output=True ${HEADER} = Head object ${USER_KEY} ${PUBLIC_CID} ${OID}
${HEADER_58} = Decode Object System Header Json ${HEAD} Dictionary Should Contain Sub Dictionary
Verify Head Attribute ${HEADER_58} ${ATTR_SINGLE} ... ${HEADER}[header][attributes]
... ${ATTR_SINGLE}
... msg="No expected User Attribute in HEAD response"
[Teardown] Teardown object_attributes [Teardown] Teardown object_attributes

View file

@ -4,6 +4,7 @@ Variables common.py
Library neofs.py Library neofs.py
Library payment_neogo.py Library payment_neogo.py
Library contract_keywords.py Library contract_keywords.py
Library Collections
Resource common_steps_object.robot Resource common_steps_object.robot
Resource setup_teardown.robot Resource setup_teardown.robot
@ -11,11 +12,14 @@ Resource payment_operations.robot
*** Variables *** *** Variables ***
${CLEANUP_TIMEOUT} = 10s ${CLEANUP_TIMEOUT} = 10s
&{FILE_USR_HEADER} = key1=1 key2=abc
&{FILE_USR_HEADER_OTH} = key1=2
*** Test cases *** *** Test cases ***
NeoFS Complex Object Operations NeoFS Complex Object Operations
[Documentation] Testcase to validate NeoFS operations with simple object. [Documentation] Testcase to validate NeoFS operations with complex object.
[Tags] Object NeoFS NeoCLI [Tags] Object
[Timeout] 20 min [Timeout] 20 min
[Setup] Setup [Setup] Setup
@ -26,9 +30,9 @@ NeoFS Complex Object Operations
${FILE} = Generate file of bytes ${COMPLEX_OBJ_SIZE} ${FILE} = Generate file of bytes ${COMPLEX_OBJ_SIZE}
${FILE_HASH} = Get file hash ${FILE} ${FILE_HASH} = Get file hash ${FILE}
${S_OID} = Put object ${WIF} ${FILE} ${CID} ${EMPTY} ${EMPTY} ${S_OID} = Put object ${WIF} ${FILE} ${CID}
${H_OID} = Put object ${WIF} ${FILE} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${H_OID} = Put object ${WIF} ${FILE} ${CID} user_headers=${FILE_USR_HEADER}
${H_OID_OTH} = Put object ${WIF} ${FILE} ${CID} ${EMPTY} ${FILE_USR_HEADER_OTH} ${H_OID_OTH} = Put object ${WIF} ${FILE} ${CID} user_headers=${FILE_USR_HEADER_OTH}
Should Be True '${S_OID}'!='${H_OID}' and '${H_OID}'!='${H_OID_OTH}' Should Be True '${S_OID}'!='${H_OID}' and '${H_OID}'!='${H_OID_OTH}'
@ -40,13 +44,16 @@ NeoFS Complex Object Operations
@{S_OBJ_H} = Create List ${H_OID} @{S_OBJ_H} = Create List ${H_OID}
@{S_OBJ_H_OTH} = Create List ${H_OID_OTH} @{S_OBJ_H_OTH} = Create List ${H_OID_OTH}
Search Object ${WIF} ${CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_ALL} Search Object ${WIF} ${CID} --root expected_objects_list=${S_OBJ_ALL}
${GET_OBJ_S} = Get object ${WIF} ${CID} ${S_OID} ${EMPTY} s_file_read ${GET_OBJ_S} = Get object ${WIF} ${CID} ${S_OID}
${GET_OBJ_H} = Get object ${WIF} ${CID} ${H_OID} ${EMPTY} h_file_read ${GET_OBJ_H} = Get object ${WIF} ${CID} ${H_OID}
Verify file hash ${GET_OBJ_S} ${FILE_HASH} ${FILE_HASH_S} = Get file hash ${GET_OBJ_S}
Verify file hash ${GET_OBJ_H} ${FILE_HASH} ${FILE_HASH_H} = Get file hash ${GET_OBJ_H}
Should Be Equal ${FILE_HASH_S} ${FILE_HASH}
Should Be Equal ${FILE_HASH_H} ${FILE_HASH}
Get Range Hash ${WIF} ${CID} ${S_OID} ${EMPTY} 0:10 Get Range Hash ${WIF} ${CID} ${S_OID} ${EMPTY} 0:10
Get Range Hash ${WIF} ${CID} ${H_OID} ${EMPTY} 0:10 Get Range Hash ${WIF} ${CID} ${H_OID} ${EMPTY} 0:10
@ -54,18 +61,22 @@ NeoFS Complex Object Operations
Get Range ${WIF} ${CID} ${S_OID} s_get_range ${EMPTY} 0:10 Get Range ${WIF} ${CID} ${S_OID} s_get_range ${EMPTY} 0:10
Get Range ${WIF} ${CID} ${H_OID} h_get_range ${EMPTY} 0:10 Get Range ${WIF} ${CID} ${H_OID} h_get_range ${EMPTY} 0:10
Search object ${WIF} ${CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_ALL} Search object ${WIF} ${CID} --root expected_objects_list=${S_OBJ_ALL}
Search object ${WIF} ${CID} --root ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} Search object ${WIF} ${CID} --root filters=${FILE_USR_HEADER} expected_objects_list=${S_OBJ_H}
Search object ${WIF} ${CID} --root ${EMPTY} ${FILE_USR_HEADER_OTH} ${S_OBJ_H_OTH} Search object ${WIF} ${CID} --root filters=${FILE_USR_HEADER_OTH} expected_objects_list=${S_OBJ_H_OTH}
Head object ${WIF} ${CID} ${S_OID} ${EMPTY} Head object ${WIF} ${CID} ${S_OID}
Head object ${WIF} ${CID} ${H_OID} ${EMPTY} ${FILE_USR_HEADER} &{RESPONSE} = Head object ${WIF} ${CID} ${H_OID}
Dictionary Should Contain Sub Dictionary
... ${RESPONSE}[header][attributes]
... ${FILE_USR_HEADER}
... msg="There are no User Headers in HEAD response"
Verify Split Chain ${WIF} ${CID} ${S_OID} Verify Split Chain ${WIF} ${CID} ${S_OID}
Verify Split Chain ${WIF} ${CID} ${H_OID} Verify Split Chain ${WIF} ${CID} ${H_OID}
${TOMBSTONE_S} = Delete object ${WIF} ${CID} ${S_OID} ${EMPTY} ${TOMBSTONE_S} = Delete object ${WIF} ${CID} ${S_OID}
${TOMBSTONE_H} = Delete object ${WIF} ${CID} ${H_OID} ${EMPTY} ${TOMBSTONE_H} = Delete object ${WIF} ${CID} ${H_OID}
Verify Head tombstone ${WIF} ${CID} ${TOMBSTONE_S} ${S_OID} ${ADDR} Verify Head tombstone ${WIF} ${CID} ${TOMBSTONE_S} ${S_OID} ${ADDR}
Verify Head tombstone ${WIF} ${CID} ${TOMBSTONE_H} ${H_OID} ${ADDR} Verify Head tombstone ${WIF} ${CID} ${TOMBSTONE_H} ${H_OID} ${ADDR}
@ -74,9 +85,9 @@ NeoFS Complex Object Operations
# we assume that during this time objects must be deleted # we assume that during this time objects must be deleted
Sleep ${CLEANUP_TIMEOUT} Sleep ${CLEANUP_TIMEOUT}
Run Keyword And Expect Error * Run Keyword And Expect Error "rpc error: status: code = 1024 message = object already removed"
... Get object ${WIF} ${CID} ${S_OID} ${EMPTY} ${GET_OBJ_S} ... Get object ${WIF} ${CID} ${S_OID} ${EMPTY} ${GET_OBJ_S}
Run Keyword And Expect Error * Run Keyword And Expect Error "rpc error: status: code = 1024 message = object already removed"
... Get object ${WIF} ${CID} ${H_OID} ${EMPTY} ${GET_OBJ_H} ... Get object ${WIF} ${CID} ${H_OID} ${EMPTY} ${GET_OBJ_H}
[Teardown] Teardown object_complex [Teardown] Teardown object_complex

View file

@ -4,6 +4,7 @@ Variables common.py
Library neofs.py Library neofs.py
Library payment_neogo.py Library payment_neogo.py
Library contract_keywords.py Library contract_keywords.py
Library Collections
Resource common_steps_object.robot Resource common_steps_object.robot
Resource payment_operations.robot Resource payment_operations.robot
@ -11,11 +12,14 @@ Resource setup_teardown.robot
*** Variables *** *** Variables ***
${CLEANUP_TIMEOUT} = 10s ${CLEANUP_TIMEOUT} = 10s
&{FILE_USR_HEADER} = key1=1 key2=abc
&{FILE_USR_HEADER_OTH} = key1=2
*** Test cases *** *** Test cases ***
NeoFS Simple Object Operations NeoFS Simple Object Operations
[Documentation] Testcase to validate NeoFS operations with simple object. [Documentation] Testcase to validate NeoFS operations with simple object.
[Tags] Object NeoFS NeoCLI [Tags] Object
[Timeout] 10 min [Timeout] 10 min
[Setup] Setup [Setup] Setup
@ -28,9 +32,9 @@ NeoFS Simple Object Operations
${FILE_HASH} = Get file hash ${FILE} ${FILE_HASH} = Get file hash ${FILE}
${S_OID} = Put object ${WIF} ${FILE} ${CID} ${EMPTY} ${EMPTY} ${S_OID} = Put object ${WIF} ${FILE} ${CID}
${H_OID} = Put object ${WIF} ${FILE} ${CID} ${EMPTY} ${FILE_USR_HEADER} ${H_OID} = Put object ${WIF} ${FILE} ${CID} user_headers=${FILE_USR_HEADER}
${H_OID_OTH} = Put object ${WIF} ${FILE} ${CID} ${EMPTY} ${FILE_USR_HEADER_OTH} ${H_OID_OTH} = Put object ${WIF} ${FILE} ${CID} user_headers=${FILE_USR_HEADER_OTH}
Validate storage policy for object ${WIF} 2 ${CID} ${S_OID} Validate storage policy for object ${WIF} 2 ${CID} ${S_OID}
Validate storage policy for object ${WIF} 2 ${CID} ${H_OID} Validate storage policy for object ${WIF} 2 ${CID} ${H_OID}
@ -40,11 +44,14 @@ NeoFS Simple Object Operations
@{S_OBJ_H} = Create List ${H_OID} @{S_OBJ_H} = Create List ${H_OID}
@{S_OBJ_H_OTH} = Create List ${H_OID_OTH} @{S_OBJ_H_OTH} = Create List ${H_OID_OTH}
${GET_OBJ_S} = Get object ${WIF} ${CID} ${S_OID} ${EMPTY} s_file_read ${GET_OBJ_S} = Get object ${WIF} ${CID} ${S_OID}
${GET_OBJ_H} = Get object ${WIF} ${CID} ${H_OID} ${EMPTY} h_file_read ${GET_OBJ_H} = Get object ${WIF} ${CID} ${H_OID}
Verify file hash ${GET_OBJ_S} ${FILE_HASH} ${FILE_HASH_S} = Get file hash ${GET_OBJ_S}
Verify file hash ${GET_OBJ_H} ${FILE_HASH} ${FILE_HASH_H} = Get file hash ${GET_OBJ_H}
Should Be Equal ${FILE_HASH_S} ${FILE_HASH}
Should Be Equal ${FILE_HASH_H} ${FILE_HASH}
Get Range Hash ${WIF} ${CID} ${S_OID} ${EMPTY} 0:10 Get Range Hash ${WIF} ${CID} ${S_OID} ${EMPTY} 0:10
Get Range Hash ${WIF} ${CID} ${H_OID} ${EMPTY} 0:10 Get Range Hash ${WIF} ${CID} ${H_OID} ${EMPTY} 0:10
@ -52,15 +59,19 @@ NeoFS Simple Object Operations
Get Range ${WIF} ${CID} ${S_OID} s_get_range ${EMPTY} 0:10 Get Range ${WIF} ${CID} ${S_OID} s_get_range ${EMPTY} 0:10
Get Range ${WIF} ${CID} ${H_OID} h_get_range ${EMPTY} 0:10 Get Range ${WIF} ${CID} ${H_OID} h_get_range ${EMPTY} 0:10
Search object ${WIF} ${CID} ${EMPTY} ${EMPTY} ${EMPTY} ${S_OBJ_ALL} Search object ${WIF} ${CID} expected_objects_list=${S_OBJ_ALL}
Search object ${WIF} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} Search object ${WIF} ${CID} filters=${FILE_USR_HEADER} expected_objects_list=${S_OBJ_H}
Search object ${WIF} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER_OTH} ${S_OBJ_H_OTH} Search object ${WIF} ${CID} filters=${FILE_USR_HEADER_OTH} expected_objects_list=${S_OBJ_H_OTH}
Head object ${WIF} ${CID} ${S_OID} ${EMPTY} Head object ${WIF} ${CID} ${S_OID}
Head object ${WIF} ${CID} ${H_OID} ${EMPTY} ${FILE_USR_HEADER} &{RESPONSE} = Head object ${WIF} ${CID} ${H_OID}
Dictionary Should Contain Sub Dictionary
... ${RESPONSE}[header][attributes]
... ${FILE_USR_HEADER}
... msg="There are no User Headers in HEAD response"
${TOMBSTONE_S} = Delete object ${WIF} ${CID} ${S_OID} ${EMPTY} ${TOMBSTONE_S} = Delete object ${WIF} ${CID} ${S_OID}
${TOMBSTONE_H} = Delete object ${WIF} ${CID} ${H_OID} ${EMPTY} ${TOMBSTONE_H} = Delete object ${WIF} ${CID} ${H_OID}
Verify Head tombstone ${WIF} ${CID} ${TOMBSTONE_S} ${S_OID} ${ADDR} Verify Head tombstone ${WIF} ${CID} ${TOMBSTONE_S} ${S_OID} ${ADDR}
Verify Head tombstone ${WIF} ${CID} ${TOMBSTONE_H} ${H_OID} ${ADDR} Verify Head tombstone ${WIF} ${CID} ${TOMBSTONE_H} ${H_OID} ${ADDR}

View file

@ -9,6 +9,9 @@ Resource common_steps_object.robot
Resource setup_teardown.robot Resource setup_teardown.robot
Resource payment_operations.robot Resource payment_operations.robot
*** Variables ***
${UNEXIST_OID} = B2DKvkHnLnPvapbDgfpU1oVUPuXQo5LTfKVxmNDZXQff
*** Test cases *** *** Test cases ***
NeoFS Complex Storagegroup NeoFS Complex Storagegroup
[Documentation] Testcase to validate NeoFS operations with Storagegroup. [Documentation] Testcase to validate NeoFS operations with Storagegroup.

View file

@ -8,6 +8,8 @@ Resource common_steps_object.robot
Resource setup_teardown.robot Resource setup_teardown.robot
Resource payment_operations.robot Resource payment_operations.robot
*** Variables ***
${UNEXIST_OID} = B2DKvkHnLnPvapbDgfpU1oVUPuXQo5LTfKVxmNDZXQff
*** Test cases *** *** Test cases ***
NeoFS Simple Storagegroup NeoFS Simple Storagegroup

View file

@ -1,12 +1,12 @@
EACL_OBJ_FILTERS = {'$Object:objectID': 'ID', EACL_OBJ_FILTERS = {'$Object:objectID': 'ID',
'$Object:containerID': 'CID', '$Object:containerID': 'CID',
'$Object:ownerID': 'OwnerID', '$Object:ownerID': 'OwnerID',
'$Object:creationEpoch': 'CreatedAtEpoch', '$Object:creationEpoch': 'creationEpoch',
'$Object:payloadLength': 'PayloadLength', '$Object:payloadLength': 'payloadLength',
'$Object:payloadHash': 'PayloadHash', '$Object:payloadHash': 'payloadHash',
'$Object:objectType': 'Type', '$Object:objectType': 'objectType',
'$Object:homomorphicHash': 'HomoHash', '$Object:homomorphicHash': 'homomorphicHash',
'$Object:version': 'Version'} '$Object:version': 'version'}
VERB_FILTER_DEP = { VERB_FILTER_DEP = {
'$Object:objectID': ['GET', 'HEAD', 'DELETE', 'RANGE', 'RANGEHASH'], '$Object:objectID': ['GET', 'HEAD', 'DELETE', 'RANGE', 'RANGEHASH'],