diff --git a/robot/resources/lib/neofs.py b/robot/resources/lib/neofs.py index cf46a4e4..808bf9ef 100644 --- a/robot/resources/lib/neofs.py +++ b/robot/resources/lib/neofs.py @@ -28,8 +28,10 @@ def get_nodes_with_object(private_key: bytes, cid, oid): nodes_list = [] for node in storage_nodes: - if re.search(r'(%s: %s)' % (cid, oid), _search_object(node, private_key, cid, oid)): - nodes_list.append(node) + search_res = _search_object(node, private_key, cid, oid) + if search_res: + if re.search(r'(%s: %s)' % (cid, oid), search_res): + nodes_list.append(node) logger.info("Nodes with object: %s" % nodes_list) @@ -42,28 +44,45 @@ def get_nodes_without_object(private_key: bytes, cid, oid): nodes_list = [] for node in storage_nodes: - if not re.search(r'(%s: %s)' % (cid, oid), _search_object(node, private_key, cid, oid)): + search_res = _search_object(node, private_key, cid, oid) + if search_res: + if not re.search(r'(%s: %s)' % (cid, oid), search_res): + nodes_list.append(node) + else: nodes_list.append(node) logger.info("Nodes with object: %s" % nodes_list) @keyword('Validate storage policy for object') -def validate_storage_policy_for_object(private_key: bytes, expected_copies: int, cid, oid): +def validate_storage_policy_for_object(private_key: bytes, expected_copies: int, cid, oid, *expected_node_list): storage_nodes = _get_storage_nodes(private_key) copies = 0 + found_nodes = [] + for node in storage_nodes: - if re.search(r'(%s: %s)' % (cid, oid), _search_object(node, private_key, cid, oid)): - copies += 1 + search_res = _search_object(node, private_key, cid, oid) + if search_res: + if re.search(r'(%s: %s)' % (cid, oid), search_res): + copies += 1 + found_nodes.append(node) + + if copies != expected_copies: + raise Exception("Object copies is not match storage policy. Found: %s, expexted: %s." % (copies, expected_copies)) + else: + logger.info("Found copies: %s, expected: %s" % (copies, expected_copies)) + + logger.info("Found nodes: %s" % found_nodes) + + if expected_node_list: + if sorted(found_nodes) == sorted(expected_node_list): + logger.info("Found node list '{}' is equal for expected list '{}'".format(found_nodes, expected_node_list)) + else: + raise Exception("Found node list '{}' is not equal to expected list '{}'".format(found_nodes, expected_node_list)) + - logger.info("Copies: %s" % copies) - - if copies < expected_copies: - raise Exception("Not enough object copies to match storage policyю Found: %s, expexted: %s." % (copies, expected_copies)) -# docker exec neofs-cli neofs-cli --host 192.168.123.71:8080 --key 1ed43848107fd2d513c38ebfba3bb8c33d5abd2b6a99fafb09d07a30191989af container set-eacl --cid DNG1DCV3PTfxuYCLdbdMpRmrumfvacyWmyqLzNrV1koi --eacl 0a4b080210021a1e080310011a0a686561646572206b6579220c6865616465722076616c7565222508031221031a6c6fbbdf02ca351745fa86b9ba5a9452d785ac4f7fc2b7548ca2a46c4fcf4a -# Updating ACL rules of container... @keyword('Get eACL') def get_eacl(private_key: bytes, cid: str): @@ -113,9 +132,13 @@ def set_eacl(private_key: bytes, cid: str, eacl: str): @keyword('Get Range') -def get_range(private_key: bytes, cid: str, oid: str, range_cut: str): +def get_range(private_key: bytes, cid: str, oid: str, bearer: str, range_cut: str): - Cmd = f'{CLI_PREFIX}neofs-cli --host {NEOFS_ENDPOINT} --key {binascii.hexlify(private_key).decode()} object get-range --cid {cid} --oid {oid} {range_cut}' + bearer_token = "" + if bearer: + bearer_token = f"--bearer {bearer}" + + Cmd = f'{CLI_PREFIX}neofs-cli --host {NEOFS_ENDPOINT} --key {binascii.hexlify(private_key).decode()} object get-range --cid {cid} --oid {oid} {bearer_token} {range_cut} ' logger.info("Cmd: %s" % Cmd) complProc = subprocess.run(Cmd, check=True, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=150, shell=True) @@ -124,11 +147,11 @@ def get_range(private_key: bytes, cid: str, oid: str, range_cut: str): @keyword('Create container') -def create_container(private_key: bytes, basic_acl:str=""): - rule = "RF 2 SELECT 2 Node" +def create_container(private_key: bytes, basic_acl:str="", rule:str="RF 2 SELECT 2 Node"): + if basic_acl != "": basic_acl = "--acl " + basic_acl - + createContainerCmd = f'{CLI_PREFIX}neofs-cli --host {NEOFS_ENDPOINT} --key {binascii.hexlify(private_key).decode()} container put --rule "{rule}" {basic_acl}' logger.info("Cmd: %s" % createContainerCmd) complProc = subprocess.run(createContainerCmd, check=True, universal_newlines=True, @@ -172,17 +195,18 @@ def generate_file_of_bytes(size): @keyword('Search object') -def search_object(private_key: bytes, cid: str, keys: str, *expected_objects_list, **kwargs ): +def search_object(private_key: bytes, cid: str, keys: str, bearer: str, *expected_objects_list, **kwargs ): + + bearer_token = "" + if bearer: + bearer_token = f"--bearer {bearer}" - logger.info(expected_objects_list) - logger.info(kwargs) option = "" - if kwargs: for key, value in dict(kwargs).items(): option = f'{option} {key} {value}' - ObjectCmd = f'{CLI_PREFIX}neofs-cli --host {NEOFS_ENDPOINT} --key {binascii.hexlify(private_key).decode()} object search {keys} --cid {cid} {option}' + ObjectCmd = f'{CLI_PREFIX}neofs-cli --host {NEOFS_ENDPOINT} --key {binascii.hexlify(private_key).decode()} object search {keys} --cid {cid} {bearer_token} {option}' logger.info("Cmd: %s" % ObjectCmd) try: complProc = subprocess.run(ObjectCmd, check=True, universal_newlines=True, @@ -190,7 +214,7 @@ def search_object(private_key: bytes, cid: str, keys: str, *expected_objects_lis logger.info("Output: %s" % complProc.stdout) - if expected_objects_list is not None: + if expected_objects_list: found_objects = re.findall(r'%s: ([\-\w]+)' % cid, complProc.stdout) if sorted(found_objects) == sorted(expected_objects_list): @@ -326,12 +350,16 @@ def _check_linked_object(obj:str, child_obj_list_headers:dict, payload_size:int, @keyword('Head object') -def head_object(private_key: bytes, cid: str, oid: str, full_headers:bool=False, **user_headers_dict): +def head_object(private_key: bytes, cid: str, oid: str, bearer: str, full_headers:bool=False, **user_headers_dict): options = "" if full_headers: options = "--full-headers" - ObjectCmd = f'{CLI_PREFIX}neofs-cli --host {NEOFS_ENDPOINT} --key {binascii.hexlify(private_key).decode()} object head --cid {cid} --oid {oid} {options}' + bearer_token = "" + if bearer: + bearer_token = f"--bearer {bearer}" + + ObjectCmd = f'{CLI_PREFIX}neofs-cli --host {NEOFS_ENDPOINT} --key {binascii.hexlify(private_key).decode()} object head --cid {cid} --oid {oid} {bearer_token} {options}' logger.info("Cmd: %s" % ObjectCmd) try: complProc = subprocess.run(ObjectCmd, check=True, universal_newlines=True, @@ -414,14 +442,7 @@ def parse_object_system_header(header: str): logger.info("Result: %s" % result_header) return result_header -# SystemHeader: -# - ID=c9fdc3e8-6576-4822-9bc4-2a0addcbf105 -# - CID=42n81QNr7o513t2pTGuzM2PPFiHLhJ1MeSCJzizQW1wP -# - OwnerID=ANwbVH8nyWfTg7G6L9uzZxfXhKUhdjTYDa -# - Version=1 -# - PayloadLength=1024 -# - CreatedAt={UnixTime=1597330026 Epoch=2427} - + @keyword('Parse Object Extended Header') def parse_object_extended_header(header: str): @@ -429,36 +450,27 @@ def parse_object_extended_header(header: str): pattern = re.compile(r'- Type=(\w+)\n.+Value=(.+)\n') - # key in dict.keys() + for (f_type, f_val) in re.findall(pattern, header): logger.info("found: %s - %s" % (f_type, f_val)) if f_type not in result_header.keys(): result_header[f_type] = [] - - # if {} -> dict -> if re.search(r'(%s)' % cid, output): + result_header[f_type].append(f_val) logger.info("Result: %s" % result_header) return result_header -# ExtendedHeaders: -# - Type=UserHeader -# Value={Key=key1 Val=1} -# - Type=UserHeader -# Value={Key=key2 Val='abc1'} -# - Type=Token -# Value={ID=6143e50f-5dbf-4964-ba16-266517e4fe9a Verb=Put} -# - Type=HomoHash -# Value=4c3304688e23b884f29a3e50cb65e067357d074f52e1e634a940a7488f40a3f53ffb0cb94d4b9c619432307fa615eb076d0c3d153acdd77835acac0553992238 -# - Type=PayloadChecksum -# Value=776bc1c03d2c72885c4976b000e2483df57275964308cc67eb36a829cad9a2c3 -# - Type=Integrity -# Value={Checksum=45859b067c6525b6f9fa78b9764ceca0a0eeb506cefd71c374aabd4cfd773430 Signature=04e80f81919fa14879b04fcad0fab411ebb0b7c38f00f030c98a4813ae402300b79b666c705317b358a17963d50ee5dceab4f6f3599e54da210b860df2f8b2a63c} - + @keyword('Delete object') -def delete_object(private_key: bytes, cid: str, oid: str): - ObjectCmd = f'{CLI_PREFIX}neofs-cli --host {NEOFS_ENDPOINT} --key {binascii.hexlify(private_key).decode()} object delete --cid {cid} --oid {oid}' +def delete_object(private_key: bytes, cid: str, oid: str, bearer: str): + + bearer_token = "" + if bearer: + bearer_token = f"--bearer {bearer}" + + ObjectCmd = f'{CLI_PREFIX}neofs-cli --host {NEOFS_ENDPOINT} --key {binascii.hexlify(private_key).decode()} object delete --cid {cid} --oid {oid} {bearer_token}' try: complProc = subprocess.run(ObjectCmd, check=True, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=15, shell=True) @@ -524,8 +536,9 @@ def cleanup_file(filename: str): @keyword('Put object to NeoFS') -def put_object(private_key: bytes, path: str, cid: str, **kwargs): +def put_object(private_key: bytes, path: str, cid: str, bearer: str, **kwargs): logger.info("Going to put the object") + user_headers = "" user_headers_dict = kwargs if kwargs: @@ -533,6 +546,10 @@ def put_object(private_key: bytes, path: str, cid: str, **kwargs): for key, value in dict(kwargs).items(): user_headers = f'{user_headers} --user "{key}"="{value}"' + bearer_token = "" + if bearer: + bearer_token = f"--bearer {bearer}" + # Put object to cli container putObjectCont = f'docker cp {path} neofs-cli:/ ' @@ -541,7 +558,7 @@ def put_object(private_key: bytes, path: str, cid: str, **kwargs): stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=60, shell=True) - putObjectCmd = f'{CLI_PREFIX}neofs-cli --host {NEOFS_ENDPOINT} --key {binascii.hexlify(private_key).decode()} object put --verify --file {path} --cid {cid} {user_headers}' + putObjectCmd = f'{CLI_PREFIX}neofs-cli --host {NEOFS_ENDPOINT} --key {binascii.hexlify(private_key).decode()} object put --verify --file {path} --cid {cid} {bearer_token} {user_headers}' logger.info("Cmd: %s" % putObjectCmd) complProc = subprocess.run(putObjectCmd, check=True, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=60, shell=True) @@ -551,8 +568,16 @@ def put_object(private_key: bytes, path: str, cid: str, **kwargs): @keyword('Get object from NeoFS') -def get_object(private_key: bytes, cid: str, oid: str, read_object: str): - ObjectCmd = f'{CLI_PREFIX}neofs-cli --host {NEOFS_ENDPOINT} --key {binascii.hexlify(private_key).decode()} object get --cid {cid} --oid {oid} --file {read_object}' +def get_object(private_key: bytes, cid: str, oid: str, bearer: str, read_object: str): + + bearer_token = "" + if bearer: + bearer_token = f"--bearer {bearer}" + + + ObjectCmd = f'{CLI_PREFIX}neofs-cli --host {NEOFS_ENDPOINT} --key {binascii.hexlify(private_key).decode()} object get --cid {cid} --oid {oid} --file {read_object} {bearer_token}' + + logger.info("Cmd: %s" % ObjectCmd) try: @@ -639,10 +664,19 @@ def _get_storage_nodes(private_key: bytes): def _search_object(node:str, private_key: bytes, cid:str, oid: str): Cmd = f'{CLI_PREFIX}neofs-cli --host {node} --ttl 1 --key {binascii.hexlify(private_key).decode()} object search --root --cid {cid} ID {oid}' - complProc = subprocess.run(Cmd, check=True, universal_newlines=True, - stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=15, shell=True) - logger.info(Cmd) - logger.info("Output:") - logger.info(complProc.stdout) - return complProc.stdout \ No newline at end of file + try: + logger.info(Cmd) + complProc = subprocess.run(Cmd, check=True, universal_newlines=True, + stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=15, shell=True) + logger.info("Output: %s" % complProc.stdout) + return complProc.stdout + + except subprocess.CalledProcessError as e: + if "FailedPrecondition: server is not presented in container" in e.output: + logger.info("FailedPrecondition: server is not presented in container.") + else: + raise Exception("command '{}' return with error (code {}): {}".format(e.cmd, e.returncode, e.output)) + + + \ No newline at end of file diff --git a/robot/testsuites/integration/acl_basic.robot b/robot/testsuites/integration/acl_basic.robot index 4546c035..2981ab93 100644 --- a/robot/testsuites/integration/acl_basic.robot +++ b/robot/testsuites/integration/acl_basic.robot @@ -73,32 +73,32 @@ Check Private Container # Expected: User - pass, Other - fail, System(IR) - pass (+ System(Container node) - pass, Non-container node - fail). # Put - ${S_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${PRIV_CID} + ${S_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${PRIV_CID} ${EMPTY} Run Keyword And Expect Error * - ... Put object to NeoFS ${OTHER_KEY} ${FILE_S} ${PRIV_CID} + ... Put object to NeoFS ${OTHER_KEY} ${FILE_S} ${PRIV_CID} ${EMPTY} Run Keyword And Expect Error * - ... Put object to NeoFS ${SYSTEM_KEY} ${FILE_S} ${PRIV_CID} - ${S_OID_SYS_SN} = Put object to NeoFS ${SYSTEM_KEY_STOR_NODE} ${FILE_S} ${PRIV_CID} + ... Put object to NeoFS ${SYSTEM_KEY} ${FILE_S} ${PRIV_CID} ${EMPTY} + ${S_OID_SYS_SN} = Put object to NeoFS ${SYSTEM_KEY_STOR_NODE} ${FILE_S} ${PRIV_CID} ${EMPTY} # Get - Get object from NeoFS ${USER_KEY} ${PRIV_CID} ${S_OID_USER} s_file_read + Get object from NeoFS ${USER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} s_file_read Run Keyword And Expect Error * - ... Get object from NeoFS ${OTHER_KEY} ${PRIV_CID} ${S_OID_USER} s_file_read + ... Get object from NeoFS ${OTHER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} s_file_read Run Keyword And Expect Error * - ... Get object from NeoFS ${SYSTEM_KEY} ${PRIV_CID} ${S_OID_USER} s_file_read - Get object from NeoFS ${SYSTEM_KEY_STOR_NODE} ${PRIV_CID} ${S_OID_USER} s_file_read + ... Get object from NeoFS ${SYSTEM_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} s_file_read + Get object from NeoFS ${SYSTEM_KEY_STOR_NODE} ${PRIV_CID} ${S_OID_USER} ${EMPTY} s_file_read # Get Range - Get Range ${USER_KEY} ${PRIV_CID} ${S_OID_USER} 0:256 + Get Range ${USER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} 0:256 Run Keyword And Expect Error * - ... Get Range ${OTHER_KEY} ${PRIV_CID} ${S_OID_USER} 0:256 + ... Get Range ${OTHER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} 0:256 Run Keyword And Expect Error * - ... Get Range ${SYSTEM_KEY} ${PRIV_CID} ${S_OID_USER} 0:256 + ... Get Range ${SYSTEM_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} 0:256 Run Keyword And Expect Error * - ... Get Range ${SYSTEM_KEY_STOR_NODE} ${PRIV_CID} ${S_OID_USER} 0:256 + ... Get Range ${SYSTEM_KEY_STOR_NODE} ${PRIV_CID} ${S_OID_USER} ${EMPTY} 0:256 # TODO: GetRangeHash # get-range-hash --cid --oid [--bearer ] [--verify --file ] [--salt ] [: [...]] @@ -109,30 +109,30 @@ Check Private Container # Search @{S_OBJ_PRIV} = Create List ${S_OID_USER} ${S_OID_SYS_SN} - Search object ${USER_KEY} ${PRIV_CID} ${EMPTY} @{S_OBJ_PRIV} + Search object ${USER_KEY} ${PRIV_CID} ${EMPTY} ${EMPTY} @{S_OBJ_PRIV} Run Keyword And Expect Error * - ... Search object ${OTHER_KEY} ${PRIV_CID} ${EMPTY} @{S_OBJ_PRIV} - Search object ${SYSTEM_KEY} ${PRIV_CID} ${EMPTY} @{S_OBJ_PRIV} - Search object ${SYSTEM_KEY_STOR_NODE} ${PRIV_CID} ${EMPTY} @{S_OBJ_PRIV} + ... Search object ${OTHER_KEY} ${PRIV_CID} ${EMPTY} ${EMPTY} @{S_OBJ_PRIV} + Search object ${SYSTEM_KEY} ${PRIV_CID} ${EMPTY} ${EMPTY} @{S_OBJ_PRIV} + Search object ${SYSTEM_KEY_STOR_NODE} ${PRIV_CID} ${EMPTY} ${EMPTY} @{S_OBJ_PRIV} # Head - Head object ${USER_KEY} ${PRIV_CID} ${S_OBJ_PRIV} ${True} + Head object ${USER_KEY} ${PRIV_CID} ${S_OBJ_PRIV} ${EMPTY} ${True} Run Keyword And Expect Error * - ... Head object ${OTHER_KEY} ${PRIV_CID} ${S_OBJ_PRIV} ${True} - Head object ${SYSTEM_KEY} ${PRIV_CID} ${S_OBJ_PRIV} ${True} - Head object ${SYSTEM_KEY_STOR_NODE} ${PRIV_CID} ${S_OBJ_PRIV} ${True} + ... Head object ${OTHER_KEY} ${PRIV_CID} ${S_OBJ_PRIV} ${EMPTY} ${True} + Head object ${SYSTEM_KEY} ${PRIV_CID} ${S_OBJ_PRIV} ${EMPTY} ${True} + Head object ${SYSTEM_KEY_STOR_NODE} ${PRIV_CID} ${S_OBJ_PRIV} ${EMPTY} ${True} # Delete - Delete object ${USER_KEY} ${PRIV_CID} ${S_OID_USER} + Delete object ${USER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} Run Keyword And Expect Error * - ... Delete object ${OTHER_KEY} ${PRIV_CID} ${S_OID_USER} + ... Delete object ${OTHER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} Run Keyword And Expect Error * - ... Delete object ${SYSTEM_KEY} ${PRIV_CID} ${S_OID_USER} + ... Delete object ${SYSTEM_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} Run Keyword And Expect Error * - ... Delete object ${SYSTEM_KEY_STOR_NODE} ${PRIV_CID} ${S_OID_USER} + ... Delete object ${SYSTEM_KEY_STOR_NODE} ${PRIV_CID} ${S_OID_USER} ${EMPTY} @@ -141,28 +141,28 @@ Check Public Container # Expected: User - pass, Other - fail, System(IR) - pass (+ System(Container node) - pass, Non-container node - fail). # Put - ${S_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${PUBLIC_CID} - ${S_OID_OTHER} = Put object to NeoFS ${OTHER_KEY} ${FILE_S} ${PUBLIC_CID} + ${S_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${PUBLIC_CID} ${EMPTY} + ${S_OID_OTHER} = Put object to NeoFS ${OTHER_KEY} ${FILE_S} ${PUBLIC_CID} ${EMPTY} # By discussion, IR can not make any operations instead of HEAD, SEARCH and GET RANGE HASH at the current moment Run Keyword And Expect Error * - ... Put object to NeoFS ${SYSTEM_KEY} ${FILE_S} ${PUBLIC_CID} - ${S_OID_SYS_SN} = Put object to NeoFS ${SYSTEM_KEY_STOR_NODE} ${FILE_S} ${PUBLIC_CID} + ... Put object to NeoFS ${SYSTEM_KEY} ${FILE_S} ${PUBLIC_CID} ${EMPTY} + ${S_OID_SYS_SN} = Put object to NeoFS ${SYSTEM_KEY_STOR_NODE} ${FILE_S} ${PUBLIC_CID} ${EMPTY} # Get - Get object from NeoFS ${USER_KEY} ${PUBLIC_CID} ${S_OID_USER} s_file_read - Get object from NeoFS ${OTHER_KEY} ${PUBLIC_CID} ${S_OID_USER} s_file_read + Get object from NeoFS ${USER_KEY} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} s_file_read + Get object from NeoFS ${OTHER_KEY} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} s_file_read # By discussion, IR can not make any operations instead of HEAD, SEARCH and GET RANGE HASH at the current moment Run Keyword And Expect Error * - ... Get object from NeoFS ${SYSTEM_KEY} ${PUBLIC_CID} ${S_OID_USER} s_file_read - Get object from NeoFS ${SYSTEM_KEY_STOR_NODE} ${PUBLIC_CID} ${S_OID_USER} s_file_read + ... Get object from NeoFS ${SYSTEM_KEY} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} s_file_read + Get object from NeoFS ${SYSTEM_KEY_STOR_NODE} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} s_file_read # Get Range - Get Range ${USER_KEY} ${PUBLIC_CID} ${S_OID_USER} 0:256 - Get Range ${OTHER_KEY} ${PUBLIC_CID} ${S_OID_USER} 0:256 + Get Range ${USER_KEY} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} 0:256 + Get Range ${OTHER_KEY} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} 0:256 # By discussion, IR can not make any operations instead of HEAD, SEARCH and GET RANGE HASH at the current moment Run Keyword And Expect Error * - ... Get Range ${SYSTEM_KEY} ${PUBLIC_CID} ${S_OID_USER} 0:256 - Get Range ${SYSTEM_KEY_STOR_NODE} ${PUBLIC_CID} ${S_OID_USER} 0:256 + ... Get Range ${SYSTEM_KEY} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} 0:256 + Get Range ${SYSTEM_KEY_STOR_NODE} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} 0:256 # TODO: GetRangeHash # get-range-hash --cid --oid [--bearer ] [--verify --file ] [--salt ] [: [...]] @@ -173,63 +173,63 @@ Check Public Container # Search @{S_OBJ_PRIV} = Create List ${S_OID_USER} ${S_OID_OTHER} ${S_OID_SYS_SN} - Search object ${USER_KEY} ${PUBLIC_CID} ${EMPTY} @{S_OBJ_PRIV} - Search object ${OTHER_KEY} ${PUBLIC_CID} ${EMPTY} @{S_OBJ_PRIV} - Search object ${SYSTEM_KEY} ${PUBLIC_CID} ${EMPTY} @{S_OBJ_PRIV} - Search object ${SYSTEM_KEY_STOR_NODE} ${PUBLIC_CID} ${EMPTY} @{S_OBJ_PRIV} + Search object ${USER_KEY} ${PUBLIC_CID} ${EMPTY} ${EMPTY} @{S_OBJ_PRIV} + Search object ${OTHER_KEY} ${PUBLIC_CID} ${EMPTY} ${EMPTY} @{S_OBJ_PRIV} + Search object ${SYSTEM_KEY} ${PUBLIC_CID} ${EMPTY} ${EMPTY} @{S_OBJ_PRIV} + Search object ${SYSTEM_KEY_STOR_NODE} ${PUBLIC_CID} ${EMPTY} ${EMPTY} @{S_OBJ_PRIV} # Head - Head object ${USER_KEY} ${PUBLIC_CID} ${S_OID_USER} ${True} - Head object ${OTHER_KEY} ${PUBLIC_CID} ${S_OID_USER} ${True} - Head object ${SYSTEM_KEY} ${PUBLIC_CID} ${S_OID_USER} ${True} - Head object ${SYSTEM_KEY_STOR_NODE} ${PUBLIC_CID} ${S_OID_USER} ${True} + Head object ${USER_KEY} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} ${True} + Head object ${OTHER_KEY} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} ${True} + Head object ${SYSTEM_KEY} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} ${True} + Head object ${SYSTEM_KEY_STOR_NODE} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} ${True} - Head object ${USER_KEY} ${PUBLIC_CID} ${S_OID_OTHER} ${True} - Head object ${OTHER_KEY} ${PUBLIC_CID} ${S_OID_OTHER} ${True} - Head object ${SYSTEM_KEY} ${PUBLIC_CID} ${S_OID_OTHER} ${True} - Head object ${SYSTEM_KEY_STOR_NODE} ${PUBLIC_CID} ${S_OID_OTHER} ${True} + Head object ${USER_KEY} ${PUBLIC_CID} ${S_OID_OTHER} ${EMPTY} ${True} + Head object ${OTHER_KEY} ${PUBLIC_CID} ${S_OID_OTHER} ${EMPTY} ${True} + Head object ${SYSTEM_KEY} ${PUBLIC_CID} ${S_OID_OTHER} ${EMPTY} ${True} + Head object ${SYSTEM_KEY_STOR_NODE} ${PUBLIC_CID} ${S_OID_OTHER} ${EMPTY} ${True} - Head object ${USER_KEY} ${PUBLIC_CID} ${S_OID_SYS_SN} ${True} - Head object ${OTHER_KEY} ${PUBLIC_CID} ${S_OID_SYS_SN} ${True} - Head object ${SYSTEM_KEY} ${PUBLIC_CID} ${S_OID_SYS_SN} ${True} - Head object ${SYSTEM_KEY_STOR_NODE} ${PUBLIC_CID} ${S_OID_SYS_SN} ${True} + Head object ${USER_KEY} ${PUBLIC_CID} ${S_OID_SYS_SN} ${EMPTY} ${True} + Head object ${OTHER_KEY} ${PUBLIC_CID} ${S_OID_SYS_SN} ${EMPTY} ${True} + Head object ${SYSTEM_KEY} ${PUBLIC_CID} ${S_OID_SYS_SN} ${EMPTY} ${True} + Head object ${SYSTEM_KEY_STOR_NODE} ${PUBLIC_CID} ${S_OID_SYS_SN} ${EMPTY} ${True} # Delete - Delete object ${USER_KEY} ${PUBLIC_CID} ${S_OID_USER} - Delete object ${OTHER_KEY} ${PUBLIC_CID} ${S_OID_USER} + Delete object ${USER_KEY} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} + Delete object ${OTHER_KEY} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} Run Keyword And Expect Error * - ... Delete object ${SYSTEM_KEY} ${PUBLIC_CID} ${S_OID_USER} - Delete object ${SYSTEM_KEY_STOR_NODE} ${PUBLIC_CID} ${S_OID_USER} + ... Delete object ${SYSTEM_KEY} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} + Delete object ${SYSTEM_KEY_STOR_NODE} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} Check Read-Only Container # Check Read Only container: # Put - ${S_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${READONLY_CID} + ${S_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${READONLY_CID} ${EMPTY} Run Keyword And Expect Error * - ... Put object to NeoFS ${OTHER_KEY} ${FILE_S} ${READONLY_CID} + ... Put object to NeoFS ${OTHER_KEY} ${FILE_S} ${READONLY_CID} ${EMPTY} Run Keyword And Expect Error * - ... Put object to NeoFS ${SYSTEM_KEY} ${FILE_S} ${READONLY_CID} - ${S_OID_SYS_SN} = Put object to NeoFS ${SYSTEM_KEY_STOR_NODE} ${FILE_S} ${READONLY_CID} + ... Put object to NeoFS ${SYSTEM_KEY} ${FILE_S} ${READONLY_CID} ${EMPTY} + ${S_OID_SYS_SN} = Put object to NeoFS ${SYSTEM_KEY_STOR_NODE} ${FILE_S} ${READONLY_CID} ${EMPTY} # Get - Get object from NeoFS ${USER_KEY} ${READONLY_CID} ${S_OID_USER} s_file_read - Get object from NeoFS ${OTHER_KEY} ${READONLY_CID} ${S_OID_USER} s_file_read + Get object from NeoFS ${USER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} s_file_read + Get object from NeoFS ${OTHER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} s_file_read # By discussion, IR can not make any operations instead of HEAD, SEARCH and GET RANGE HASH at the current moment Run Keyword And Expect Error * - ... Get object from NeoFS ${SYSTEM_KEY} ${READONLY_CID} ${S_OID_USER} s_file_read - Get object from NeoFS ${SYSTEM_KEY_STOR_NODE} ${READONLY_CID} ${S_OID_USER} s_file_read + ... Get object from NeoFS ${SYSTEM_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} s_file_read + Get object from NeoFS ${SYSTEM_KEY_STOR_NODE} ${READONLY_CID} ${S_OID_USER} ${EMPTY} s_file_read # Get Range - Get Range ${USER_KEY} ${READONLY_CID} ${S_OID_USER} 0:256 - Get Range ${OTHER_KEY} ${READONLY_CID} ${S_OID_USER} 0:256 + Get Range ${USER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} 0:256 + Get Range ${OTHER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} 0:256 # By discussion, IR can not make any operations instead of HEAD, SEARCH and GET RANGE HASH at the current moment Run Keyword And Expect Error * - ... Get Range ${SYSTEM_KEY} ${READONLY_CID} ${S_OID_USER} 0:256 - Get Range ${SYSTEM_KEY_STOR_NODE} ${READONLY_CID} ${S_OID_USER} 0:256 + ... Get Range ${SYSTEM_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} 0:256 + Get Range ${SYSTEM_KEY_STOR_NODE} ${READONLY_CID} ${S_OID_USER} ${EMPTY} 0:256 # TODO: GetRangeHash # get-range-hash --cid --oid [--bearer ] [--verify --file ] [--salt ] [: [...]] @@ -240,23 +240,23 @@ Check Read-Only Container # Search @{S_OBJ_RO} = Create List ${S_OID_USER} ${S_OID_SYS_SN} - Search object ${USER_KEY} ${READONLY_CID} ${EMPTY} @{S_OBJ_RO} - Search object ${OTHER_KEY} ${READONLY_CID} ${EMPTY} @{S_OBJ_RO} - Search object ${SYSTEM_KEY} ${READONLY_CID} ${EMPTY} @{S_OBJ_RO} - Search object ${SYSTEM_KEY_STOR_NODE} ${READONLY_CID} ${EMPTY} @{S_OBJ_RO} + Search object ${USER_KEY} ${READONLY_CID} ${EMPTY} ${EMPTY} @{S_OBJ_RO} + Search object ${OTHER_KEY} ${READONLY_CID} ${EMPTY} ${EMPTY} @{S_OBJ_RO} + Search object ${SYSTEM_KEY} ${READONLY_CID} ${EMPTY} ${EMPTY} @{S_OBJ_RO} + Search object ${SYSTEM_KEY_STOR_NODE} ${READONLY_CID} ${EMPTY} ${EMPTY} @{S_OBJ_RO} # Head - Head object ${USER_KEY} ${READONLY_CID} ${S_OID_USER} ${True} - Head object ${OTHER_KEY} ${READONLY_CID} ${S_OID_USER} ${True} - Head object ${SYSTEM_KEY} ${READONLY_CID} ${S_OID_USER} ${True} - Head object ${SYSTEM_KEY_STOR_NODE} ${READONLY_CID} ${S_OID_USER} ${True} + Head object ${USER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} ${True} + Head object ${OTHER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} ${True} + Head object ${SYSTEM_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} ${True} + Head object ${SYSTEM_KEY_STOR_NODE} ${READONLY_CID} ${S_OID_USER} ${EMPTY} ${True} # Delete - Delete object ${USER_KEY} ${READONLY_CID} ${S_OID_USER} + Delete object ${USER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} Run Keyword And Expect Error * - ... Delete object ${OTHER_KEY} ${READONLY_CID} ${S_OID_USER} + ... Delete object ${OTHER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} Run Keyword And Expect Error * - ... Delete object ${SYSTEM_KEY} ${READONLY_CID} ${S_OID_USER} + ... Delete object ${SYSTEM_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} Run Keyword And Expect Error * - ... Delete object ${SYSTEM_KEY_STOR_NODE} ${READONLY_CID} ${S_OID_USER} \ No newline at end of file + ... Delete object ${SYSTEM_KEY_STOR_NODE} ${READONLY_CID} ${S_OID_USER} ${EMPTY} \ No newline at end of file diff --git a/robot/testsuites/integration/acl_bearer.robot b/robot/testsuites/integration/acl_bearer.robot new file mode 100644 index 00000000..3edddbb2 --- /dev/null +++ b/robot/testsuites/integration/acl_bearer.robot @@ -0,0 +1,175 @@ +*** Settings *** +Variables ../../variables/common.py + +Library Collections +Library ${RESOURCES}/environment.py +Library ${RESOURCES}/neo.py +Library ${RESOURCES}/neofs.py + + +*** Variables *** +&{FILE_USR_HEADER} = key1=1 key2='abc1' +&{FILE_USR_HEADER_DEL} = key1=del key2=del +&{FILE_OTH_HEADER} = key1=oth key2=oth + +*** Test cases *** +Extended ACL Operations + [Documentation] Testcase to validate NeoFS operations with extended ACL. + [Tags] ACL NeoFS NeoCLI BearerToken + [Timeout] 20 min + + Generate Keys + Generate file + Prepare eACL Role rules + Check Bearer + + + +*** Keywords *** + + +Check Bearer + Check eACL Deny and Allow All Bearer + Check Container Inaccessible and Allow All Bearer + + + + + +Generate Keys + ${USER_KEY_GEN} = Generate Neo private key + ${OTHER_KEY_GEN} = Generate Neo private key + ${EACL_KEY_GEN} = Form Privkey from String 782676b81a35c5f07325ec523e8521ee4946b6e5d4c6cd652dd0c3ba51ce03de + Get Neo public key ${EACL_KEY_GEN} + ${SYSTEM_KEY_GEN} = Form Privkey from String c428b4a06f166fde9f8afcf918194acdde35aa2612ecf42fe0c94273425ded21 + + + ${SYSTEM_KEY_GEN_SN} = Form Privkey from String 0fa21a94be2227916284e4b3495180d9c93d04f095fe9d5a86f22044f5c411d2 + + + Set Global Variable ${USER_KEY} ${USER_KEY_GEN} + Set Global Variable ${OTHER_KEY} ${OTHER_KEY_GEN} + Set Global Variable ${EACL_KEY} ${EACL_KEY_GEN} + Set Global Variable ${SYSTEM_KEY} ${SYSTEM_KEY_GEN} + + Set Global Variable ${SYSTEM_KEY_SN} ${SYSTEM_KEY_GEN_SN} + + +Create Container Public + Log Create Public Container + ${PUBLIC_CID_GEN} = Create container ${USER_KEY} 0x2FFFFFFF + [Return] ${PUBLIC_CID_GEN} + + +Create Container Inaccessible + Log Create Inaccessible Container + ${PUBLIC_CID_GEN} = Create container ${USER_KEY} 0x20000000 + [Return] ${PUBLIC_CID_GEN} + + + +Generate file + # Generate small file + ${FILE_S_GEN} = Generate file of bytes 1024 + Set Global Variable ${FILE_S} ${FILE_S_GEN} + + +Prepare eACL Role rules + Log Set eACL for different Role cases + Set Global Variable ${EACL_DENY_ALL_OTHER} 0007000000020000000100000001000000030000000000020000000300000001000000030000000000020000000200000001000000030000000000020000000500000001000000030000000000020000000400000001000000030000000000020000000600000001000000030000000000020000000700000001000000030000 + Set Global Variable ${EACL_ALLOW_ALL_OTHER} 0007000000010000000100000001000000030000000000010000000300000001000000030000000000010000000200000001000000030000000000010000000500000001000000030000000000010000000400000001000000030000000000010000000600000001000000030000000000010000000700000001000000030000 + + Set Global Variable ${EACL_DENY_ALL_USER} 0007000000020000000100000001000000010000000000020000000300000001000000010000000000020000000200000001000000010000000000020000000500000001000000010000000000020000000400000001000000010000000000020000000600000001000000010000000000020000000700000001000000010000 + Set Global Variable ${EACL_ALLOW_ALL_USER} 0007000000010000000100000001000000010000000000010000000300000001000000010000000000010000000200000001000000010000000000010000000500000001000000010000000000010000000400000001000000010000000000010000000600000001000000010000000000010000000700000001000000010000 + + Set Global Variable ${EACL_DENY_ALL_SYSTEM} 0007000000020000000100000001000000020000000000020000000300000001000000020000000000020000000200000001000000020000000000020000000500000001000000020000000000020000000400000001000000020000000000020000000600000001000000020000000000020000000700000001000000020000 + Set Global Variable ${EACL_ALLOW_ALL_SYSTEM} 0007000000010000000100000001000000020000000000010000000300000001000000020000000000010000000200000001000000020000000000010000000500000001000000020000000000010000000400000001000000020000000000010000000600000001000000020000000000010000000700000001000000020000 + + + Set Global Variable ${EACL_ALLOW_ALL_Pubkey} 000e000000010000000100000001000000000001002103db43cba61ef948a65c20b326b9409911341436478dfdd7472c9af6b10bb60000000000010000000300000001000000000001002103db43cba61ef948a65c20b326b9409911341436478dfdd7472c9af6b10bb60000000000010000000200000001000000000001002103db43cba61ef948a65c20b326b9409911341436478dfdd7472c9af6b10bb60000000000010000000500000001000000000001002103db43cba61ef948a65c20b326b9409911341436478dfdd7472c9af6b10bb60000000000010000000400000001000000000001002103db43cba61ef948a65c20b326b9409911341436478dfdd7472c9af6b10bb60000000000010000000600000001000000000001002103db43cba61ef948a65c20b326b9409911341436478dfdd7472c9af6b10bb60000000000010000000700000001000000000001002103db43cba61ef948a65c20b326b9409911341436478dfdd7472c9af6b10bb60000000000020000000100000001000000030000000000020000000300000001000000030000000000020000000200000001000000030000000000020000000500000001000000030000000000020000000400000001000000030000000000020000000600000001000000030000000000020000000700000001000000030000 + + +Check Container Inaccessible and Allow All Bearer + ${CID} = Create Container Inaccessible + + Run Keyword And Expect Error * + ... Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} &{FILE_USR_HEADER} + Run Keyword And Expect Error * + ... Get object from NeoFS ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl + Run Keyword And Expect Error * + ... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} + Run Keyword And Expect Error * + ... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${True} + Run Keyword And Expect Error * + ... Get Range ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 + Run Keyword And Expect Error * + ... Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} + + + Run Keyword And Expect Error * + ... Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} ${EACL_ALLOW_ALL_USER} &{FILE_USR_HEADER} + Run Keyword And Expect Error * + ... Get object from NeoFS ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_ALLOW_ALL_USER} local_file_eacl + Run Keyword And Expect Error * + ... Search object ${USER_KEY} ${CID} ${EMPTY} ${EACL_ALLOW_ALL_USER} @{S_OBJ_H} &{FILE_USR_HEADER} + Run Keyword And Expect Error * + ... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_ALLOW_ALL_USER} ${True} + Run Keyword And Expect Error * + ... Get Range ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_ALLOW_ALL_USER} 0:256 + Run Keyword And Expect Error * + ... Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_ALLOW_ALL_USER} + + + +Check eACL Deny and Allow All Bearer + ${CID} = Create Container Public + ${S_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} &{FILE_USR_HEADER} + ${D_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} &{FILE_USR_HEADER_DEL} + @{S_OBJ_H} = Create List ${S_OID_USER} + + + + + Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} &{FILE_OTH_HEADER} + Get object from NeoFS ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl + Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} + Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${True} + Get Range ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 + Delete object ${USER_KEY} ${CID} ${D_OID_USER} ${EMPTY} + + Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_USER} + Sleep ${MORPH_BLOCK_TIMEOUT} + + Run Keyword And Expect Error * + ... Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} &{FILE_USR_HEADER} + Run Keyword And Expect Error * + ... Get object from NeoFS ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl + Run Keyword And Expect Error * + ... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} + Run Keyword And Expect Error * + ... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${True} + Run Keyword And Expect Error * + ... Get Range ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 + Run Keyword And Expect Error * + ... Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} + + + Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} ${EACL_ALLOW_ALL_USER} &{FILE_OTH_HEADER} + Get object from NeoFS ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_ALLOW_ALL_USER} local_file_eacl + Search object ${USER_KEY} ${CID} ${EMPTY} ${EACL_ALLOW_ALL_USER} @{S_OBJ_H} &{FILE_USR_HEADER} + Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_ALLOW_ALL_USER} ${True} + Get Range ${USER_KEY} ${CID} ${S_OID_USER} ${EACL_ALLOW_ALL_USER} 0:256 + Delete object ${USER_KEY} ${CID} ${D_OID_USER} ${EACL_ALLOW_ALL_USER} + + + + + +Check eACL Deny and Allow All + [Arguments] ${KEY} ${DENY_EACL} ${ALLOW_EACL} + + + + + + diff --git a/robot/testsuites/integration/acl_extended.robot b/robot/testsuites/integration/acl_extended.robot index 717bb1fd..f35c6bdb 100644 --- a/robot/testsuites/integration/acl_extended.robot +++ b/robot/testsuites/integration/acl_extended.robot @@ -15,7 +15,7 @@ Library ${RESOURCES}/neofs.py *** Test cases *** Extended ACL Operations [Documentation] Testcase to validate NeoFS operations with extended ACL. - [Tags] ACL NeoFS NeoCLI + [Tags] ACL eACL NeoFS NeoCLI [Timeout] 20 min Generate Keys @@ -42,107 +42,107 @@ Check Filters Check eACL MatchType String Equal ${CID} = Create Container Public - ${S_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} &{FILE_USR_HEADER} + ${S_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} &{FILE_USR_HEADER} - ${HEADER} = Head object ${USER_KEY} ${CID} ${S_OID_USER} ${True} + ${HEADER} = Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${True} &{SYS_HEADER_PARSED} = Parse Object System Header ${HEADER} - Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl + Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Log Set eACL for Deny GET operation with StringEqual Object ID ${ID_value} = Get From Dictionary ${SYS_HEADER_PARSED} ID ${ID_value_hex} = Convert Str to Hex Str with Len ${ID_value} Set custom eACL ${USER_KEY} ${CID} 000100000002000000010001000000020000000100024944 ${ID_value_hex} 0001000000030000 - Sleep 15sec + Sleep ${MORPH_BLOCK_TIMEOUT} Run Keyword And Expect Error * - ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl + ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Log Set eACL for Deny GET operation with StringEqual Object CID ${CID_value} = Get From Dictionary ${SYS_HEADER_PARSED} CID ${CID_value_hex} = Convert Str to Hex Str with Len ${CID_value} Set custom eACL ${USER_KEY} ${CID} 00010000000200000001000100000002000000010003434944 ${CID_value_hex} 0001000000030000 - Sleep 15sec + Sleep ${MORPH_BLOCK_TIMEOUT} Run Keyword And Expect Error * - ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl + ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Log Set eACL for Deny GET operation with StringEqual Object OwnerID ${OwnerID_value} = Get From Dictionary ${SYS_HEADER_PARSED} OwnerID ${OwnerID_value_hex} = Convert Str to Hex Str with Len ${OwnerID_value} Set custom eACL ${USER_KEY} ${CID} 000100000002000000010001000000020000000100084f574e45525f4944 ${OwnerID_value_hex} 0001000000030000 - Sleep 15sec + Sleep ${MORPH_BLOCK_TIMEOUT} Run Keyword And Expect Error * - ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl + ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Log Set eACL for Deny GET operation with StringEqual Object Version ${Version_value} = Get From Dictionary ${SYS_HEADER_PARSED} Version ${Version_value_hex} = Convert Str to Hex Str with Len ${Version_value} Set custom eACL ${USER_KEY} ${CID} 0001000000020000000100010000000200000001000756455253494f4e ${Version_value_hex} 0001000000030000 - Sleep 15sec + Sleep ${MORPH_BLOCK_TIMEOUT} Run Keyword And Expect Error * - ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl + ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Log Set eACL for Deny GET operation with StringEqual Object PayloadLength ${Payload_value} = Get From Dictionary ${SYS_HEADER_PARSED} PayloadLength ${Payload_value_hex} = Convert Str to Hex Str with Len ${Payload_value} Set custom eACL ${USER_KEY} ${CID} 0001000000020000000100010000000200000001000e5041594c4f41445f4c454e475448 ${Payload_value_hex} 0001000000030000 - Sleep 15sec + Sleep ${MORPH_BLOCK_TIMEOUT} Run Keyword And Expect Error * - ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl + ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Log Set eACL for Deny GET operation with StringEqual Object CreatedAtUnixTime ${AtUnixTime_value} = Get From Dictionary ${SYS_HEADER_PARSED} CreatedAtUnixTime ${AtUnixTime_value_hex} = Convert Str to Hex Str with Len ${AtUnixTime_value} Set custom eACL ${USER_KEY} ${CID} 0001000000020000000100010000000200000001000c435245415445445f554e4958 ${AtUnixTime_value_hex} 0001000000030000 - Sleep 15sec + Sleep ${MORPH_BLOCK_TIMEOUT} Run Keyword And Expect Error * - ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl + ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Log Set eACL for Deny GET operation with StringEqual Object CreatedAtEpoch ${AtEpoch_value} = Get From Dictionary ${SYS_HEADER_PARSED} CreatedAtEpoch ${AtEpoch_value_hex} = Convert Str to Hex Str with Len ${AtEpoch_value} Set custom eACL ${USER_KEY} ${CID} 0001000000020000000100010000000200000001000d435245415445445f45504f4348 ${AtEpoch_value_hex} 0001000000030000 - Sleep 15sec + Sleep ${MORPH_BLOCK_TIMEOUT} Run Keyword And Expect Error * - ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl + ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Log Set eACL for Deny GET operation with StringEqual Object Extended User Header - ${S_OID_USER_OTH} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} &{FILE_OTH_HEADER} + ${S_OID_USER_OTH} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} &{FILE_OTH_HEADER} Set eACL ${USER_KEY} ${CID} 000100000002000000010001000000030000000100046b65793200062761626331270001000000030000 - Sleep 15sec + Sleep ${MORPH_BLOCK_TIMEOUT} Run Keyword And Expect Error * - ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl - Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER_OTH} local_file_eacl + ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl + Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER_OTH} ${EMPTY} local_file_eacl Check eACL MatchType String Not Equal ${CID} = Create Container Public ${FILE_S_2} = Generate file of bytes 2048 - ${S_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} &{FILE_USR_HEADER} + ${S_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} &{FILE_USR_HEADER} # Sleep for 1 epoch - Sleep 30sec - ${S_OID_OTHER} = Put object to NeoFS ${OTHER_KEY} ${FILE_S_2} ${CID} &{FILE_OTH_HEADER} - ${HEADER} = Head object ${USER_KEY} ${CID} ${S_OID_USER} ${True} - Head object ${USER_KEY} ${CID} ${S_OID_OTHER} ${True} + Sleep ${NEOFS_EPOCH_TIMEOUT} + ${S_OID_OTHER} = Put object to NeoFS ${OTHER_KEY} ${FILE_S_2} ${CID} ${EMPTY} &{FILE_OTH_HEADER} + ${HEADER} = Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${True} + Head object ${USER_KEY} ${CID} ${S_OID_OTHER} ${EMPTY} ${True} &{SYS_HEADER_PARSED} = Parse Object System Header ${HEADER} - Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl - Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_OTHER} local_file_eacl + Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl + Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_OTHER} ${EMPTY} local_file_eacl Log Set eACL for Deny GET operation with StringNotEqual Object ID ${ID_value} = Get From Dictionary ${SYS_HEADER_PARSED} ID ${ID_value_hex} = Convert Str to Hex Str with Len ${ID_value} Set custom eACL ${USER_KEY} ${CID} 000100000002000000010001000000020000000200024944 ${ID_value_hex} 0001000000030000 - Sleep 15sec + Sleep ${MORPH_BLOCK_TIMEOUT} Run Keyword And Expect Error * - ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_OTHER} local_file_eacl - Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl + ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_OTHER} ${EMPTY} local_file_eacl + Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl @@ -150,66 +150,66 @@ Check eACL MatchType String Not Equal ${CID_value} = Get From Dictionary ${SYS_HEADER_PARSED} CID ${CID_value_hex} = Convert Str to Hex Str with Len ${CID_value} Set custom eACL ${USER_KEY} ${CID} 00010000000200000001000100000002000000020003434944 ${CID_value_hex} 0001000000030000 - Sleep 15sec - Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_OTHER} local_file_eacl - Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl + Sleep ${MORPH_BLOCK_TIMEOUT} + Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_OTHER} ${EMPTY} local_file_eacl + Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Log Set eACL for Deny GET operation with StringEqual Object OwnerID ${OwnerID_value} = Get From Dictionary ${SYS_HEADER_PARSED} OwnerID ${OwnerID_value_hex} = Convert Str to Hex Str with Len ${OwnerID_value} Set custom eACL ${USER_KEY} ${CID} 000100000002000000010001000000020000000200084f574e45525f4944 ${OwnerID_value_hex} 0001000000030000 - Sleep 15sec + Sleep ${MORPH_BLOCK_TIMEOUT} Run Keyword And Expect Error * - ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_OTHER} local_file_eacl - Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl + ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_OTHER} ${EMPTY} local_file_eacl + Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Log Set eACL for Deny GET operation with StringEqual Object Version ${Version_value} = Get From Dictionary ${SYS_HEADER_PARSED} Version ${Version_value_hex} = Convert Str to Hex Str with Len ${Version_value} Set custom eACL ${USER_KEY} ${CID} 0001000000020000000100010000000200000002000756455253494f4e ${Version_value_hex} 0001000000030000 - Sleep 15sec - Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_OTHER} local_file_eacl - Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl + Sleep ${MORPH_BLOCK_TIMEOUT} + Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_OTHER} ${EMPTY} local_file_eacl + Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Log Set eACL for Deny GET operation with StringEqual Object PayloadLength ${Payload_value} = Get From Dictionary ${SYS_HEADER_PARSED} PayloadLength ${Payload_value_hex} = Convert Str to Hex Str with Len ${Payload_value} Set custom eACL ${USER_KEY} ${CID} 0001000000020000000100010000000200000002000e5041594c4f41445f4c454e475448 ${Payload_value_hex} 0001000000030000 - Sleep 15sec + Sleep ${MORPH_BLOCK_TIMEOUT} Run Keyword And Expect Error * - ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_OTHER} local_file_eacl - Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl + ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_OTHER} ${EMPTY} local_file_eacl + Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Log Set eACL for Deny GET operation with StringEqual Object CreatedAtUnixTime ${AtUnixTime_value} = Get From Dictionary ${SYS_HEADER_PARSED} CreatedAtUnixTime ${AtUnixTime_value_hex} = Convert Str to Hex Str with Len ${AtUnixTime_value} Set custom eACL ${USER_KEY} ${CID} 0001000000020000000100010000000200000002000c435245415445445f554e4958 ${AtUnixTime_value_hex} 0001000000030000 - Sleep 15sec + Sleep ${MORPH_BLOCK_TIMEOUT} Run Keyword And Expect Error * - ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_OTHER} local_file_eacl - Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl + ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_OTHER} ${EMPTY} local_file_eacl + Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Log Set eACL for Deny GET operation with StringEqual Object CreatedAtEpoch ${AtEpoch_value} = Get From Dictionary ${SYS_HEADER_PARSED} CreatedAtEpoch ${AtEpoch_value_hex} = Convert Str to Hex Str with Len ${AtEpoch_value} Set custom eACL ${USER_KEY} ${CID} 0001000000020000000100010000000200000002000d435245415445445f45504f4348 ${AtEpoch_value_hex} 0001000000030000 - Sleep 15sec + Sleep ${MORPH_BLOCK_TIMEOUT} Run Keyword And Expect Error * - ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_OTHER} local_file_eacl - Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl + ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_OTHER} ${EMPTY} local_file_eacl + Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Log Set eACL for Deny GET operation with StringEqual Object Extended User Header - ${S_OID_USER_OTH} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} &{FILE_OTH_HEADER} + ${S_OID_USER_OTH} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} &{FILE_OTH_HEADER} Set eACL ${USER_KEY} ${CID} 000100000002000000010001000000030000000200046b65793200062761626331270001000000030000 - Sleep 15sec + Sleep ${MORPH_BLOCK_TIMEOUT} Run Keyword And Expect Error * - ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_OTHER} local_file_eacl - Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl + ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_OTHER} ${EMPTY} local_file_eacl + Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Generate Keys @@ -269,182 +269,182 @@ Check eACL Deny and Allow All Other Check eACL Deny and Allow All System ${CID} = Create Container Public - ${S_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} &{FILE_USR_HEADER} - ${D_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} &{FILE_USR_HEADER_DEL} + ${S_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} &{FILE_USR_HEADER} + ${D_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} &{FILE_USR_HEADER_DEL} @{S_OBJ_H} = Create List ${S_OID_USER} # By discussion, IR can not make any operations instead of HEAD, SEARCH and GET RANGE HASH at the current moment Run Keyword And Expect Error * - ... Put object to NeoFS ${SYSTEM_KEY} ${FILE_S} ${CID} &{FILE_OTH_HEADER} - Put object to NeoFS ${SYSTEM_KEY_SN} ${FILE_S} ${CID} &{FILE_OTH_HEADER} + ... Put object to NeoFS ${SYSTEM_KEY} ${FILE_S} ${CID} ${EMPTY} &{FILE_OTH_HEADER} + Put object to NeoFS ${SYSTEM_KEY_SN} ${FILE_S} ${CID} ${EMPTY} &{FILE_OTH_HEADER} Run Keyword And Expect Error * - ... Get object from NeoFS ${SYSTEM_KEY} ${CID} ${S_OID_USER} local_file_eacl + ... Get object from NeoFS ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl - Get object from NeoFS ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} local_file_eacl + Get object from NeoFS ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl - Search object ${SYSTEM_KEY} ${CID} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} - Search object ${SYSTEM_KEY_SN} ${CID} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} + Search object ${SYSTEM_KEY} ${CID} ${EMPTY} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} + Search object ${SYSTEM_KEY_SN} ${CID} ${EMPTY} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} - Head object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${True} - Head object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${True} + Head object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${True} + Head object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} ${True} Run Keyword And Expect Error * - ... Get Range ${SYSTEM_KEY} ${CID} ${S_OID_USER} 0:256 - Get Range ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} 0:256 + ... Get Range ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 + Get Range ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} 0:256 Run Keyword And Expect Error * - ... Delete object ${SYSTEM_KEY} ${CID} ${D_OID_USER} - Delete object ${SYSTEM_KEY_SN} ${CID} ${D_OID_USER} + ... Delete object ${SYSTEM_KEY} ${CID} ${D_OID_USER} ${EMPTY} + Delete object ${SYSTEM_KEY_SN} ${CID} ${D_OID_USER} ${EMPTY} Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_SYSTEM} - Sleep 15sec + Sleep ${MORPH_BLOCK_TIMEOUT} Run Keyword And Expect Error * - ... Put object to NeoFS ${SYSTEM_KEY} ${FILE_S} ${CID} &{FILE_OTH_HEADER} + ... Put object to NeoFS ${SYSTEM_KEY} ${FILE_S} ${CID} ${EMPTY} &{FILE_OTH_HEADER} Run Keyword And Expect Error * - ... Put object to NeoFS ${SYSTEM_KEY_SN} ${FILE_S} ${CID} &{FILE_OTH_HEADER} + ... Put object to NeoFS ${SYSTEM_KEY_SN} ${FILE_S} ${CID} ${EMPTY} &{FILE_OTH_HEADER} Run Keyword And Expect Error * - ... Get object from NeoFS ${SYSTEM_KEY} ${CID} ${S_OID_USER} local_file_eacl + ... Get object from NeoFS ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Run Keyword And Expect Error * - ... Get object from NeoFS ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} local_file_eacl + ... Get object from NeoFS ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Run Keyword And Expect Error * - ... Search object ${SYSTEM_KEY} ${CID} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} + ... Search object ${SYSTEM_KEY} ${CID} ${EMPTY} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} Run Keyword And Expect Error * - ... Search object ${SYSTEM_KEY_SN} ${CID} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} + ... Search object ${SYSTEM_KEY_SN} ${CID} ${EMPTY} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} Run Keyword And Expect Error * - ... Head object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${True} + ... Head object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${True} Run Keyword And Expect Error * - ... Head object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${True} + ... Head object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} ${True} Run Keyword And Expect Error * - ... Get Range ${SYSTEM_KEY} ${CID} ${S_OID_USER} 0:256 + ... Get Range ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 Run Keyword And Expect Error * - ... Get Range ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} 0:256 + ... Get Range ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} 0:256 Run Keyword And Expect Error * - ... Delete object ${SYSTEM_KEY} ${CID} ${S_OID_USER} + ... Delete object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} Run Keyword And Expect Error * - ... Delete object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} + ... Delete object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} Set eACL ${USER_KEY} ${CID} ${EACL_ALLOW_ALL_SYSTEM} - Sleep 15sec + Sleep ${MORPH_BLOCK_TIMEOUT} Run Keyword And Expect Error * - ... Put object to NeoFS ${SYSTEM_KEY} ${FILE_S} ${CID} &{FILE_OTH_HEADER} - Put object to NeoFS ${SYSTEM_KEY_SN} ${FILE_S} ${CID} &{FILE_OTH_HEADER} + ... Put object to NeoFS ${SYSTEM_KEY} ${FILE_S} ${CID} ${EMPTY} &{FILE_OTH_HEADER} + Put object to NeoFS ${SYSTEM_KEY_SN} ${FILE_S} ${CID} ${EMPTY} &{FILE_OTH_HEADER} Run Keyword And Expect Error * - ... Get object from NeoFS ${SYSTEM_KEY} ${CID} ${S_OID_USER} local_file_eacl + ... Get object from NeoFS ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl - Get object from NeoFS ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} local_file_eacl + Get object from NeoFS ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl - Search object ${SYSTEM_KEY} ${CID} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} - Search object ${SYSTEM_KEY_SN} ${CID} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} + Search object ${SYSTEM_KEY} ${CID} ${EMPTY} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} + Search object ${SYSTEM_KEY_SN} ${CID} ${EMPTY} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} - Head object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${True} - Head object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${True} + Head object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${True} + Head object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} ${True} Run Keyword And Expect Error * - ... Get Range ${SYSTEM_KEY} ${CID} ${S_OID_USER} 0:256 - Get Range ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} 0:256 + ... Get Range ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 + Get Range ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} 0:256 Run Keyword And Expect Error * - ... Delete object ${SYSTEM_KEY} ${CID} ${D_OID_USER} - Delete object ${SYSTEM_KEY_SN} ${CID} ${D_OID_USER} + ... Delete object ${SYSTEM_KEY} ${CID} ${D_OID_USER} ${EMPTY} + Delete object ${SYSTEM_KEY_SN} ${CID} ${D_OID_USER} ${EMPTY} Check eACL Deny All Other and Allow All Pubkey ${CID} = Create Container Public - ${S_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} &{FILE_USR_HEADER} - ${D_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} &{FILE_USR_HEADER_DEL} + ${S_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} &{FILE_USR_HEADER} + ${D_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} &{FILE_USR_HEADER_DEL} @{S_OBJ_H} = Create List ${S_OID_USER} - Put object to NeoFS ${EACL_KEY} ${FILE_S} ${CID} &{FILE_OTH_HEADER} - Get object from NeoFS ${EACL_KEY} ${CID} ${S_OID_USER} local_file_eacl - Search object ${EACL_KEY} ${CID} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} - Head object ${EACL_KEY} ${CID} ${S_OID_USER} ${True} - Get Range ${EACL_KEY} ${CID} ${S_OID_USER} 0:256 - Delete object ${EACL_KEY} ${CID} ${D_OID_USER} + Put object to NeoFS ${EACL_KEY} ${FILE_S} ${CID} ${EMPTY} &{FILE_OTH_HEADER} + Get object from NeoFS ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl + Search object ${EACL_KEY} ${CID} ${EMPTY} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} + Head object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${True} + Get Range ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 + Delete object ${EACL_KEY} ${CID} ${D_OID_USER} ${EMPTY} Set eACL ${USER_KEY} ${CID} ${EACL_ALLOW_ALL_Pubkey} - Sleep 15sec + Sleep ${MORPH_BLOCK_TIMEOUT} Run Keyword And Expect Error * - ... Put object to NeoFS ${OTHER_KEY} ${FILE_S} ${CID} &{FILE_USR_HEADER} + ... Put object to NeoFS ${OTHER_KEY} ${FILE_S} ${CID} ${EMPTY} &{FILE_USR_HEADER} Run Keyword And Expect Error * - ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl + ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Run Keyword And Expect Error * - ... Search object ${OTHER_KEY} ${CID} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} + ... Search object ${OTHER_KEY} ${CID} ${EMPTY} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} Run Keyword And Expect Error * - ... Head object ${OTHER_KEY} ${CID} ${S_OID_USER} ${True} + ... Head object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${True} Run Keyword And Expect Error * - ... Get Range ${OTHER_KEY} ${CID} ${S_OID_USER} 0:256 + ... Get Range ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 Run Keyword And Expect Error * - ... Delete object ${OTHER_KEY} ${CID} ${S_OID_USER} + ... Delete object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} - Put object to NeoFS ${EACL_KEY} ${FILE_S} ${CID} &{FILE_OTH_HEADER} - Get object from NeoFS ${EACL_KEY} ${CID} ${S_OID_USER} local_file_eacl - Search object ${EACL_KEY} ${CID} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} - Head object ${EACL_KEY} ${CID} ${S_OID_USER} ${True} - Get Range ${EACL_KEY} ${CID} ${S_OID_USER} 0:256 - Delete object ${EACL_KEY} ${CID} ${D_OID_USER} + Put object to NeoFS ${EACL_KEY} ${FILE_S} ${CID} ${EMPTY} &{FILE_OTH_HEADER} + Get object from NeoFS ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl + Search object ${EACL_KEY} ${CID} ${EMPTY} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} + Head object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${True} + Get Range ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 + Delete object ${EACL_KEY} ${CID} ${D_OID_USER} ${EMPTY} Check eACL Deny and Allow All [Arguments] ${KEY} ${DENY_EACL} ${ALLOW_EACL} ${CID} = Create Container Public - ${S_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} &{FILE_USR_HEADER} - ${D_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} &{FILE_USR_HEADER_DEL} + ${S_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} &{FILE_USR_HEADER} + ${D_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} &{FILE_USR_HEADER_DEL} @{S_OBJ_H} = Create List ${S_OID_USER} - Put object to NeoFS ${KEY} ${FILE_S} ${CID} &{FILE_OTH_HEADER} - Get object from NeoFS ${KEY} ${CID} ${S_OID_USER} local_file_eacl - Search object ${KEY} ${CID} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} - Head object ${KEY} ${CID} ${S_OID_USER} ${True} - Get Range ${KEY} ${CID} ${S_OID_USER} 0:256 - Delete object ${KEY} ${CID} ${D_OID_USER} + Put object to NeoFS ${KEY} ${FILE_S} ${CID} ${EMPTY} &{FILE_OTH_HEADER} + Get object from NeoFS ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl + Search object ${KEY} ${CID} ${EMPTY} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} + Head object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} ${True} + Get Range ${KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 + Delete object ${KEY} ${CID} ${D_OID_USER} ${EMPTY} Set eACL ${USER_KEY} ${CID} ${DENY_EACL} - Sleep 15sec + Sleep ${MORPH_BLOCK_TIMEOUT} Run Keyword And Expect Error * - ... Put object to NeoFS ${KEY} ${FILE_S} ${CID} &{FILE_USR_HEADER} + ... Put object to NeoFS ${KEY} ${FILE_S} ${CID} ${EMPTY} &{FILE_USR_HEADER} Run Keyword And Expect Error * - ... Get object from NeoFS ${KEY} ${CID} ${S_OID_USER} local_file_eacl + ... Get object from NeoFS ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl Run Keyword And Expect Error * - ... Search object ${KEY} ${CID} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} + ... Search object ${KEY} ${CID} ${EMPTY} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} Run Keyword And Expect Error * - ... Head object ${KEY} ${CID} ${S_OID_USER} ${True} + ... Head object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} ${True} Run Keyword And Expect Error * - ... Get Range ${KEY} ${CID} ${S_OID_USER} 0:256 + ... Get Range ${KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 Run Keyword And Expect Error * - ... Delete object ${KEY} ${CID} ${S_OID_USER} + ... Delete object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} Set eACL ${USER_KEY} ${CID} ${ALLOW_EACL} - Sleep 15sec + Sleep ${MORPH_BLOCK_TIMEOUT} - Put object to NeoFS ${KEY} ${FILE_S} ${CID} &{FILE_OTH_HEADER} - Get object from NeoFS ${KEY} ${CID} ${S_OID_USER} local_file_eacl - Search object ${KEY} ${CID} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} - Head object ${KEY} ${CID} ${S_OID_USER} ${True} - Get Range ${KEY} ${CID} ${S_OID_USER} 0:256 - Delete object ${KEY} ${CID} ${D_OID_USER} + Put object to NeoFS ${KEY} ${FILE_S} ${CID} ${EMPTY} &{FILE_OTH_HEADER} + Get object from NeoFS ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl + Search object ${KEY} ${CID} ${EMPTY} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} + Head object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} ${True} + Get Range ${KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256 + Delete object ${KEY} ${CID} ${D_OID_USER} ${EMPTY} diff --git a/robot/testsuites/integration/netmap_simple.robot b/robot/testsuites/integration/netmap_simple.robot new file mode 100644 index 00000000..3639ce0f --- /dev/null +++ b/robot/testsuites/integration/netmap_simple.robot @@ -0,0 +1,116 @@ +*** Settings *** +Variables ../../variables/common.py + +Library ${RESOURCES}/environment.py +Library ${RESOURCES}/neo.py +Library ${RESOURCES}/neofs.py +Library ${RESOURCES}/payment.py +Library ${RESOURCES}/assertions.py +Library ${RESOURCES}/neo.py + + + +*** Test cases *** +NeoFS Simple Netmap + [Documentation] Testcase to validate NeoFS Netmap. + [Tags] Netmap NeoFS NeoCLI + [Timeout] 20 min + + ${PRIV_KEY} = Generate Neo private key + ${PUB_KEY} = Get Neo public key ${PRIV_KEY} + ${ADDR} = Get Neo address ${PRIV_KEY} + + ${FILE} = Generate file of bytes 1024 + + Log Container with rule "RF 2 SELECT 2 Node" + ${CID} = Create container ${PRIV_KEY} ${EMPTY} RF 2 SELECT 2 Node + Container Existing ${PRIV_KEY} ${CID} + ${S_OID} = Put object to NeoFS ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} + Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${S_OID} + + + Log Container with rule "RF 1 SELECT 1 Node" + ${CID} = Create container ${PRIV_KEY} ${EMPTY} RF 1 SELECT 1 Node + Container Existing ${PRIV_KEY} ${CID} + ${S_OID} = Put object to NeoFS ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} + Validate storage policy for object ${PRIV_KEY} 1 ${CID} ${S_OID} + + + Log Container with rule "RF 2 SELECT 1 Node" + ${CID} = Create container ${PRIV_KEY} ${EMPTY} RF 2 SELECT 1 Node + Container Existing ${PRIV_KEY} ${CID} + ${S_OID} = Put object to NeoFS ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} + Validate storage policy for object ${PRIV_KEY} 1 ${CID} ${S_OID} + + + Log Container with rule "RF 1 SELECT 4 Node" + ${CID} = Create container ${PRIV_KEY} ${EMPTY} RF 1 SELECT 4 Node + Container Existing ${PRIV_KEY} ${CID} + ${S_OID} = Put object to NeoFS ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} + Validate storage policy for object ${PRIV_KEY} 4 ${CID} ${S_OID} + + + Log Container with rule "RF 2 SELECT 1 Node" + ${CID} = Create container ${PRIV_KEY} ${EMPTY} RF 2 SELECT 1 Node + Container Existing ${PRIV_KEY} ${CID} + ${S_OID} = Put object to NeoFS ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} + Validate storage policy for object ${PRIV_KEY} 1 ${CID} ${S_OID} + + + Log Container with rule "RF 1 SELECT 1 Node FILTER Country EQ GB" + ${CID} = Create container ${PRIV_KEY} ${EMPTY} RF 1 SELECT 1 Node FILTER Country EQ GB + @{EXPECTED} = Create List 192.168.123.74 + Container Existing ${PRIV_KEY} ${CID} + ${S_OID} = Put object to NeoFS ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} + Validate storage policy for object ${PRIV_KEY} 1 ${CID} ${S_OID} + + + Log Container with rule "RF 1 SELECT 1 Node FILTER Country NE GB Country NE SG Country NE DE" + ${CID} = Create container ${PRIV_KEY} ${EMPTY} RF 1 SELECT 1 Node FILTER Country NE GB Country NE SG Country NE DE + @{EXPECTED} = Create List 192.168.123.71 + Container Existing ${PRIV_KEY} ${CID} + ${S_OID} = Put object to NeoFS ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} + Validate storage policy for object ${PRIV_KEY} 1 ${CID} ${S_OID} + + + Log Container with rule "RF 1 SELECT 2 Node FILTER Country NE GB Country NE DE" + ${CID} = Create container ${PRIV_KEY} ${EMPTY} RF 1 SELECT 2 Node FILTER Country NE GB Country NE DE + @{EXPECTED} = Create List 192.168.123.71 192.168.123.72 + Container Existing ${PRIV_KEY} ${CID} + ${S_OID} = Put object to NeoFS ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} + Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${S_OID} + + + Log Operation should be failed with container rule "RF 2 SELECT 2 Node FILTER Country NE GB Country NE DE" + ${CID} = Create container ${PRIV_KEY} ${EMPTY} RF 2 SELECT 2 Node FILTER Country NE GB Country NE DE + Container Existing ${PRIV_KEY} ${CID} + Run Keyword And Expect Error * + ... Put object to NeoFS ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} + + + Log Operation should be failed with container rule "RF 3 SELECT 2 Node" + ${CID} = Create container ${PRIV_KEY} ${EMPTY} RF 3 SELECT 2 Node + Container Existing ${PRIV_KEY} ${CID} + Run Keyword And Expect Error * + ... Put object to NeoFS ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} + + + Log Operation should be failed with container rule "RF 1 SELECT 6 Node" + ${CID} = Create container ${PRIV_KEY} ${EMPTY} RF 1 SELECT 6 Node + Container Existing ${PRIV_KEY} ${CID} + Run Keyword And Expect Error * + ... Put object to NeoFS ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} + + +# Netmap: {"Epoch":916,"NetMap":[ +#{"address":"/ip4/192.168.123.74/tcp/8080","pubkey":"A4yGKVnla0PiD3kYfE/p4Lx8jGbBYD5s8Ox/h6trCNw1", +#"options":["/City:London","/Capacity:100","/Price:1","/Location:Europe","/Country:GB"],"status":0}, + +#{"address":"/ip4/192.168.123.72/tcp/8080","pubkey":"A/9ltq55E0pNzp0NOdOFHpurTul6v4boHhxbvFDNKCau", +#"options":["/City:Singapore","/Capacity:100","/Price:1","/Location:Asia","/Country:SG"],"status":0}, + +#{"address":"/ip4/192.168.123.71/tcp/8080","pubkey":"Aiu0BBxQ1gf/hx3sfkzXd4OI4OpoSdhMy9mqjzLhaoEx", +#"options":["/Location:NorthAmerica","/Country:US","/City:NewYork","/Capacity:100","/Price:1"],"status":0}, + +#{"address":"/ip4/192.168.123.73/tcp/8080","pubkey":"AqySDNffC2GyiQcua5RuLaThoxuascYhu0deMPpKsQLD", +#"options":["/Capacity:100","/Price:1","/Location:Europe","/Country:DE","/City:Frankfurt"],"status":0}]} \ No newline at end of file diff --git a/robot/testsuites/integration/object_complex.robot b/robot/testsuites/integration/object_complex.robot index a9025ac6..156d6a8a 100644 --- a/robot/testsuites/integration/object_complex.robot +++ b/robot/testsuites/integration/object_complex.robot @@ -40,14 +40,14 @@ NeoFS Complex Object Operations ${SIZE} = Set Variable 20e+6 ${FILE} = Generate file of bytes ${SIZE} ${FILE_HASH} = Get file hash ${FILE} - ${S_OID} = Put object to NeoFS ${PRIV_KEY} ${FILE} ${CID} - ${H_OID} = Put object to NeoFS ${PRIV_KEY} ${FILE} ${CID} &{FILE_USR_HEADER} + ${S_OID} = Put object to NeoFS ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} + ${H_OID} = Put object to NeoFS ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} &{FILE_USR_HEADER} @{Link_obj_S} = Verify linked objects ${PRIV_KEY} ${CID} ${S_OID} ${SIZE} @{Link_obj_H} = Verify linked objects ${PRIV_KEY} ${CID} ${H_OID} ${SIZE} @{Full_obj_list} = Create List @{Link_obj_S} @{Link_obj_H} ${S_OID} ${H_OID} - Search object ${PRIV_KEY} ${CID} ${EMPTY} @{Full_obj_list} + Search object ${PRIV_KEY} ${CID} ${EMPTY} ${EMPTY} @{Full_obj_list} # Next keyword has been removed due to https://neospcc.atlassian.net/browse/NSPCC-1103 # Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${S_OID} @@ -57,51 +57,51 @@ NeoFS Complex Object Operations @{S_OBJ_ALL} = Create List ${S_OID} ${H_OID} ${SGID} @{S_OBJ_H} = Create List ${H_OID} - Search object ${PRIV_KEY} ${CID} --sg @{S_OBJ_SG} + Search object ${PRIV_KEY} ${CID} --sg ${EMPTY} @{S_OBJ_SG} Get storage group ${PRIV_KEY} ${CID} ${SGID} - Get object from NeoFS ${PRIV_KEY} ${CID} ${S_OID} s_file_read - Get object from NeoFS ${PRIV_KEY} ${CID} ${S_OID} h_file_read - Search object ${PRIV_KEY} ${CID} --root @{S_OBJ_ALL} + Get object from NeoFS ${PRIV_KEY} ${CID} ${S_OID} ${EMPTY} s_file_read + Get object from NeoFS ${PRIV_KEY} ${CID} ${S_OID} ${EMPTY} h_file_read + Search object ${PRIV_KEY} ${CID} --root ${EMPTY} @{S_OBJ_ALL} # Check sub-objects - Search object ${PRIV_KEY} ${CID} --root @{S_OBJ_H} &{FILE_USR_HEADER} - Head object ${PRIV_KEY} ${CID} ${S_OID} ${True} - Head object ${PRIV_KEY} ${CID} ${H_OID} ${True} &{FILE_USR_HEADER} + Search object ${PRIV_KEY} ${CID} --root ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} + Head object ${PRIV_KEY} ${CID} ${S_OID} ${EMPTY} ${True} + Head object ${PRIV_KEY} ${CID} ${H_OID} ${EMPTY} ${True} &{FILE_USR_HEADER} Run Keyword And Expect Error REGEXP:User header (\\w+=\\w+\\s?)+ was not found - ... Head object ${PRIV_KEY} ${CID} ${H_OID} ${False} &{FILE_USR_HEADER} + ... Head object ${PRIV_KEY} ${CID} ${H_OID} ${EMPTY} ${False} &{FILE_USR_HEADER} Verify file hash s_file_read ${FILE_HASH} Verify file hash h_file_read ${FILE_HASH} &{ID_OBJ_S} = Create Dictionary ID=${S_OID} - Delete object ${PRIV_KEY} ${CID} ${S_OID} + Delete object ${PRIV_KEY} ${CID} ${S_OID} ${EMPTY} Verify Head tombstone ${PRIV_KEY} ${CID} ${S_OID} # Removed due to tombstones zombies. # Wait Until Keyword Succeeds 2 min 30 sec -# ... Search object ${PRIV_KEY} ${CID} --root @{EMPTY} &{ID_OBJ_S} +# ... Search object ${PRIV_KEY} ${CID} --root ${EMPTY} @{EMPTY} &{ID_OBJ_S} # Run Keyword And Expect Error * -# ... Get object from NeoFS ${PRIV_KEY} ${CID} ${S_OID} s_file_read_2 +# ... Get object from NeoFS ${PRIV_KEY} ${CID} ${S_OID} ${EMPTY} s_file_read_2 &{ID_OBJ_H} = Create Dictionary ID=${H_OID} - Delete object ${PRIV_KEY} ${CID} ${H_OID} + Delete object ${PRIV_KEY} ${CID} ${H_OID} ${EMPTY} Verify Head tombstone ${PRIV_KEY} ${CID} ${H_OID} # Removed due to tombstones zombies. -# Search object ${PRIV_KEY} ${CID} --root @{EMPTY} &{FILE_USR_HEADER} +# Search object ${PRIV_KEY} ${CID} --root ${EMPTY} @{EMPTY} &{FILE_USR_HEADER} # Wait Until Keyword Succeeds 2 min 30 sec -# ... Search object ${PRIV_KEY} ${CID} --root @{EMPTY} &{ID_OBJ_H} +# ... Search object ${PRIV_KEY} ${CID} --root ${EMPTY} @{EMPTY} &{ID_OBJ_H} # Run Keyword And Expect Error * -# ... Get object from NeoFS ${PRIV_KEY} ${CID} ${H_OID} s_file_read_2 +# ... Get object from NeoFS ${PRIV_KEY} ${CID} ${H_OID} ${EMPTY} s_file_read_2 &{SGID_OBJ} = Create Dictionary ID=${SGID} - Delete object ${PRIV_KEY} ${CID} ${SGID} + Delete object ${PRIV_KEY} ${CID} ${SGID} ${EMPTY} Verify Head tombstone ${PRIV_KEY} ${CID} ${SGID} # Removed due to tombstones zombies. -# Search object ${PRIV_KEY} ${CID} --sg @{EMPTY} +# Search object ${PRIV_KEY} ${CID} --sg ${EMPTY} @{EMPTY} # Wait Until Keyword Succeeds 2 min 30 sec -# ... Search object ${PRIV_KEY} ${CID} ${EMPTY} @{EMPTY} &{SGID_OBJ} +# ... Search object ${PRIV_KEY} ${CID} ${EMPTY} ${EMPTY} @{EMPTY} &{SGID_OBJ} # Run Keyword And Expect Error * -# ... Get object from NeoFS ${PRIV_KEY} ${CID} ${SGID} s_file_read_2 +# ... Get object from NeoFS ${PRIV_KEY} ${CID} ${SGID} ${EMPTY} s_file_read_2 Cleanup File ${FILE} Cleanup File s_file_read diff --git a/robot/testsuites/integration/object_simple.robot b/robot/testsuites/integration/object_simple.robot index 748ac644..4dac46b7 100644 --- a/robot/testsuites/integration/object_simple.robot +++ b/robot/testsuites/integration/object_simple.robot @@ -39,8 +39,8 @@ NeoFS Simple Object Operations # ... Expected Balance ${PUB_KEY} ${BALANCE} -0.00001424 ${FILE} = Generate file of bytes 1024 ${FILE_HASH} = Get file hash ${FILE} - ${S_OID} = Put object to NeoFS ${PRIV_KEY} ${FILE} ${CID} - ${H_OID} = Put object to NeoFS ${PRIV_KEY} ${FILE} ${CID} &{FILE_USR_HEADER} + ${S_OID} = Put object to NeoFS ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} + ${H_OID} = Put object to NeoFS ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} &{FILE_USR_HEADER} Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${S_OID} ${SGID} = Create storage group ${PRIV_KEY} ${CID} ${S_OID} ${H_OID} @@ -49,49 +49,49 @@ NeoFS Simple Object Operations @{S_OBJ_ALL} = Create List ${S_OID} ${H_OID} ${SGID} @{S_OBJ_H} = Create List ${H_OID} - Search object ${PRIV_KEY} ${CID} --sg @{S_OBJ_SG} - Get storage group ${PRIV_KEY} ${CID} ${SGID} - Get object from NeoFS ${PRIV_KEY} ${CID} ${S_OID} s_file_read - Get object from NeoFS ${PRIV_KEY} ${CID} ${S_OID} h_file_read - Search object ${PRIV_KEY} ${CID} ${EMPTY} @{S_OBJ_ALL} - Search object ${PRIV_KEY} ${CID} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} - Head object ${PRIV_KEY} ${CID} ${S_OID} ${True} - Head object ${PRIV_KEY} ${CID} ${H_OID} ${True} &{FILE_USR_HEADER} + Search object ${PRIV_KEY} ${CID} --sg ${EMPTY} @{S_OBJ_SG} + Get storage group ${PRIV_KEY} ${CID} ${SGID} + Get object from NeoFS ${PRIV_KEY} ${CID} ${S_OID} ${EMPTY} s_file_read + Get object from NeoFS ${PRIV_KEY} ${CID} ${S_OID} ${EMPTY} h_file_read + Search object ${PRIV_KEY} ${CID} ${EMPTY} ${EMPTY} @{S_OBJ_ALL} + Search object ${PRIV_KEY} ${CID} ${EMPTY} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} + Head object ${PRIV_KEY} ${CID} ${S_OID} ${EMPTY} ${True} + Head object ${PRIV_KEY} ${CID} ${H_OID} ${EMPTY} ${True} &{FILE_USR_HEADER} Run Keyword And Expect Error REGEXP:User header (\\w+=\\w+\\s?)+ was not found - ... Head object ${PRIV_KEY} ${CID} ${H_OID} ${False} &{FILE_USR_HEADER} + ... Head object ${PRIV_KEY} ${CID} ${H_OID} ${EMPTY} ${False} &{FILE_USR_HEADER} Verify file hash s_file_read ${FILE_HASH} Verify file hash h_file_read ${FILE_HASH} &{ID_OBJ_S} = Create Dictionary ID=${S_OID} - Delete object ${PRIV_KEY} ${CID} ${S_OID} + Delete object ${PRIV_KEY} ${CID} ${S_OID} ${EMPTY} Verify Head tombstone ${PRIV_KEY} ${CID} ${S_OID} # Removed due to tombstones zombies. # Wait Until Keyword Succeeds 2 min 30 sec -# ... Search object ${PRIV_KEY} ${CID} ${EMPTY} @{EMPTY} &{ID_OBJ_S} +# ... Search object ${PRIV_KEY} ${CID} ${EMPTY} ${EMPTY} @{EMPTY} &{ID_OBJ_S} # Run Keyword And Expect Error * -# ... Get object from NeoFS ${PRIV_KEY} ${CID} ${S_OID} s_file_read_2 +# ... Get object from NeoFS ${PRIV_KEY} ${CID} ${S_OID} ${EMPTY} s_file_read_2 &{ID_OBJ_H} = Create Dictionary ID=${H_OID} - Delete object ${PRIV_KEY} ${CID} ${H_OID} + Delete object ${PRIV_KEY} ${CID} ${H_OID} ${EMPTY} Verify Head tombstone ${PRIV_KEY} ${CID} ${H_OID} # Removed due to tombstones zombies. -# Search object ${PRIV_KEY} ${CID} ${EMPTY} @{EMPTY} &{FILE_USR_HEADER} +# Search object ${PRIV_KEY} ${CID} ${EMPTY} ${EMPTY} @{EMPTY} &{FILE_USR_HEADER} # Wait Until Keyword Succeeds 2 min 30 sec -# ... Search object ${PRIV_KEY} ${CID} ${EMPTY} @{EMPTY} &{ID_OBJ_H} +# ... Search object ${PRIV_KEY} ${CID} ${EMPTY} ${EMPTY} @{EMPTY} &{ID_OBJ_H} # Run Keyword And Expect Error * -# ... Get object from NeoFS ${PRIV_KEY} ${CID} ${H_OID} s_file_read_2 +# ... Get object from NeoFS ${PRIV_KEY} ${CID} ${H_OID} ${EMPTY} s_file_read_2 &{SGID_OBJ} = Create Dictionary ID=${SGID} - Delete object ${PRIV_KEY} ${CID} ${SGID} + Delete object ${PRIV_KEY} ${CID} ${SGID} ${EMPTY} Verify Head tombstone ${PRIV_KEY} ${CID} ${SGID} # Removed due to tombstones zombies. -# Search object ${PRIV_KEY} ${CID} --sg @{EMPTY} +# Search object ${PRIV_KEY} ${CID} --sg ${EMPTY} @{EMPTY} # Wait Until Keyword Succeeds 2 min 30 sec -# ... Search object ${PRIV_KEY} ${CID} ${EMPTY} @{EMPTY} &{SGID_OBJ} +# ... Search object ${PRIV_KEY} ${CID} ${EMPTY} ${EMPTY} @{EMPTY} &{SGID_OBJ} # Run Keyword And Expect Error * -# ... Get object from NeoFS ${PRIV_KEY} ${CID} ${SGID} s_file_read_2 +# ... Get object from NeoFS ${PRIV_KEY} ${CID} ${SGID} ${EMPTY} s_file_read_2 Cleanup File ${FILE} Cleanup File s_file_read diff --git a/robot/variables/common.py b/robot/variables/common.py index 6324653e..0baa11f7 100644 --- a/robot/variables/common.py +++ b/robot/variables/common.py @@ -13,4 +13,7 @@ JF_TOKEN = os.getenv('JF_TOKEN') REG_USR = os.getenv('REG_USR') REG_PWD = os.getenv('REG_PWD') NEOFS_ENDPOINT = "s01.fs.localtest.nspcc.ru:8080" -NEOFS_NEO_API_ENDPOINT = "https://fs.localtest.nspcc.ru/neo_rpc/" \ No newline at end of file +NEOFS_NEO_API_ENDPOINT = "https://fs.localtest.nspcc.ru/neo_rpc/" + +MORPH_BLOCK_TIMEOUT = "10sec" +NEOFS_EPOCH_TIMEOUT = "30sec" \ No newline at end of file