#56: create temporary directory on testsuite setup

Signed-off-by: anastasia prasolova <anastasia@nspcc.ru>
This commit is contained in:
Anastasia Prasolova 2021-04-26 13:30:40 +03:00 committed by GitHub
parent 286a5ade31
commit 2f31e79327
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 825 additions and 767 deletions

View file

@ -1,4 +1,4 @@
#!/usr/bin/python3
#!/usr/bin/python3.7
import subprocess
import os
@ -367,23 +367,6 @@ def container_existing(private_key: str, cid: str):
_find_cid(complProc.stdout, cid)
return
@keyword('Generate file of bytes')
def generate_file_of_bytes(size):
"""
generate big binary file with the specified size in bytes
:param size: the size in bytes, can be declared as 6e+6 for example
:return:string filename
"""
size = int(float(size))
filename = TEMP_DIR + str(uuid.uuid4())
with open('%s'%filename, 'wb') as fout:
fout.write(os.urandom(size))
logger.info("Random binary file with size %s bytes has been generated." % str(size))
return os.path.abspath(os.getcwd()) + '/' + filename
@keyword('Search object')
def search_object(private_key: str, cid: str, keys: str, bearer: str, filters: str,
@ -421,7 +404,7 @@ def search_object(private_key: str, cid: str, keys: str, bearer: str, filters: s
except subprocess.CalledProcessError as e:
raise Exception("command '{}' return with error (code {}): {}".format(e.cmd, e.returncode, e.output))
@keyword('Get Split objects')
def get_component_objects(private_key: str, cid: str, oid: str):
@ -445,7 +428,7 @@ def get_component_objects(private_key: str, cid: str, oid: str):
# Get all existing objects
full_obj_list = search_object(private_key, cid, None, None, None, None, '--phy')
# Search expected Linking object
for targer_oid in full_obj_list:
header = head_object(private_key, cid, targer_oid, '', '', '--raw')
@ -583,29 +566,6 @@ def _verify_child_link(private_key: str, cid: str, oid: str, header_last_parsed:
return final_verif_data
@keyword('Get Docker Logs')
def get_container_logs(testcase_name: str):
low_level_client = docker.APIClient(base_url='unix://var/run/docker.sock')
tar_name = "artifacts/dockerlogs("+testcase_name+").tar.gz"
tar = tarfile.open(tar_name, "w:gz")
for container in low_level_client.containers():
container_name = container['Names'][0][1:]
if low_level_client.inspect_container(container_name)['Config']['Domainname'] == "neofs.devenv":
file_name = "artifacts/docker_log_" + container_name
with open(file_name,'wb') as out:
logger.info("logs_get")
out.write(low_level_client.logs(container_name))
logger.info(container_name)
tar.add(file_name)
os.remove(file_name)
tar.close()
return 1
@keyword('Verify Head Tombstone')
def verify_head_tombstone(private_key: str, cid: str, oid_ts: str, oid: str, addr: str):
object_cmd = (
@ -842,17 +802,6 @@ def verify_file_hash(filename, expected_hash):
else:
raise Exception("File hash '{}' is not equal to {}".format(file_hash, expected_hash))
@keyword('Cleanup Files')
def cleanup_file():
if os.path.isdir(TEMP_DIR):
try:
shutil.rmtree(TEMP_DIR)
except OSError as e:
raise Exception(f"Error: '{e.TEMP_DIR}' - {e.strerror}.")
else:
logger.warn(f"Error: '{TEMP_DIR}' file not found")
logger.info(f"File '{TEMP_DIR}' has been deleted.")
@keyword('Put object')
def put_object(private_key: str, path: str, cid: str, bearer: str, user_headers: str,
endpoint: str="", options: str="" ):
@ -904,13 +853,13 @@ def get_logs_latest_timestamp():
timestamp_date = datetime.fromisoformat(timestamp[:-1])
nodes_logs_time[container] = timestamp_date
logger.info("Latest logs timestamp list: %s" % nodes_logs_time)
return nodes_logs_time
@keyword('Find in Nodes Log')
@keyword('Find in Nodes Log')
def find_in_nodes_Log(line: str, nodes_logs_time: dict):
client_api = docker.APIClient()
@ -931,7 +880,7 @@ def find_in_nodes_Log(line: str, nodes_logs_time: dict):
found_count = len(re.findall(line, log_lines.decode("utf-8") ))
logger.info("Node %s log - found counter: %s" % (container, found_count))
global_count += found_count
else:
logger.info("Container %s has not been found." % container)
@ -973,7 +922,7 @@ def get_object(private_key: str, cid: str, oid: str, bearer_token: str,
if not endpoint:
endpoint = random.sample(_get_storage_nodes(), 1)[0]
if bearer_token:
bearer_token = f"--bearer {TEMP_DIR}{bearer_token}"
@ -996,7 +945,7 @@ def get_object(private_key: str, cid: str, oid: str, bearer_token: str,
@keyword('Put Storagegroup')
def put_storagegroup(private_key: str, cid: str, bearer_token: str="", *oid_list):
cmd_oid_line = ",".join(oid_list)
cmd_oid_line = ",".join(oid_list)
if bearer_token:
bearer_token = f"--bearer {TEMP_DIR}{bearer_token}"
@ -1023,7 +972,7 @@ def list_storagegroup(private_key: str, cid: str, bearer_token: str="", *expecte
if bearer_token:
bearer_token = f"--bearer {TEMP_DIR}{bearer_token}"
object_cmd = (
object_cmd = (
f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --key {private_key} '
f'storagegroup list --cid {cid} {bearer_token}'
)
@ -1043,7 +992,7 @@ def list_storagegroup(private_key: str, cid: str, bearer_token: str="", *expecte
raise Exception("Found storage group '{}' is not equal to expected list '{}'".format(found_objects, expected_list))
return found_objects
except subprocess.CalledProcessError as e:
raise Exception("command '{}' return with error (code {}): {}".format(e.cmd, e.returncode, e.output))
@ -1060,7 +1009,7 @@ def get_storagegroup(private_key: str, cid: str, oid: str, bearer_token: str, ex
complProc = subprocess.run(object_cmd, check=True, universal_newlines=True,
stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=60, shell=True)
logger.info(f"Output: {complProc.stdout}")
if expected_size:
if re.search(r'Group size: %s' % expected_size, complProc.stdout):
logger.info("Group size %s has been found in the output" % (expected_size))
@ -1106,23 +1055,6 @@ def delete_storagegroup(private_key: str, cid: str, oid: str, bearer_token: str=
except subprocess.CalledProcessError as e:
raise Exception("command '{}' return with error (code {}): {}".format(e.cmd, e.returncode, e.output))
def _exec_cli_cmd(private_key: bytes, postfix: str):
# Get linked objects from first
object_cmd = (
f'{NEOFS_CLI_EXEC} --raw --host {NEOFS_ENDPOINT} '
f'--key {binascii.hexlify(private_key).decode()} {postfix}'
)
logger.info("Cmd: %s" % object_cmd)
try:
complProc = subprocess.run(object_cmd, check=True, universal_newlines=True,
stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=15, shell=True)
logger.info("Output: %s" % complProc.stdout)
except subprocess.CalledProcessError as e:
raise Exception("command '{}' return with error (code {}): {}".format(e.cmd, e.returncode, e.output))
return complProc.stdout
def _get_file_hash(filename):
blocksize = 65536
hash = hashlib.md5()

View file

@ -0,0 +1,61 @@
#!/usr/bin/python3.7
import docker
import os
import shutil
import tarfile
import uuid
from robot.api.deco import keyword
from robot.api import logger
from common import *
ROBOT_AUTO_KEYWORDS = False
@keyword('Generate file of bytes')
def generate_file_of_bytes(size: str) -> str:
"""
Function generates big binary file with the specified size in bytes.
:param size: the size in bytes, can be declared as 6e+6 for example
"""
size = int(float(size))
filename = TEMP_DIR + str(uuid.uuid4())
with open(filename, 'wb') as fout:
fout.write(os.urandom(size))
logger.info(f"Random binary file with size {size} bytes has been generated.")
return f"{os.getcwd()}/{filename}"
@keyword('Get Docker Logs')
def get_container_logs(testcase_name: str) -> None:
client = docker.APIClient(base_url='unix://var/run/docker.sock')
tar_name = f"artifacts/dockerlogs({testcase_name}).tar.gz"
tar = tarfile.open(tar_name, "w:gz")
for container in client.containers():
container_name = container['Names'][0][1:]
if client.inspect_container(container_name)['Config']['Domainname'] == "neofs.devenv":
file_name = f"artifacts/docker_log_{container_name}"
with open(file_name,'wb') as out:
out.write(client.logs(container_name))
logger.info(f"Collected logs from container {container_name}")
tar.add(file_name)
os.remove(file_name)
tar.close()
@keyword('Cleanup Files')
def cleanup_file() -> None:
if os.path.isdir(TEMP_DIR):
try:
shutil.rmtree(TEMP_DIR)
logger.info(f"File '{TEMP_DIR}' has been deleted.")
except OSError as e:
raise Exception(f"Error: '{TEMP_DIR}' - {e.strerror}.")
else:
logger.warn(f"Error: '{TEMP_DIR}' file not found")
@keyword('Create Temporary Directory')
def create_temp_dir() -> None:
if not os.path.exists(TEMP_DIR):
os.makedirs(TEMP_DIR)
logger.info(f"Created temporary directory: {TEMP_DIR}")

View file

@ -2,6 +2,7 @@
Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_acl_basic.robot
@ -12,6 +13,8 @@ Basic ACL Operations for Private Container
[Tags] ACL NeoFS NeoCLI
[Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys
Create Containers
@ -22,9 +25,9 @@ Basic ACL Operations for Private Container
Generate file ${COMPLEX_OBJ_SIZE}
Check Private Container
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
@ -32,19 +35,19 @@ Basic ACL Operations for Private Container
Check Private Container
# 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} ${EMPTY} ${EMPTY}
Run Keyword And Expect Error *
... Put object ${OTHER_KEY} ${FILE_S} ${PRIV_CID} ${EMPTY} ${EMPTY}
... Put object ${OTHER_KEY} ${FILE_S} ${PRIV_CID} ${EMPTY} ${EMPTY}
Run Keyword And Expect Error *
... Put object ${SYSTEM_KEY_IR} ${FILE_S} ${PRIV_CID} ${EMPTY} ${EMPTY}
${S_OID_SYS_SN} = Put object ${SYSTEM_KEY_SN} ${FILE_S} ${PRIV_CID} ${EMPTY} ${EMPTY}
... Put object ${SYSTEM_KEY_IR} ${FILE_S} ${PRIV_CID} ${EMPTY} ${EMPTY}
${S_OID_SYS_SN} = Put object ${SYSTEM_KEY_SN} ${FILE_S} ${PRIV_CID} ${EMPTY} ${EMPTY}
# Get
Get object ${USER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} s_file_read
Run Keyword And Expect Error *
... Get object ${OTHER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} s_file_read
Get object ${SYSTEM_KEY_IR} ${PRIV_CID} ${S_OID_USER} ${EMPTY} s_file_read
Get object ${SYSTEM_KEY_SN} ${PRIV_CID} ${S_OID_USER} ${EMPTY} s_file_read
Get object ${SYSTEM_KEY_SN} ${PRIV_CID} ${S_OID_USER} ${EMPTY} s_file_read
# Get Range
Get Range ${USER_KEY} ${PRIV_CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
@ -63,31 +66,31 @@ Check Private Container
Get Range Hash ${SYSTEM_KEY_SN} ${PRIV_CID} ${S_OID_USER} ${EMPTY} 0:256
# Search
@{S_OBJ_PRIV} = Create List ${S_OID_USER} ${S_OID_SYS_SN}
@{S_OBJ_PRIV} = Create List ${S_OID_USER} ${S_OID_SYS_SN}
Search object ${USER_KEY} ${PRIV_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_PRIV}
Run Keyword And Expect Error *
... Search object ${OTHER_KEY} ${PRIV_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_PRIV}
Search object ${SYSTEM_KEY_IR} ${PRIV_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_PRIV}
Search object ${SYSTEM_KEY_SN} ${PRIV_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_PRIV}
# Head
Head object ${USER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} ${EMPTY}
Run Keyword And Expect Error *
... Head object ${OTHER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY} ${EMPTY}
Head object ${SYSTEM_KEY_IR} ${PRIV_CID} ${S_OID_USER} ${EMPTY} ${EMPTY}
Head object ${SYSTEM_KEY_SN} ${PRIV_CID} ${S_OID_USER} ${EMPTY} ${EMPTY}
# Delete
# Delete
Run Keyword And Expect Error *
... Delete object ${OTHER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY}
... Delete object ${OTHER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY}
Run Keyword And Expect Error *
... Delete object ${SYSTEM_KEY_IR} ${PRIV_CID} ${S_OID_USER} ${EMPTY}
... Delete object ${SYSTEM_KEY_IR} ${PRIV_CID} ${S_OID_USER} ${EMPTY}
Run Keyword And Expect Error *
... Delete object ${SYSTEM_KEY_SN} ${PRIV_CID} ${S_OID_USER} ${EMPTY}
Delete object ${USER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY}
Delete object ${USER_KEY} ${PRIV_CID} ${S_OID_USER} ${EMPTY}
Cleanup
Cleanup Files
Cleanup Files

View file

@ -3,6 +3,7 @@ Variables ../../../variables/common.py
Library Collections
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_acl_basic.robot
@ -13,6 +14,8 @@ Basic ACL Operations for Private Container
[Tags] ACL NeoFS NeoCLI
[Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys
Create Containers
@ -23,7 +26,7 @@ Basic ACL Operations for Private Container
Generate file ${COMPLEX_OBJ_SIZE}
Check Private Container Complex
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
@ -32,7 +35,7 @@ Check Private Container
[Arguments] ${RUN_TYPE}
# Put target object to use in storage groups
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${PRIV_CID} ${EMPTY} ${EMPTY}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${PRIV_CID} ${EMPTY} ${EMPTY}
# Storage group Operations (Put, List, Get, Delete) with different Keys
@ -41,7 +44,7 @@ Check Private Container
${SG_OID_1} = Put Storagegroup ${USER_KEY} ${PRIV_CID} ${EMPTY} ${S_OID_USER}
List Storagegroup ${USER_KEY} ${PRIV_CID} ${EMPTY} ${SG_OID_1} ${SG_OID_INV}
@{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${USER_KEY} ${PRIV_CID} ${S_OID_USER}
... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER}
... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER}
Get Storagegroup ${USER_KEY} ${PRIV_CID} ${SG_OID_1} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS}
Delete Storagegroup ${USER_KEY} ${PRIV_CID} ${SG_OID_1} ${EMPTY}
@ -59,7 +62,7 @@ Check Private Container
# System group key (storage node)
${SG_OID_1} = Put Storagegroup ${SYSTEM_KEY_SN} ${PRIV_CID} ${EMPTY} ${S_OID_USER}
List Storagegroup ${SYSTEM_KEY_SN} ${PRIV_CID} ${EMPTY} ${SG_OID_1} ${SG_OID_INV}
List Storagegroup ${SYSTEM_KEY_SN} ${PRIV_CID} ${EMPTY} ${SG_OID_1} ${SG_OID_INV}
@{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${SYSTEM_KEY_SN} ${PRIV_CID} ${S_OID_USER}
... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER}
Get Storagegroup ${SYSTEM_KEY_SN} ${PRIV_CID} ${SG_OID_1} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS}
@ -72,9 +75,9 @@ Check Private Container
... Put Storagegroup ${SYSTEM_KEY_IR} ${PRIV_CID} ${EMPTY} ${S_OID_USER}
Run Keyword And Expect Error *
... List Storagegroup ${SYSTEM_KEY_IR} ${PRIV_CID} ${EMPTY} ${SG_OID_INV}
@{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${USER_KEY} ${PRIV_CID} ${S_OID_USER}
... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER}
... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER}
Get Storagegroup ${SYSTEM_KEY_IR} ${PRIV_CID} ${SG_OID_INV} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS}
Run Keyword And Expect Error *
@ -82,6 +85,6 @@ Check Private Container
Cleanup
Cleanup Files
Get Docker Logs acl_basic
Cleanup
Cleanup Files
Get Docker Logs acl_basic

View file

@ -2,6 +2,7 @@
Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_acl_basic.robot
@ -12,8 +13,10 @@ Basic ACL Operations for Public Container
[Tags] ACL NeoFS NeoCLI
[Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys
Create Containers
Generate file ${SIMPLE_OBJ_SIZE}
Check Public Container
@ -22,24 +25,24 @@ Basic ACL Operations for Public Container
Generate file ${COMPLEX_OBJ_SIZE}
Check Public Container
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
Check Public Container
# Put
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${PUBLIC_CID} ${EMPTY} ${EMPTY}
${S_OID_OTHER} = Put object ${OTHER_KEY} ${FILE_S} ${PUBLIC_CID} ${EMPTY} ${EMPTY}
${S_OID_SYS_IR} = Put object ${SYSTEM_KEY_IR} ${FILE_S} ${PUBLIC_CID} ${EMPTY} ${EMPTY}
${S_OID_SYS_SN} = Put object ${SYSTEM_KEY_SN} ${FILE_S} ${PUBLIC_CID} ${EMPTY} ${EMPTY}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${PUBLIC_CID} ${EMPTY} ${EMPTY}
${S_OID_OTHER} = Put object ${OTHER_KEY} ${FILE_S} ${PUBLIC_CID} ${EMPTY} ${EMPTY}
${S_OID_SYS_IR} = Put object ${SYSTEM_KEY_IR} ${FILE_S} ${PUBLIC_CID} ${EMPTY} ${EMPTY}
${S_OID_SYS_SN} = Put object ${SYSTEM_KEY_SN} ${FILE_S} ${PUBLIC_CID} ${EMPTY} ${EMPTY}
# Get
Get object ${USER_KEY} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} s_file_read
Get object ${OTHER_KEY} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} s_file_read
Get object ${SYSTEM_KEY_IR} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} s_file_read
Get object ${SYSTEM_KEY_SN} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} s_file_read
Get object ${SYSTEM_KEY_SN} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY} s_file_read
# Get Range
Get Range ${USER_KEY} ${PUBLIC_CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
@ -79,12 +82,12 @@ Check Public Container
# Delete
Delete object ${USER_KEY} ${PUBLIC_CID} ${S_OID_SYS_IR} ${EMPTY}
Delete object ${USER_KEY} ${PUBLIC_CID} ${S_OID_SYS_IR} ${EMPTY}
Delete object ${OTHER_KEY} ${PUBLIC_CID} ${S_OID_SYS_SN} ${EMPTY}
Delete object ${SYSTEM_KEY_IR} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY}
Delete object ${SYSTEM_KEY_IR} ${PUBLIC_CID} ${S_OID_USER} ${EMPTY}
Delete object ${SYSTEM_KEY_SN} ${PUBLIC_CID} ${S_OID_OTHER} ${EMPTY}
Cleanup
Cleanup Files
Cleanup Files

View file

@ -1,8 +1,9 @@
*** Settings ***
Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_acl_basic.robot
@ -13,8 +14,10 @@ Basic ACL Operations for Public Container
[Tags] ACL NeoFS NeoCLI
[Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys
Create Containers
Generate file ${SIMPLE_OBJ_SIZE}
Check Public Container Simple
@ -23,9 +26,9 @@ Basic ACL Operations for Public Container
Generate file ${COMPLEX_OBJ_SIZE}
Check Public Container Complex
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
Check Public Container
@ -33,22 +36,22 @@ Check Public Container
# Storage group Operations (Put, List, Get, Delete)
Log Storage group Operations for each Role keys
# Put target object to use in storage groups
${S_OID} = Put object ${USER_KEY} ${FILE_S} ${PUBLIC_CID} ${EMPTY} ${EMPTY}
${S_OID} = Put object ${USER_KEY} ${FILE_S} ${PUBLIC_CID} ${EMPTY} ${EMPTY}
@{Roles_keys} = Create List ${USER_KEY} ${OTHER_KEY} ${SYSTEM_KEY_IR} ${SYSTEM_KEY_SN}
FOR ${role_key} IN @{Roles_keys}
${SG_OID_1} = Put Storagegroup ${role_key} ${PUBLIC_CID} ${EMPTY} ${S_OID}
List Storagegroup ${role_key} ${PUBLIC_CID} ${EMPTY} ${SG_OID_1}
List Storagegroup ${role_key} ${PUBLIC_CID} ${EMPTY} ${SG_OID_1}
@{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${role_key} ${PUBLIC_CID} ${S_OID}
... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID}
... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID}
Get Storagegroup ${role_key} ${PUBLIC_CID} ${SG_OID_1} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS}
Delete Storagegroup ${role_key} ${PUBLIC_CID} ${SG_OID_1} ${EMPTY}
END
Cleanup
Cleanup Files
Get Docker Logs acl_basic
Cleanup Files
Get Docker Logs acl_basic

View file

@ -1,7 +1,8 @@
*** Settings ***
Variables ../../../variables/common.py
Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_acl_basic.robot
@ -12,18 +13,20 @@ Basic ACL Operations for Read-Only Container
[Tags] ACL NeoFS NeoCLI
[Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys
Create Containers
Generate file ${SIMPLE_OBJ_SIZE}
Check Read-Only Container Simple
Create Containers
Generate file ${COMPLEX_OBJ_SIZE}
Check Read-Only Container Complex
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
@ -45,7 +48,7 @@ Check Read-Only Container
${SG_OID_1} = Put Storagegroup ${USER_KEY} ${READONLY_CID} ${EMPTY} ${S_OID_USER}
List Storagegroup ${USER_KEY} ${READONLY_CID} ${EMPTY} ${SG_OID_1} ${SG_OID_INV}
@{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${USER_KEY} ${READONLY_CID} ${S_OID_USER}
... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER}
... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER}
Get Storagegroup ${USER_KEY} ${READONLY_CID} ${SG_OID_1} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS}
Delete Storagegroup ${USER_KEY} ${READONLY_CID} ${SG_OID_1} ${EMPTY}
@ -53,7 +56,7 @@ Check Read-Only Container
... Put Storagegroup ${OTHER_KEY} ${READONLY_CID} ${EMPTY} ${S_OID_USER}
List Storagegroup ${OTHER_KEY} ${READONLY_CID} ${EMPTY} ${SG_OID_INV}
@{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${USER_KEY} ${READONLY_CID} ${S_OID_USER}
... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER}
... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER}
Get Storagegroup ${OTHER_KEY} ${READONLY_CID} ${SG_OID_INV} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS}
Run Keyword And Expect Error *
... Delete Storagegroup ${OTHER_KEY} ${READONLY_CID} ${SG_OID_INV} ${EMPTY}
@ -62,7 +65,7 @@ Check Read-Only Container
... Put Storagegroup ${SYSTEM_KEY_IR} ${READONLY_CID} ${EMPTY} ${S_OID_USER}
List Storagegroup ${SYSTEM_KEY_IR} ${READONLY_CID} ${EMPTY} ${SG_OID_INV}
@{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${USER_KEY} ${READONLY_CID} ${S_OID_USER}
... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER}
... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER}
Get Storagegroup ${SYSTEM_KEY_IR} ${READONLY_CID} ${SG_OID_INV} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS}
Run Keyword And Expect Error *
... Delete Storagegroup ${SYSTEM_KEY_IR} ${READONLY_CID} ${SG_OID_INV} ${EMPTY}
@ -70,7 +73,7 @@ Check Read-Only Container
# Get
Get object ${USER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} s_file_read
Get object ${OTHER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} s_file_read
Get object ${SYSTEM_KEY_IR} ${READONLY_CID} ${S_OID_USER} ${EMPTY} s_file_read
Get object ${SYSTEM_KEY_IR} ${READONLY_CID} ${S_OID_USER} ${EMPTY} s_file_read
Get object ${SYSTEM_KEY_SN} ${READONLY_CID} ${S_OID_USER} ${EMPTY} s_file_read
# Get Range
@ -87,13 +90,13 @@ Check Read-Only Container
Get Range Hash ${SYSTEM_KEY_SN} ${READONLY_CID} ${S_OID_USER} ${EMPTY} 0:256
# Search
@{S_OBJ_RO} = Create List ${S_OID_USER} ${S_OID_SYS_SN}
@{S_OBJ_RO} = Create List ${S_OID_USER} ${S_OID_SYS_SN}
Search object ${USER_KEY} ${READONLY_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_RO}
Search object ${OTHER_KEY} ${READONLY_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_RO}
Search object ${SYSTEM_KEY_IR} ${READONLY_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_RO}
Search object ${SYSTEM_KEY_SN} ${READONLY_CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_RO}
# Head
Head object ${USER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} ${EMPTY}
Head object ${OTHER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY} ${EMPTY}
@ -101,15 +104,15 @@ Check Read-Only Container
Head object ${SYSTEM_KEY_SN} ${READONLY_CID} ${S_OID_USER} ${EMPTY} ${EMPTY}
# Delete
Run Keyword And Expect Error *
Run Keyword And Expect Error *
... Delete object ${OTHER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY}
Run Keyword And Expect Error *
Run Keyword And Expect Error *
... Delete object ${SYSTEM_KEY_IR} ${READONLY_CID} ${S_OID_USER} ${EMPTY}
Run Keyword And Expect Error *
Run Keyword And Expect Error *
... Delete object ${SYSTEM_KEY_SN} ${READONLY_CID} ${S_OID_USER} ${EMPTY}
Delete object ${USER_KEY} ${READONLY_CID} ${S_OID_USER} ${EMPTY}
Cleanup
Cleanup Files
Cleanup Files

View file

@ -1,8 +1,9 @@
*** Settings ***
Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_acl_basic.robot
@ -13,18 +14,20 @@ Basic ACL Operations for Read-Only Container
[Tags] ACL NeoFS NeoCLI
[Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys
Create Containers
Generate file ${SIMPLE_OBJ_SIZE}
Check Read-Only Container Simple
Create Containers
Generate file ${COMPLEX_OBJ_SIZE}
Check Read-Only Container Complex
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
@ -41,7 +44,7 @@ Check Read-Only Container
${SG_OID_1} = Put Storagegroup ${USER_KEY} ${READONLY_CID} ${EMPTY} ${S_OID_USER}
List Storagegroup ${USER_KEY} ${READONLY_CID} ${EMPTY} ${SG_OID_1} ${SG_OID_INV}
@{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${USER_KEY} ${READONLY_CID} ${S_OID_USER}
... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER}
... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER}
Get Storagegroup ${USER_KEY} ${READONLY_CID} ${SG_OID_1} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS}
Delete Storagegroup ${USER_KEY} ${READONLY_CID} ${SG_OID_1} ${EMPTY}
@ -50,7 +53,7 @@ Check Read-Only Container
... Put Storagegroup ${OTHER_KEY} ${READONLY_CID} ${EMPTY} ${S_OID_USER}
List Storagegroup ${OTHER_KEY} ${READONLY_CID} ${EMPTY} ${SG_OID_INV}
@{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${USER_KEY} ${READONLY_CID} ${S_OID_USER}
... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER}
... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER}
Get Storagegroup ${OTHER_KEY} ${READONLY_CID} ${SG_OID_INV} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS}
Run Keyword And Expect Error *
... Delete Storagegroup ${OTHER_KEY} ${READONLY_CID} ${SG_OID_INV} ${EMPTY}
@ -60,7 +63,7 @@ Check Read-Only Container
... Put Storagegroup ${SYSTEM_KEY_IR} ${READONLY_CID} ${EMPTY} ${S_OID_USER}
List Storagegroup ${SYSTEM_KEY_IR} ${READONLY_CID} ${EMPTY} ${SG_OID_INV}
@{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${USER_KEY} ${READONLY_CID} ${S_OID_USER}
... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER}
... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER}
Get Storagegroup ${SYSTEM_KEY_IR} ${READONLY_CID} ${SG_OID_INV} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS}
Run Keyword And Expect Error *
... Delete Storagegroup ${SYSTEM_KEY_IR} ${READONLY_CID} ${SG_OID_INV} ${EMPTY}
@ -69,5 +72,5 @@ Check Read-Only Container
Cleanup
Cleanup Files
Get Docker Logs acl_basic
Cleanup Files
Get Docker Logs acl_basic

View file

@ -2,6 +2,7 @@
Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Library Collections
Resource common_steps_acl_bearer.robot
@ -13,35 +14,37 @@ BearerToken Operations
[Tags] ACL NeoFS NeoCLI BearerToken
[Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys
Prepare eACL Role rules
Log Check Bearer token with simple object
Generate file ${SIMPLE_OBJ_SIZE}
Check eACL Deny and Allow All Bearer
Check eACL Deny and Allow All Bearer
Log Check Bearer token with complex object
Generate file ${COMPLEX_OBJ_SIZE}
Check eACL Deny and Allow All Bearer
Check eACL Deny and Allow All Bearer
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
Check eACL Deny and Allow All Bearer
${CID} = Create Container Public
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL}
@{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} ${EMPTY} ${FILE_OTH_HEADER}
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}
Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Delete object ${USER_KEY} ${CID} ${D_OID_USER} ${EMPTY}
@ -50,38 +53,38 @@ Check eACL Deny and Allow All Bearer
# The current ACL cache lifetime is 30 sec
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
${rule1}= Create Dictionary Operation=GET Access=ALLOW Role=USER
${rule2}= Create Dictionary Operation=HEAD Access=ALLOW Role=USER
${rule3}= Create Dictionary Operation=PUT Access=ALLOW Role=USER
${rule4}= Create Dictionary Operation=DELETE Access=ALLOW Role=USER
${rule5}= Create Dictionary Operation=SEARCH Access=ALLOW Role=USER
${rule6}= Create Dictionary Operation=GETRANGE Access=ALLOW Role=USER
${rule7}= Create Dictionary Operation=GETRANGEHASH Access=ALLOW Role=USER
${rule1}= Create Dictionary Operation=GET Access=ALLOW Role=USER
${rule2}= Create Dictionary Operation=HEAD Access=ALLOW Role=USER
${rule3}= Create Dictionary Operation=PUT Access=ALLOW Role=USER
${rule4}= Create Dictionary Operation=DELETE Access=ALLOW Role=USER
${rule5}= Create Dictionary Operation=SEARCH Access=ALLOW Role=USER
${rule6}= Create Dictionary Operation=GETRANGE Access=ALLOW Role=USER
${rule7}= Create Dictionary Operation=GETRANGEHASH Access=ALLOW Role=USER
${eACL_gen}= Create List ${rule1} ${rule2} ${rule3} ${rule4} ${rule5} ${rule6} ${rule7}
Form BearerToken file ${USER_KEY} ${CID} bearer_allow_all_user ${eACL_gen} 100500
Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
Run Keyword And Expect Error *
... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Run Keyword And Expect Error *
... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Run Keyword And Expect Error *
... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Run Keyword And Expect Error *
... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Run Keyword And Expect Error *
... Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
# All operations on object should be passed with bearer token
Put object ${USER_KEY} ${FILE_S} ${CID} bearer_allow_all_user ${FILE_OTH_HEADER}
Put object ${USER_KEY} ${FILE_S} ${CID} bearer_allow_all_user ${FILE_OTH_HEADER}
Get object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user local_file_eacl
Search object ${USER_KEY} ${CID} ${EMPTY} bearer_allow_all_user ${FILE_USR_HEADER} ${S_OBJ_H}
Head object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range bearer_allow_all_user 0:256
Head object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range bearer_allow_all_user 0:256
Delete object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user
Cleanup
Cleanup Files
Cleanup Files

View file

@ -2,6 +2,7 @@
Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Library Collections
Resource common_steps_acl_bearer.robot
@ -13,28 +14,30 @@ BearerToken Operations
[Tags] ACL NeoFS NeoCLI BearerToken
[Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys
Prepare eACL Role rules
Log Check Bearer token with simple object
Generate file ${SIMPLE_OBJ_SIZE}
Check eACL Deny and Allow All Bearer Simple
Log Check Bearer token with complex object
Generate file ${COMPLEX_OBJ_SIZE}
Check eACL Deny and Allow All Bearer Complex
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
Check eACL Deny and Allow All Bearer
[Arguments] ${RUN_TYPE}
${CID} = Create Container Public
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
# Storage group Operations (Put, List, Get, Delete)
@ -42,22 +45,22 @@ Check eACL Deny and Allow All Bearer
${SG_OID_1} = Put Storagegroup ${USER_KEY} ${CID} ${EMPTY} ${S_OID_USER}
List Storagegroup ${USER_KEY} ${CID} ${EMPTY} ${SG_OID_1} ${SG_OID_INV}
@{EXPECTED_OIDS} = Run Keyword If "${RUN_TYPE}" == "Complex" Get Split objects ${USER_KEY} ${CID} ${S_OID_USER}
... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER}
... ELSE IF "${RUN_TYPE}" == "Simple" Create List ${S_OID_USER}
Get Storagegroup ${USER_KEY} ${CID} ${SG_OID_1} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS}
Delete Storagegroup ${USER_KEY} ${CID} ${SG_OID_1} ${EMPTY}
Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_USER} --await
# The current ACL cache lifetime is 30 sec
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
${rule1}= Create Dictionary Operation=GET Access=ALLOW Role=USER
${rule2}= Create Dictionary Operation=HEAD Access=ALLOW Role=USER
${rule3}= Create Dictionary Operation=PUT Access=ALLOW Role=USER
${rule4}= Create Dictionary Operation=DELETE Access=ALLOW Role=USER
${rule5}= Create Dictionary Operation=SEARCH Access=ALLOW Role=USER
${rule6}= Create Dictionary Operation=GETRANGE Access=ALLOW Role=USER
${rule7}= Create Dictionary Operation=GETRANGEHASH Access=ALLOW Role=USER
${rule1}= Create Dictionary Operation=GET Access=ALLOW Role=USER
${rule2}= Create Dictionary Operation=HEAD Access=ALLOW Role=USER
${rule3}= Create Dictionary Operation=PUT Access=ALLOW Role=USER
${rule4}= Create Dictionary Operation=DELETE Access=ALLOW Role=USER
${rule5}= Create Dictionary Operation=SEARCH Access=ALLOW Role=USER
${rule6}= Create Dictionary Operation=GETRANGE Access=ALLOW Role=USER
${rule7}= Create Dictionary Operation=GETRANGEHASH Access=ALLOW Role=USER
${eACL_gen}= Create List ${rule1} ${rule2} ${rule3} ${rule4} ${rule5} ${rule6} ${rule7}
@ -67,7 +70,7 @@ Check eACL Deny and Allow All Bearer
Run Keyword And Expect Error *
... Put Storagegroup ${USER_KEY} ${CID} ${EMPTY} ${S_OID_USER}
Run Keyword And Expect Error *
... List Storagegroup ${USER_KEY} ${CID} ${EMPTY} ${SG_OID_1} ${SG_OID_INV}
... List Storagegroup ${USER_KEY} ${CID} ${EMPTY} ${SG_OID_1} ${SG_OID_INV}
Run Keyword And Expect Error *
... Get Storagegroup ${USER_KEY} ${CID} ${SG_OID_1} ${EMPTY} ${EMPTY} @{EXPECTED_OIDS}
Run Keyword And Expect Error *
@ -75,11 +78,11 @@ Check eACL Deny and Allow All Bearer
# Storagegroup should passed with User group key and bearer token
${SG_OID_NEW} = Put Storagegroup ${USER_KEY} ${CID} bearer_allow_all_user ${S_OID_USER}
List Storagegroup ${USER_KEY} ${CID} bearer_allow_all_user ${SG_OID_NEW} ${SG_OID_INV}
List Storagegroup ${USER_KEY} ${CID} bearer_allow_all_user ${SG_OID_NEW} ${SG_OID_INV}
Get Storagegroup ${USER_KEY} ${CID} ${SG_OID_INV} bearer_allow_all_user ${EMPTY} @{EXPECTED_OIDS}
Delete Storagegroup ${USER_KEY} ${CID} ${SG_OID_INV} bearer_allow_all_user
Cleanup
Cleanup Files
Get Docker Logs acl_bearer
Cleanup
Cleanup Files
Get Docker Logs acl_bearer

View file

@ -2,6 +2,7 @@
Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Library Collections
Resource common_steps_acl_bearer.robot
@ -12,21 +13,23 @@ BearerToken Operations for Сompound Operations
[Tags] ACL NeoFS NeoCLI BearerToken
[Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys
Prepare eACL Role rules
Log Check Bearer token with simple object
Generate file ${SIMPLE_OBJ_SIZE}
Check Сompound Operations
Log Check Bearer token with complex object
Generate file ${COMPLEX_OBJ_SIZE}
Check Сompound Operations
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
Check Сompound Operations
@ -47,25 +50,25 @@ Check Bearer Сompound Get
[Arguments] ${KEY} ${DENY_GROUP} ${DENY_EACL}
${CID} = Create Container Public
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
@{S_OBJ_H} = Create List ${S_OID_USER}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Set eACL ${USER_KEY} ${CID} ${DENY_EACL} --await
# The current ACL cache lifetime is 30 sec
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
${rule1}= Create Dictionary Operation=GET Access=ALLOW Role=${DENY_GROUP}
${rule2}= Create Dictionary Operation=GETRANGE Access=ALLOW Role=${DENY_GROUP}
${rule3}= Create Dictionary Operation=GETRANGEHASH Access=ALLOW Role=${DENY_GROUP}
${rule1}= Create Dictionary Operation=GET Access=ALLOW Role=${DENY_GROUP}
${rule2}= Create Dictionary Operation=GETRANGE Access=ALLOW Role=${DENY_GROUP}
${rule3}= Create Dictionary Operation=GETRANGEHASH Access=ALLOW Role=${DENY_GROUP}
${eACL_gen}= Create List ${rule1} ${rule2} ${rule3}
Form BearerToken file ${USER_KEY} ${CID} bearer_allow ${eACL_gen} 100500
Form BearerToken file ${USER_KEY} ${CID} bearer_allow ${eACL_gen} 100500
Run Keyword And Expect Error *
... Head object ${KEY} ${CID} ${S_OID_USER} bearer_allow
... Head object ${KEY} ${CID} ${S_OID_USER} bearer_allow
Get object ${KEY} ${CID} ${S_OID_USER} bearer_allow local_file_eacl
Get Range ${KEY} ${CID} ${S_OID_USER} s_get_range bearer_allow 0:256
@ -79,56 +82,56 @@ Check Bearer Сompound Delete
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${EMPTY}
Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
Delete object ${KEY} ${CID} ${D_OID_USER} ${EMPTY}
Set eACL ${USER_KEY} ${CID} ${DENY_EACL} --await
# The current ACL cache lifetime is 30 sec
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
${rule1} = Create Dictionary Operation=DELETE Access=ALLOW Role=${DENY_GROUP}
${rule2} = Create Dictionary Operation=PUT Access=DENY Role=${DENY_GROUP}
${rule3} = Create Dictionary Operation=HEAD Access=DENY Role=${DENY_GROUP}
${rule1} = Create Dictionary Operation=DELETE Access=ALLOW Role=${DENY_GROUP}
${rule2} = Create Dictionary Operation=PUT Access=DENY Role=${DENY_GROUP}
${rule3} = Create Dictionary Operation=HEAD Access=DENY Role=${DENY_GROUP}
${eACL_gen} = Create List ${rule1} ${rule2} ${rule3}
Form BearerToken file ${USER_KEY} ${CID} bearer_allow ${eACL_gen} 100500
Form BearerToken file ${USER_KEY} ${CID} bearer_allow ${eACL_gen} 100500
Run Keyword And Expect Error *
... Head object ${KEY} ${CID} ${S_OID_USER} bearer_allow
... Head object ${KEY} ${CID} ${S_OID_USER} bearer_allow
Run Keyword And Expect Error *
... Put object ${KEY} ${FILE_S} ${CID} bearer_allow ${FILE_OTH_HEADER}
... Put object ${KEY} ${FILE_S} ${CID} bearer_allow ${FILE_OTH_HEADER}
Delete object ${KEY} ${CID} ${S_OID_USER} bearer_allow
Check Bearer Сompound Get Range Hash
[Arguments] ${KEY} ${DENY_GROUP} ${DENY_EACL}
[Arguments] ${KEY} ${DENY_GROUP} ${DENY_EACL}
${CID} = Create Container Public
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
Get Range Hash ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} 0:256
Set eACL ${USER_KEY} ${CID} ${DENY_EACL} --await
# The current ACL cache lifetime is 30 sec
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
${rule1} = Create Dictionary Operation=GETRANGEHASH Access=ALLOW Role=${DENY_GROUP}
${rule2} = Create Dictionary Operation=GETRANGE Access=DENY Role=${DENY_GROUP}
${rule3} = Create Dictionary Operation=GET Access=DENY Role=${DENY_GROUP}
${rule1} = Create Dictionary Operation=GETRANGEHASH Access=ALLOW Role=${DENY_GROUP}
${rule2} = Create Dictionary Operation=GETRANGE Access=DENY Role=${DENY_GROUP}
${rule3} = Create Dictionary Operation=GET Access=DENY Role=${DENY_GROUP}
${eACL_gen} = Create List ${rule1} ${rule2} ${rule3}
Form BearerToken file ${USER_KEY} ${CID} bearer_allow ${eACL_gen} 100500
Form BearerToken file ${USER_KEY} ${CID} bearer_allow ${eACL_gen} 100500
Run Keyword And Expect Error *
... Get Range ${KEY} ${CID} ${S_OID_USER} s_get_range bearer_allow 0:256
Run Keyword And Expect Error *
... Get object ${KEY} ${CID} ${S_OID_USER} bearer_allow local_file_eacl
Get Range Hash ${KEY} ${CID} ${S_OID_USER} bearer_allow 0:256
Cleanup
Cleanup Files
Cleanup Files

View file

@ -2,6 +2,7 @@
Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Library Collections
Resource common_steps_acl_bearer.robot
@ -13,35 +14,37 @@ BearerToken Operations with Filter OID Equal
[Tags] ACL NeoFS NeoCLI BearerToken
[Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys
Prepare eACL Role rules
Log Check Bearer token with simple object
Generate file ${SIMPLE_OBJ_SIZE}
Check eACL Deny and Allow All Bearer Filter OID Equal
Log Check Bearer token with complex object
Generate file ${COMPLEX_OBJ_SIZE}
Check eACL Deny and Allow All Bearer Filter OID Equal
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
Check eACL Deny and Allow All Bearer Filter OID Equal
${CID} = Create Container Public
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${EMPTY}
${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} ${EMPTY} ${FILE_USR_HEADER_DEL}
@{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} ${EMPTY} ${FILE_OTH_HEADER}
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}
Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Delete object ${USER_KEY} ${CID} ${D_OID_USER} ${EMPTY}
@ -50,7 +53,7 @@ Check eACL Deny and Allow All Bearer Filter OID Equal
# The current ACL cache lifetime is 30 sec
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
${filters}= Create Dictionary headerType=OBJECT matchType=STRING_EQUAL key=$Object:objectID value=${S_OID_USER}
${filters}= Create Dictionary headerType=OBJECT matchType=STRING_EQUAL key=$Object:objectID value=${S_OID_USER}
${rule1}= Create Dictionary Operation=GET Access=ALLOW Role=USER Filters=${filters}
${rule2}= Create Dictionary Operation=HEAD Access=ALLOW Role=USER Filters=${filters}
@ -62,16 +65,16 @@ Check eACL Deny and Allow All Bearer Filter OID Equal
${eACL_gen}= Create List ${rule1} ${rule2} ${rule3} ${rule4} ${rule5} ${rule6} ${rule7}
Form BearerToken file ${USER_KEY} ${CID} bearer_allow_all_user ${eACL_gen} 100500
Form BearerToken file ${USER_KEY} ${CID} bearer_allow_all_user ${eACL_gen} 100500
Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
Run Keyword And Expect Error *
... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Run Keyword And Expect Error *
... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Run Keyword And Expect Error *
... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Run Keyword And Expect Error *
... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Run Keyword And Expect Error *
@ -79,14 +82,14 @@ Check eACL Deny and Allow All Bearer Filter OID Equal
Run Keyword And Expect Error *
... Search object ${USER_KEY} ${CID} ${EMPTY} bearer_allow_all_user ${FILE_USR_HEADER} ${S_OBJ_H}
Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${CID} bearer_allow_all_user ${FILE_OTH_HEADER}
... Put object ${USER_KEY} ${FILE_S} ${CID} bearer_allow_all_user ${FILE_OTH_HEADER}
Run Keyword And Expect Error *
... Get object ${USER_KEY} ${CID} ${S_OID_USER_2} bearer_allow_all_user local_file_eacl
Get object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user local_file_eacl
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range bearer_allow_all_user 0:256
Head object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user
Get object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user local_file_eacl
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range bearer_allow_all_user 0:256
Head object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user
Delete object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user
Run Keyword And Expect Error *
... Delete object ${USER_KEY} ${CID} ${D_OID_USER} bearer_allow_all_user
@ -94,4 +97,4 @@ Check eACL Deny and Allow All Bearer Filter OID Equal
Cleanup
Cleanup Files
Get Docker Logs acl_bearer
Get Docker Logs acl_bearer

View file

@ -2,6 +2,7 @@
Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Library Collections
Resource common_steps_acl_bearer.robot
@ -13,22 +14,24 @@ BearerToken Operations with Filter OID NotEqual
[Tags] ACL NeoFS NeoCLI BearerToken
[Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys
Prepare eACL Role rules
Log Check Bearer token with simple object
Generate file ${SIMPLE_OBJ_SIZE}
Check eACL Deny and Allow All Bearer Filter OID NotEqual
Log Check Bearer token with complex object
Generate file ${COMPLEX_OBJ_SIZE}
Check eACL Deny and Allow All Bearer Filter OID NotEqual
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
@ -38,10 +41,10 @@ Prepare eACL Role rules
# eACL rules for all operations and similar permissions
@{Roles} = Create List OTHERS USER SYSTEM
FOR ${role} IN @{Roles}
${rule1} = Create Dictionary Operation=GET Access=DENY Role=${role}
${rule2} = Create Dictionary Operation=HEAD Access=DENY Role=${role}
${rule3} = Create Dictionary Operation=PUT Access=DENY Role=${role}
${rule4} = Create Dictionary Operation=DELETE Access=DENY Role=${role}
${rule1} = Create Dictionary Operation=GET Access=DENY Role=${role}
${rule2} = Create Dictionary Operation=HEAD Access=DENY Role=${role}
${rule3} = Create Dictionary Operation=PUT Access=DENY Role=${role}
${rule4} = Create Dictionary Operation=DELETE Access=DENY Role=${role}
${rule5} = Create Dictionary Operation=SEARCH Access=DENY Role=${role}
${rule6} = Create Dictionary Operation=GETRANGE Access=DENY Role=${role}
${rule7} = Create Dictionary Operation=GETRANGEHASH Access=DENY Role=${role}
@ -53,16 +56,16 @@ Prepare eACL Role rules
Check eACL Deny and Allow All Bearer Filter OID NotEqual
${CID} = Create Container Public
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${EMPTY}
${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} ${EMPTY} ${FILE_USR_HEADER_DEL}
@{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} ${EMPTY} ${FILE_OTH_HEADER}
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}
Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Delete object ${USER_KEY} ${CID} ${D_OID_USER} ${EMPTY}
@ -71,7 +74,7 @@ Check eACL Deny and Allow All Bearer Filter OID NotEqual
# The current ACL cache lifetime is 30 sec
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
${filters}= Create Dictionary headerType=OBJECT matchType=STRING_NOT_EQUAL key=$Object:objectID value=${S_OID_USER_2}
${filters}= Create Dictionary headerType=OBJECT matchType=STRING_NOT_EQUAL key=$Object:objectID value=${S_OID_USER_2}
${rule1}= Create Dictionary Operation=GET Access=ALLOW Role=USER Filters=${filters}
${rule2}= Create Dictionary Operation=HEAD Access=ALLOW Role=USER Filters=${filters}
@ -83,16 +86,16 @@ Check eACL Deny and Allow All Bearer Filter OID NotEqual
${eACL_gen}= Create List ${rule1} ${rule2} ${rule3} ${rule4} ${rule5} ${rule6} ${rule7}
Form BearerToken file ${USER_KEY} ${CID} bearer_allow_all_user ${eACL_gen} 100500
Form BearerToken file ${USER_KEY} ${CID} bearer_allow_all_user ${eACL_gen} 100500
Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
Run Keyword And Expect Error *
... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Run Keyword And Expect Error *
... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Run Keyword And Expect Error *
... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Run Keyword And Expect Error *
... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Run Keyword And Expect Error *
@ -100,26 +103,26 @@ Check eACL Deny and Allow All Bearer Filter OID NotEqual
Run Keyword And Expect Error *
... Search object ${USER_KEY} ${CID} ${EMPTY} bearer_allow_all_user ${FILE_USR_HEADER} ${S_OBJ_H}
Put object ${USER_KEY} ${FILE_S} ${CID} bearer_allow_all_user ${FILE_OTH_HEADER}
Get object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user local_file_eacl
Put object ${USER_KEY} ${FILE_S} ${CID} bearer_allow_all_user ${FILE_OTH_HEADER}
Get object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user local_file_eacl
Run Keyword And Expect Error *
... Get object ${USER_KEY} ${CID} ${S_OID_USER_2} bearer_allow_all_user local_file_eacl
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range bearer_allow_all_user 0:256
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range bearer_allow_all_user 0:256
Run Keyword And Expect Error *
... Get Range ${USER_KEY} ${CID} ${S_OID_USER_2} s_get_range bearer_allow_all_user 0:256
Head object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user
... Get Range ${USER_KEY} ${CID} ${S_OID_USER_2} s_get_range bearer_allow_all_user 0:256
Head object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user
Run Keyword And Expect Error *
... Head object ${USER_KEY} ${CID} ${S_OID_USER_2} bearer_allow_all_user
... Head object ${USER_KEY} ${CID} ${S_OID_USER_2} bearer_allow_all_user
Delete object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user
Run Keyword And Expect Error *
... Delete object ${USER_KEY} ${CID} ${D_OID_USER_2} bearer_allow_all_user
Cleanup
Cleanup Files
Get Docker Logs acl_bearer
Get Docker Logs acl_bearer

View file

@ -2,46 +2,44 @@
Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Library Collections
Resource common_steps_acl_bearer.robot
*** Test cases ***
BearerToken Operations with Filter UserHeader Equal
[Documentation] Testcase to validate NeoFS operations with BearerToken with Filter UserHeader Equal.
[Tags] ACL NeoFS NeoCLI BearerToken
[Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys
Prepare eACL Role rules
Log Check Bearer token with simple object
Generate file ${SIMPLE_OBJ_SIZE}
Check eACL Deny and Allow All Bearer Filter UserHeader Equal
Log Check Bearer token with complex object
Generate file ${COMPLEX_OBJ_SIZE}
Check eACL Deny and Allow All Bearer Filter UserHeader Equal
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
Prepare eACL Role rules
Log Set eACL for different Role cases
Log Set eACL for different Role cases
# eACL rules for all operations and similar permissions
@{Roles} = Create List OTHERS USER SYSTEM
FOR ${role} IN @{Roles}
${rule1} = Create Dictionary Operation=GET Access=DENY Role=${role}
${rule2} = Create Dictionary Operation=HEAD Access=DENY Role=${role}
${rule3} = Create Dictionary Operation=PUT Access=DENY Role=${role}
${rule4} = Create Dictionary Operation=DELETE Access=DENY Role=${role}
${rule1} = Create Dictionary Operation=GET Access=DENY Role=${role}
${rule2} = Create Dictionary Operation=HEAD Access=DENY Role=${role}
${rule3} = Create Dictionary Operation=PUT Access=DENY Role=${role}
${rule4} = Create Dictionary Operation=DELETE Access=DENY Role=${role}
${rule5} = Create Dictionary Operation=SEARCH Access=DENY Role=${role}
${rule6} = Create Dictionary Operation=GETRANGE Access=DENY Role=${role}
${rule7} = Create Dictionary Operation=GETRANGEHASH Access=DENY Role=${role}
@ -51,19 +49,17 @@ Prepare eACL Role rules
Set Global Variable ${EACL_DENY_ALL_${role}} gen_eacl_deny_all_${role}
END
Check eACL Deny and Allow All Bearer Filter UserHeader Equal
${CID} = Create Container Public
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${EMPTY}
${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} ${EMPTY} ${FILE_USR_HEADER_DEL}
@{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} ${EMPTY} ${FILE_OTH_HEADER}
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}
Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Delete object ${USER_KEY} ${CID} ${D_OID_USER} ${EMPTY}
@ -72,7 +68,7 @@ Check eACL Deny and Allow All Bearer Filter UserHeader Equal
# The current ACL cache lifetime is 30 sec
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
${filters}= Create Dictionary headerType=OBJECT matchType=STRING_EQUAL key=key2 value=abc
${filters}= Create Dictionary headerType=OBJECT matchType=STRING_EQUAL key=key2 value=abc
${rule1}= Create Dictionary Operation=GET Access=ALLOW Role=USER Filters=${filters}
${rule2}= Create Dictionary Operation=HEAD Access=ALLOW Role=USER Filters=${filters}
@ -84,16 +80,16 @@ Check eACL Deny and Allow All Bearer Filter UserHeader Equal
${eACL_gen}= Create List ${rule1} ${rule2} ${rule3} ${rule4} ${rule5} ${rule6} ${rule7}
Form BearerToken file ${USER_KEY} ${CID} bearer_allow_all_user ${eACL_gen} 100500
Form BearerToken file ${USER_KEY} ${CID} bearer_allow_all_user ${eACL_gen} 100500
Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
Run Keyword And Expect Error *
... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Run Keyword And Expect Error *
... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Run Keyword And Expect Error *
... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Run Keyword And Expect Error *
... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Run Keyword And Expect Error *
@ -102,29 +98,29 @@ Check eACL Deny and Allow All Bearer Filter UserHeader Equal
... Search object ${USER_KEY} ${CID} ${EMPTY} bearer_allow_all_user ${FILE_USR_HEADER} ${S_OBJ_H}
Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${CID} bearer_allow_all_user ${FILE_OTH_HEADER}
Get object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user local_file_eacl
... Put object ${USER_KEY} ${FILE_S} ${CID} bearer_allow_all_user ${FILE_OTH_HEADER}
Get object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user local_file_eacl
Run Keyword And Expect Error *
... Get object ${USER_KEY} ${CID} ${S_OID_USER_2} bearer_allow_all_user local_file_eacl
Run Keyword And Expect Error *
... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range bearer_allow_all_user 0:256
... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range bearer_allow_all_user 0:256
Run Keyword And Expect Error *
... Get Range Hash ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user 0:256
Head object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user
... Get Range Hash ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user 0:256
Head object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user
Run Keyword And Expect Error *
... Head object ${USER_KEY} ${CID} ${S_OID_USER_2} bearer_allow_all_user
... Head object ${USER_KEY} ${CID} ${S_OID_USER_2} bearer_allow_all_user
# Delete can not be filtered by UserHeader.
Run Keyword And Expect Error *
... Delete object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user
Run Keyword And Expect Error *
... Delete object ${USER_KEY} ${CID} ${S_OID_USER_2} bearer_allow_all_user
Cleanup
Cleanup Files
Get Docker Logs acl_bearer
Get Docker Logs acl_bearer

View file

@ -2,47 +2,47 @@
Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Library Collections
Resource common_steps_acl_bearer.robot
*** Test cases ***
BearerToken Operations Filter UserHeader NotEqual
[Documentation] Testcase to validate NeoFS operations with BearerToken Filter UserHeader NotEqual.
[Tags] ACL NeoFS NeoCLI BearerToken
[Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys
Prepare eACL Role rules
Log Check Bearer token with simple object
Generate file ${SIMPLE_OBJ_SIZE}
Check eACL Deny and Allow All Bearer Filter UserHeader NotEqual
Log Check Bearer token with complex object
Generate file ${COMPLEX_OBJ_SIZE}
Check eACL Deny and Allow All Bearer Filter UserHeader NotEqual
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
Check eACL Deny and Allow All Bearer Filter UserHeader NotEqual
${CID} = Create Container Public
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL}
${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL}
@{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} ${EMPTY} ${FILE_OTH_HEADER}
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}
Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Delete object ${USER_KEY} ${CID} ${D_OID_USER} ${EMPTY}
@ -51,7 +51,7 @@ Check eACL Deny and Allow All Bearer Filter UserHeader NotEqual
# The current ACL cache lifetime is 30 sec
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
${filters}= Create Dictionary headerType=OBJECT matchType=STRING_NOT_EQUAL key=key2 value=abc
${filters}= Create Dictionary headerType=OBJECT matchType=STRING_NOT_EQUAL key=key2 value=abc
${rule1}= Create Dictionary Operation=GET Access=ALLOW Role=USER Filters=${filters}
${rule2}= Create Dictionary Operation=HEAD Access=ALLOW Role=USER Filters=${filters}
@ -63,51 +63,51 @@ Check eACL Deny and Allow All Bearer Filter UserHeader NotEqual
${eACL_gen}= Create List ${rule1} ${rule2} ${rule3} ${rule4} ${rule6} ${rule7}
Form BearerToken file ${USER_KEY} ${CID} bearer_allow_all_user ${eACL_gen} 100500
Form BearerToken file ${USER_KEY} ${CID} bearer_allow_all_user ${eACL_gen} 100500
Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
Run Keyword And Expect Error *
... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Run Keyword And Expect Error *
... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Run Keyword And Expect Error *
... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Run Keyword And Expect Error *
... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Run Keyword And Expect Error *
... Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
# Search can not use filter by headers
Run Keyword And Expect Error *
... Search object ${USER_KEY} ${CID} ${EMPTY} bearer_allow_all_user ${FILE_USR_HEADER} ${S_OBJ_H}
# Different behaviour for big and small objects!
# Put object ${USER_KEY} ${FILE_S} ${CID} bearer_allow_all_user ${FILE_OTH_HEADER}
Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${CID} bearer_allow_all_user ${EMPTY}
Get object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user local_file_eacl
... Put object ${USER_KEY} ${FILE_S} ${CID} bearer_allow_all_user ${EMPTY}
Get object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user local_file_eacl
Run Keyword And Expect Error *
... Get object ${USER_KEY} ${CID} ${S_OID_USER_2} bearer_allow_all_user local_file_eacl
Run Keyword And Expect Error *
... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range bearer_allow_all_user 0:256
... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range bearer_allow_all_user 0:256
Run Keyword And Expect Error *
... Get Range Hash ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user 0:256
Head object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user
... Get Range Hash ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user 0:256
Head object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user
Run Keyword And Expect Error *
... Head object ${USER_KEY} ${CID} ${S_OID_USER_2} bearer_allow_all_user
... Head object ${USER_KEY} ${CID} ${S_OID_USER_2} bearer_allow_all_user
# Delete can not be filtered by UserHeader.
Run Keyword And Expect Error *
... Delete object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user
Run Keyword And Expect Error *
... Delete object ${USER_KEY} ${CID} ${S_OID_USER_2} bearer_allow_all_user
Cleanup
Cleanup Files
Get Docker Logs acl_bearer
Get Docker Logs acl_bearer

View file

@ -3,6 +3,7 @@
Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Library Collections
Resource common_steps_acl_bearer.robot
@ -13,53 +14,53 @@ BearerToken Operations for Inaccessible Container
[Tags] ACL NeoFS NeoCLI BearerToken
[Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys
Prepare eACL Role rules
Log Check Bearer token with simple object
Generate file ${SIMPLE_OBJ_SIZE}
Check Container Inaccessible and Allow All Bearer
Log Check Bearer token with complex object
Generate file ${COMPLEX_OBJ_SIZE}
Check Container Inaccessible and Allow All Bearer
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
Check Container Inaccessible and Allow All Bearer
${CID} = Create Container Inaccessible
Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
Run Keyword And Expect Error *
... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
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 *
... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Run Keyword And Expect Error *
... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Run Keyword And Expect Error *
... Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
${rule1}= Create Dictionary Operation=PUT Access=ALLOW Role=USER
${rule2}= Create Dictionary Operation=SEARCH Access=ALLOW Role=USER
${rule1}= Create Dictionary Operation=PUT Access=ALLOW Role=USER
${rule2}= Create Dictionary Operation=SEARCH Access=ALLOW Role=USER
${eACL_gen}= Create List ${rule1} ${rule2}
Form BearerToken file ${USER_KEY} ${CID} bearer_allow_all_user ${eACL_gen} 100500
Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${CID} bearer_allow_all_user ${FILE_USR_HEADER}
... Put object ${USER_KEY} ${FILE_S} ${CID} bearer_allow_all_user ${FILE_USR_HEADER}
Run Keyword And Expect Error *
... Search object ${USER_KEY} ${CID} ${EMPTY} bearer_allow_all_user ${FILE_USR_HEADER}
... Search object ${USER_KEY} ${CID} ${EMPTY} bearer_allow_all_user ${FILE_USR_HEADER}
Cleanup
Cleanup Files
Get Docker Logs acl_bearer
Get Docker Logs acl_bearer

View file

@ -1,48 +1,47 @@
*** Settings ***
Variables ../../../variables/common.py
Library Collections
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_acl_bearer.robot
*** Test cases ***
BearerToken Operations
[Documentation] Testcase to validate NeoFS operations with BearerToken.
[Tags] ACL NeoFS NeoCLI BearerToken
[Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys
Prepare eACL Role rules
Log Check Bearer token with simple object
Generate file ${SIMPLE_OBJ_SIZE}
Check eACL Allow All Bearer Filter Requst Equal Deny
Log Check Bearer token with complex object
Generate file ${COMPLEX_OBJ_SIZE}
Check eACL Allow All Bearer Filter Requst Equal Deny
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
Check eACL Allow All Bearer Filter Requst Equal Deny
${CID} = Create Container Public
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${EMPTY}
${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} ${EMPTY} ${FILE_USR_HEADER_DEL}
@{S_OBJ_H} = Create List ${S_OID_USER}
${filters}= Create Dictionary headerType=REQUEST matchType=STRING_EQUAL key=a value=256
${filters}= Create Dictionary headerType=REQUEST matchType=STRING_EQUAL key=a value=256
${rule1}= Create Dictionary Operation=GET Access=DENY Role=USER Filters=${filters}
${rule2}= Create Dictionary Operation=HEAD Access=DENY Role=USER Filters=${filters}
${rule3}= Create Dictionary Operation=PUT Access=DENY Role=USER Filters=${filters}
@ -51,16 +50,16 @@ Check eACL Allow All Bearer Filter Requst Equal Deny
${rule6}= Create Dictionary Operation=GETRANGE Access=DENY Role=USER Filters=${filters}
${rule7}= Create Dictionary Operation=GETRANGEHASH Access=DENY Role=USER Filters=${filters}
${eACL_gen}= Create List ${rule1} ${rule2} ${rule3} ${rule4} ${rule5} ${rule6} ${rule7}
Form BearerToken file ${USER_KEY} ${CID} bearer_allow_all_user ${eACL_gen} 100500
Form BearerToken file ${USER_KEY} ${CID} bearer_allow_all_user ${eACL_gen} 100500
Put object ${USER_KEY} ${FILE_S} ${CID} bearer_allow_all_user ${FILE_OTH_HEADER} ${EMPTY} --xhdr a=2
Get object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user local_file_eacl ${EMPTY} --xhdr a=2
Search object ${USER_KEY} ${CID} ${EMPTY} bearer_allow_all_user ${FILE_USR_HEADER} ${S_OBJ_H} --xhdr a=2
Search object ${USER_KEY} ${CID} ${EMPTY} bearer_allow_all_user ${FILE_USR_HEADER} ${S_OBJ_H} --xhdr a=2
Head object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user ${EMPTY} --xhdr a=2
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range bearer_allow_all_user 0:256 --xhdr a=2
Get Range Hash ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user 0:256 --xhdr a=2
Delete object ${USER_KEY} ${CID} ${D_OID_USER} bearer_allow_all_user --xhdr a=2
Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${CID} bearer_allow_all_user ${FILE_USR_HEADER} ${EMPTY} --xhdr a=256
Run Keyword And Expect Error *
@ -79,4 +78,4 @@ Check eACL Allow All Bearer Filter Requst Equal Deny
Cleanup
Cleanup Files
Get Docker Logs acl_bearer
Get Docker Logs acl_bearer

View file

@ -2,6 +2,7 @@
Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Library Collections
Resource common_steps_acl_bearer.robot
@ -13,35 +14,37 @@ BearerToken Operations with Filter Requst Equal
[Tags] ACL NeoFS NeoCLI BearerToken
[Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys
Prepare eACL Role rules
Log Check Bearer token with simple object
Generate file ${SIMPLE_OBJ_SIZE}
Check eACL Deny and Allow All Bearer Filter Requst Equal
Log Check Bearer token with complex object
Generate file ${COMPLEX_OBJ_SIZE}
Check eACL Deny and Allow All Bearer Filter Requst Equal
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
Check eACL Deny and Allow All Bearer Filter Requst Equal
${CID} = Create Container Public
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${EMPTY}
${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} ${EMPTY} ${FILE_USR_HEADER_DEL}
@{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} ${EMPTY} ${FILE_OTH_HEADER}
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}
Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Delete object ${USER_KEY} ${CID} ${D_OID_USER} ${EMPTY}
@ -50,7 +53,7 @@ Check eACL Deny and Allow All Bearer Filter Requst Equal
# The current ACL cache lifetime is 30 sec
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
${filters}= Create Dictionary headerType=REQUEST matchType=STRING_EQUAL key=a value=256
${filters}= Create Dictionary headerType=REQUEST matchType=STRING_EQUAL key=a value=256
${rule1}= Create Dictionary Operation=GET Access=ALLOW Role=USER Filters=${filters}
${rule2}= Create Dictionary Operation=HEAD Access=ALLOW Role=USER Filters=${filters}
${rule3}= Create Dictionary Operation=PUT Access=ALLOW Role=USER Filters=${filters}
@ -59,21 +62,21 @@ Check eACL Deny and Allow All Bearer Filter Requst Equal
${rule6}= Create Dictionary Operation=GETRANGE Access=ALLOW Role=USER Filters=${filters}
${rule7}= Create Dictionary Operation=GETRANGEHASH Access=ALLOW Role=USER Filters=${filters}
${eACL_gen}= Create List ${rule1} ${rule2} ${rule3} ${rule4} ${rule5} ${rule6} ${rule7}
Form BearerToken file ${USER_KEY} ${CID} bearer_allow_all_user ${eACL_gen} 100500
Form BearerToken file ${USER_KEY} ${CID} bearer_allow_all_user ${eACL_gen} 100500
Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
Run Keyword And Expect Error *
... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Run Keyword And Expect Error *
... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Run Keyword And Expect Error *
... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Run Keyword And Expect Error *
... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Run Keyword And Expect Error *
... Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Put object ${USER_KEY} ${FILE_S} ${CID} bearer_allow_all_user ${FILE_USR_HEADER} ${EMPTY} --xhdr a=256
Get object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user local_file_eacl ${EMPTY} --xhdr a=256
Search object ${USER_KEY} ${CID} ${EMPTY} bearer_allow_all_user ${FILE_USR_HEADER} ${EMPTY} --xhdr a=256
@ -85,4 +88,4 @@ Check eACL Deny and Allow All Bearer Filter Requst Equal
Cleanup
Cleanup Files
Get Docker Logs acl_bearer
Get Docker Logs acl_bearer

View file

@ -2,6 +2,7 @@
Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Library Collections
Resource common_steps_acl_bearer.robot
@ -13,34 +14,36 @@ BearerToken Operations with Filter Requst NotEqual
[Tags] ACL NeoFS NeoCLI BearerToken
[Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys
Prepare eACL Role rules
Log Check Bearer token with simple object
Generate file ${SIMPLE_OBJ_SIZE}
Check eACL Deny and Allow All Bearer Filter Requst NotEqual
Log Check Bearer token with complex object
Generate file ${COMPLEX_OBJ_SIZE}
Check eACL Deny and Allow All Bearer Filter Requst NotEqual
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
Check eACL Deny and Allow All Bearer Filter Requst NotEqual
${CID} = Create Container Public
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${S_OID_USER_2} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${EMPTY}
${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} ${EMPTY} ${FILE_USR_HEADER_DEL}
@{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} ${EMPTY} ${FILE_OTH_HEADER}
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}
Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Delete object ${USER_KEY} ${CID} ${D_OID_USER} ${EMPTY}
@ -49,7 +52,7 @@ Check eACL Deny and Allow All Bearer Filter Requst NotEqual
# The current ACL cache lifetime is 30 sec
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
${filters}= Create Dictionary headerType=REQUEST matchType=STRING_NOT_EQUAL key=a value=256
${filters}= Create Dictionary headerType=REQUEST matchType=STRING_NOT_EQUAL key=a value=256
${rule1}= Create Dictionary Operation=GET Access=ALLOW Role=USER Filters=${filters}
${rule2}= Create Dictionary Operation=HEAD Access=ALLOW Role=USER Filters=${filters}
${rule3}= Create Dictionary Operation=PUT Access=ALLOW Role=USER Filters=${filters}
@ -58,21 +61,21 @@ Check eACL Deny and Allow All Bearer Filter Requst NotEqual
${rule6}= Create Dictionary Operation=GETRANGE Access=ALLOW Role=USER Filters=${filters}
${rule7}= Create Dictionary Operation=GETRANGEHASH Access=ALLOW Role=USER Filters=${filters}
${eACL_gen}= Create List ${rule1} ${rule2} ${rule3} ${rule4} ${rule5} ${rule6} ${rule7}
Form BearerToken file ${USER_KEY} ${CID} bearer_allow_all_user ${eACL_gen} 100500
Form BearerToken file ${USER_KEY} ${CID} bearer_allow_all_user ${eACL_gen} 100500
Run Keyword And Expect Error *
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
Run Keyword And Expect Error *
... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
#Run Keyword And Expect Error *
#... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Run Keyword And Expect Error *
... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Run Keyword And Expect Error *
... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Run Keyword And Expect Error *
... Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Put object ${USER_KEY} ${FILE_S} ${CID} bearer_allow_all_user ${FILE_USR_HEADER} ${EMPTY} --xhdr a=2
Get object ${USER_KEY} ${CID} ${S_OID_USER} bearer_allow_all_user local_file_eacl ${EMPTY} --xhdr a=2
Search object ${USER_KEY} ${CID} ${EMPTY} bearer_allow_all_user ${FILE_USR_HEADER} ${EMPTY} --xhdr a=2
@ -84,4 +87,4 @@ Check eACL Deny and Allow All Bearer Filter Requst NotEqual
Cleanup
Cleanup Files
Get Docker Logs acl_bearer
Get Docker Logs acl_bearer

View file

@ -3,15 +3,18 @@ Variables ../../../variables/common.py
Library Collections
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_acl_extended.robot
*** Test cases ***
Extended ACL Operations
[Documentation] Testcase to validate NeoFS operations with extended ACL with Other group key.
[Tags] ACL eACL NeoFS NeoCLI
[Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys
Prepare eACL Role rules
@ -22,16 +25,16 @@ Extended ACL Operations
Log Check extended ACL with complex object
Generate files ${COMPLEX_OBJ_SIZE}
Check eACL Deny and Allow All Other
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
Check eACL Deny and Allow All Other
Check eACL Deny and Allow All ${OTHER_KEY} ${EACL_DENY_ALL_OTHER} ${EACL_ALLOW_ALL_OTHER}
Check eACL Deny and Allow All ${OTHER_KEY} ${EACL_DENY_ALL_OTHER} ${EACL_ALLOW_ALL_OTHER}
Cleanup
Cleanup Files
Cleanup Files
Get Docker Logs acl_extended

View file

@ -3,15 +3,18 @@ Variables ../../../variables/common.py
Library Collections
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_acl_extended.robot
*** Test cases ***
Extended ACL Operations
[Documentation] Testcase to validate NeoFS operations with extended ACL.
[Tags] ACL eACL NeoFS NeoCLI
[Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys
Prepare eACL Role rules
@ -22,24 +25,24 @@ Extended ACL Operations
Log Check extended ACL with complex object
Generate files ${COMPLEX_OBJ_SIZE}
Check eACL Deny All Other and Allow All Pubkey
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
Check eACL Deny All Other and Allow All Pubkey
${CID} = Create Container Public
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL}
@{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} ${EMPTY} ${FILE_OTH_HEADER}
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}
Head object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Search object ${EACL_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Head object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY}
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
Delete object ${EACL_KEY} ${CID} ${D_OID_USER} ${EMPTY}
@ -52,13 +55,13 @@ Check eACL Deny All Other and Allow All Pubkey
Get eACL ${USER_KEY} ${CID}
Run Keyword And Expect Error *
... Put object ${OTHER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
... Put object ${OTHER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
Run Keyword And Expect Error *
... Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
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} ${FILE_USR_HEADER} ${S_OBJ_H}
Run Keyword And Expect Error *
... Head object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
... Head object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Run Keyword And Expect Error *
... Get Range ${OTHER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Run Keyword And Expect Error *
@ -66,15 +69,15 @@ Check eACL Deny All Other and Allow All Pubkey
Run Keyword And Expect Error *
... Delete object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Put object ${EACL_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
Put object ${EACL_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
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}
Head object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Head object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY}
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
Delete object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Cleanup
Cleanup Files
Cleanup Files
Get Docker Logs acl_extended

View file

@ -3,15 +3,18 @@ Variables ../../../variables/common.py
Library Collections
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_acl_extended.robot
*** Test cases ***
Extended ACL Operations
[Documentation] Testcase to validate NeoFS operations with extended ACL.
[Tags] ACL eACL NeoFS NeoCLI
[Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys
Prepare eACL Role rules
@ -22,39 +25,39 @@ Extended ACL Operations
Log Check extended ACL with complex object
Generate files ${COMPLEX_OBJ_SIZE}
Check eACL Deny and Allow All System
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
Check eACL Deny and Allow All System
${CID} = Create Container Public
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${D_OID_USER_S} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL}
${D_OID_USER_SN} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${D_OID_USER_S} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL}
${D_OID_USER_SN} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL}
@{S_OBJ_H} = Create List ${S_OID_USER}
Put object ${SYSTEM_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
Put object ${SYSTEM_KEY_SN} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
Put object ${SYSTEM_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
Put object ${SYSTEM_KEY_SN} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
Get object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Get object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Search object ${SYSTEM_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Search object ${SYSTEM_KEY_SN} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Search object ${SYSTEM_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Search object ${SYSTEM_KEY_SN} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Head object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Head object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY}
Head object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Head object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY}
Get Range ${SYSTEM_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Get Range ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Get Range Hash ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256
Get Range Hash ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} 0:256
Delete object ${SYSTEM_KEY} ${CID} ${D_OID_USER_S} ${EMPTY}
Delete object ${SYSTEM_KEY_SN} ${CID} ${D_OID_USER_SN} ${EMPTY}
@ -64,37 +67,37 @@ Check eACL Deny and Allow All System
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
Run Keyword And Expect Error *
... Put object ${SYSTEM_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
... Put object ${SYSTEM_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
Run Keyword And Expect Error *
... Put object ${SYSTEM_KEY_SN} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
... Put object ${SYSTEM_KEY_SN} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
Run Keyword And Expect Error *
... Get object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Run Keyword And Expect Error *
... Get object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Run Keyword And Expect Error *
... Search object ${SYSTEM_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Run Keyword And Expect Error *
... Search object ${SYSTEM_KEY_SN} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Run Keyword And Expect Error *
... Search object ${SYSTEM_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Run Keyword And Expect Error *
... Search object ${SYSTEM_KEY_SN} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Run Keyword And Expect Error *
... Head object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY}
... Head object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Run Keyword And Expect Error *
... Head object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY}
... Head object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY}
Run Keyword And Expect Error *
... Get Range ${SYSTEM_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Run Keyword And Expect Error *
... Get Range ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Run Keyword And Expect Error *
... Get Range Hash ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256
Run Keyword And Expect Error *
... Get Range Hash ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} 0:256
Run Keyword And Expect Error *
... Delete object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY}
@ -107,21 +110,21 @@ Check eACL Deny and Allow All System
# The current ACL cache lifetime is 30 sec
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
${D_OID_USER_S} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL}
${D_OID_USER_SN} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL}
${D_OID_USER_S} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL}
${D_OID_USER_SN} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL}
Put object ${SYSTEM_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
Put object ${SYSTEM_KEY_SN} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
Put object ${SYSTEM_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
Put object ${SYSTEM_KEY_SN} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
Get object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Get object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Search object ${SYSTEM_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Search object ${SYSTEM_KEY_SN} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Head object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Head object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY}
Search object ${SYSTEM_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Search object ${SYSTEM_KEY_SN} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Head object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Head object ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY}
Get Range ${SYSTEM_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Get Range ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
@ -134,5 +137,5 @@ Check eACL Deny and Allow All System
Cleanup
Cleanup Files
Cleanup Files
Get Docker Logs acl_extended

View file

@ -3,35 +3,38 @@ Variables ../../../variables/common.py
Library Collections
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_acl_extended.robot
*** Test cases ***
Extended ACL Operations
[Documentation] Testcase to validate NeoFS operations with extended ACL.
[Tags] ACL eACL NeoFS NeoCLI
[Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys
Prepare eACL Role rules
Log Check extended ACL with simple object
Generate files ${SIMPLE_OBJ_SIZE}
Check eACL Deny and Allow All User
Log Check extended ACL with complex object
Generate files ${COMPLEX_OBJ_SIZE}
Check eACL Deny and Allow All User
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
Check eACL Deny and Allow All User
Check eACL Deny and Allow All ${USER_KEY} ${EACL_DENY_ALL_USER} ${EACL_ALLOW_ALL_USER}
Check eACL Deny and Allow All ${USER_KEY} ${EACL_DENY_ALL_USER} ${EACL_ALLOW_ALL_USER}
Cleanup
Cleanup Files
Cleanup Files
Get Docker Logs acl_extended

View file

@ -3,6 +3,7 @@ Variables ../../../variables/common.py
Library Collections
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_acl_extended.robot
@ -13,95 +14,97 @@ Extended ACL Operations
[Tags] ACL eACL NeoFS NeoCLI
[Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys
Prepare eACL Role rules
Log Check extended ACL with simple object
Generate files ${SIMPLE_OBJ_SIZE}
Check Сompound Operations
Check Сompound Operations
Log Check extended ACL with complex object
Generate files ${COMPLEX_OBJ_SIZE}
Check Сompound Operations
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
Check Сompound Operations
Check eACL Сompound Get ${OTHER_KEY} ${EACL_COMPOUND_GET_OTHERS}
Check eACL Сompound Get ${USER_KEY} ${EACL_COMPOUND_GET_USER}
Check eACL Сompound Get ${SYSTEM_KEY} ${EACL_COMPOUND_GET_SYSTEM}
Check eACL Сompound Delete ${OTHER_KEY} ${EACL_COMPOUND_DELETE_OTHERS}
Check eACL Сompound Delete ${USER_KEY} ${EACL_COMPOUND_DELETE_USER}
Check eACL Сompound Delete ${SYSTEM_KEY} ${EACL_COMPOUND_DELETE_SYSTEM}
Check Сompound Operations
Check eACL Сompound Get ${OTHER_KEY} ${EACL_COMPOUND_GET_OTHERS}
Check eACL Сompound Get ${USER_KEY} ${EACL_COMPOUND_GET_USER}
Check eACL Сompound Get ${SYSTEM_KEY} ${EACL_COMPOUND_GET_SYSTEM}
Check eACL Сompound Get Range Hash ${OTHER_KEY} ${EACL_COMPOUND_GET_HASH_OTHERS}
Check eACL Сompound Get Range Hash ${USER_KEY} ${EACL_COMPOUND_GET_HASH_USER}
Check eACL Сompound Get Range Hash ${SYSTEM_KEY} ${EACL_COMPOUND_GET_HASH_SYSTEM}
Check eACL Сompound Delete ${OTHER_KEY} ${EACL_COMPOUND_DELETE_OTHERS}
Check eACL Сompound Delete ${USER_KEY} ${EACL_COMPOUND_DELETE_USER}
Check eACL Сompound Delete ${SYSTEM_KEY} ${EACL_COMPOUND_DELETE_SYSTEM}
Check eACL Сompound Get Range Hash ${OTHER_KEY} ${EACL_COMPOUND_GET_HASH_OTHERS}
Check eACL Сompound Get Range Hash ${USER_KEY} ${EACL_COMPOUND_GET_HASH_USER}
Check eACL Сompound Get Range Hash ${SYSTEM_KEY} ${EACL_COMPOUND_GET_HASH_SYSTEM}
Check eACL Сompound Get
[Arguments] ${KEY} ${DENY_EACL}
[Arguments] ${KEY} ${DENY_EACL}
${CID} = Create Container Public
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Set eACL ${USER_KEY} ${CID} ${DENY_EACL} --await
# The current ACL cache lifetime is 30 sec
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
Run Keyword And Expect Error *
... Head object ${KEY} ${CID} ${S_OID_USER} ${EMPTY}
... Head object ${KEY} ${CID} ${S_OID_USER} ${EMPTY}
Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Get Range ${KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Get Range Hash ${KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256
Check eACL Сompound Delete
[Arguments] ${KEY} ${DENY_EACL}
[Arguments] ${KEY} ${DENY_EACL}
${CID} = Create Container Public
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${EMPTY}
Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
Delete object ${KEY} ${CID} ${D_OID_USER} ${EMPTY}
Set eACL ${USER_KEY} ${CID} ${DENY_EACL} --await
# The current ACL cache lifetime is 30 sec
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
Run Keyword And Expect Error *
... Head object ${KEY} ${CID} ${S_OID_USER} ${EMPTY}
... Head object ${KEY} ${CID} ${S_OID_USER} ${EMPTY}
Run Keyword And Expect Error *
... Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
... Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
Delete object ${KEY} ${CID} ${S_OID_USER} ${EMPTY}
Check eACL Сompound Get Range Hash
[Arguments] ${KEY} ${DENY_EACL}
[Arguments] ${KEY} ${DENY_EACL}
${CID} = Create Container Public
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
Get Range Hash ${SYSTEM_KEY_SN} ${CID} ${S_OID_USER} ${EMPTY} 0:256
Set eACL ${USER_KEY} ${CID} ${DENY_EACL} --await
# The current ACL cache lifetime is 30 sec
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
@ -109,10 +112,10 @@ Check eACL Сompound Get Range Hash
... Get Range ${KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
Run Keyword And Expect Error *
... Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Get Range Hash ${KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256
Cleanup
Cleanup Files

View file

@ -3,6 +3,7 @@ Variables ../../../variables/common.py
Library Collections
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_acl_extended.robot
@ -12,6 +13,8 @@ Extended ACL Operations
[Tags] ACL eACL NeoFS NeoCLI
[Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys
Prepare eACL Role rules
@ -19,34 +22,31 @@ Extended ACL Operations
Generate files ${SIMPLE_OBJ_SIZE}
Check Filters
Log Check extended ACL with complex object
Generate files ${COMPLEX_OBJ_SIZE}
Check Filters
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
Check Filters
Check eACL MatchType String Equal Object
Check eACL MatchType String Not Equal Object
Check eACL MatchType String Equal Request Deny
Check eACL MatchType String Equal Request Allow
Check eACL MatchType String Equal Request Deny
${CID} = Create Container Public
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${HEADER} = Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
&{HEADER_DICT} = Parse Object System Header ${HEADER}
${HEADER} = Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
&{HEADER_DICT} = Parse Object System Header ${HEADER}
Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
${ID_value} = Get From Dictionary ${HEADER_DICT} ID
${ID_value} = Get From Dictionary ${HEADER_DICT} ID
Set eACL ${USER_KEY} ${CID} ${EACL_XHEADER_DENY_ALL} --await
@ -62,9 +62,9 @@ Check eACL MatchType String Equal Request Deny
Run Keyword And Expect Error *
... Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl ${EMPTY} --xhdr a=2
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} ${FILE_USR_HEADER} ${EMPTY} --xhdr a=2
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} ${EMPTY} ${EMPTY} --xhdr a=2
Run Keyword And Expect Error *
... Get Range ${OTHER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256 --xhdr a="2"
Run Keyword And Expect Error *
@ -81,41 +81,40 @@ Check eACL MatchType String Equal Request Deny
Delete object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} --xhdr a=22
Check eACL MatchType String Equal Request Allow
${CID} = Create Container Public
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${HEADER} = Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
&{HEADER_DICT} = Parse Object System Header ${HEADER}
${HEADER} = Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
&{HEADER_DICT} = Parse Object System Header ${HEADER}
Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
${ID_value} = Get From Dictionary ${HEADER_DICT} ID
${ID_value} = Get From Dictionary ${HEADER_DICT} ID
Set eACL ${USER_KEY} ${CID} ${EACL_XHEADER_ALLOW_ALL} --await
# The current ACL cache lifetime is 30 sec
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
Get eACL ${USER_KEY} ${CID}
Run Keyword And Expect Error *
... Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl ${EMPTY}
... Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl ${EMPTY}
Run Keyword And Expect Error *
... Put object ${OTHER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} ${EMPTY}
... Put object ${OTHER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} ${EMPTY}
Run Keyword And Expect Error *
... Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl ${EMPTY}
... Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl ${EMPTY}
Run Keyword And Expect Error *
... Search object ${OTHER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${EMPTY}
... Search object ${OTHER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${EMPTY}
Run Keyword And Expect Error *
... Head object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${EMPTY}
... Head object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} ${EMPTY}
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 *
... 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 *
... Delete object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
... Delete object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Put object ${OTHER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER} ${EMPTY} --xhdr a=2
Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl ${EMPTY} --xhdr a=2
@ -128,79 +127,79 @@ Check eACL MatchType String Equal Request Allow
Check eACL MatchType String Equal Object
${CID} = Create Container Public
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${HEADER} = Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
&{HEADER_DICT} = Parse Object System Header ${HEADER}
${HEADER} = Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
&{HEADER_DICT} = Parse Object System Header ${HEADER}
Get object ${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 ${HEADER_DICT} ID
${ID_value} = Get From Dictionary ${HEADER_DICT} ID
${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}
${eACL_gen} = Create List ${rule1}
${EACL_CUSTOM} = Form eACL json common file eacl_custom ${eACL_gen}
Set eACL ${USER_KEY} ${CID} ${EACL_CUSTOM} --await
Run Keyword And Expect Error *
... Get object ${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 ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_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}
${filters} = Create Dictionary headerType=OBJECT matchType=STRING_EQUAL key=key1 value=1
${rule1} = Create Dictionary Operation=GET Access=DENY Role=OTHERS Filters=${filters}
${eACL_gen} = Create List ${rule1}
${EACL_CUSTOM} = Form eACL json common file eacl_custom ${eACL_gen}
Set eACL ${USER_KEY} ${CID} ${EACL_CUSTOM} --await
Set eACL ${USER_KEY} ${CID} ${EACL_CUSTOM} --await
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_OTH} ${EMPTY} local_file_eacl
Check eACL MatchType String Not Equal Object
${CID} = Create Container Public
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${S_OID_OTHER} = Put object ${OTHER_KEY} ${FILE_S_2} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
${HEADER} = Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Head object ${USER_KEY} ${CID} ${S_OID_OTHER} ${EMPTY}
&{HEADER_DICT} = Parse Object System Header ${HEADER}
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${S_OID_OTHER} = Put object ${OTHER_KEY} ${FILE_S_2} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
${HEADER} = Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
Head object ${USER_KEY} ${CID} ${S_OID_OTHER} ${EMPTY}
&{HEADER_DICT} = Parse Object System Header ${HEADER}
Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Get object ${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 ${HEADER_DICT} ID
${ID_value} = Get From Dictionary ${HEADER_DICT} ID
${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}
${eACL_gen} = Create List ${rule1}
${EACL_CUSTOM} = Form eACL json common file eacl_custom ${eACL_gen}
Set eACL ${USER_KEY} ${CID} ${EACL_CUSTOM} --await
Run Keyword And Expect Error *
... Get object ${OTHER_KEY} ${CID} ${S_OID_OTHER} ${EMPTY} local_file_eacl
Get object ${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 ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_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}
${filters} = Create Dictionary headerType=OBJECT matchType=STRING_NOT_EQUAL key=key1 value=1
${rule1} = Create Dictionary Operation=GET Access=DENY Role=OTHERS Filters=${filters}
${eACL_gen} = Create List ${rule1}
${EACL_CUSTOM} = Form eACL json common file eacl_custom ${eACL_gen}
Set eACL ${USER_KEY} ${CID} ${EACL_CUSTOM} --await
${EACL_CUSTOM} = Form eACL json common file eacl_custom ${eACL_gen}
Set eACL ${USER_KEY} ${CID} ${EACL_CUSTOM} --await
Run Keyword And Expect Error *
... Get object ${OTHER_KEY} ${CID} ${S_OID_USER_OTH} ${EMPTY} local_file_eacl
Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl

View file

@ -3,7 +3,8 @@ Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
*** Test cases ***
NeoFS Simple Netmap
@ -11,6 +12,8 @@ NeoFS Simple Netmap
[Tags] Netmap NeoFS NeoCLI
[Timeout] 20 min
[Setup] Create Temporary Directory
Generate Key and Pre-payment
Generate file
@ -30,37 +33,37 @@ NeoFS Simple Netmap
Validate Policy REP 2 IN X CBF 1 SELECT 4 FROM * AS X 2 @{EMPTY}
@{EXPECTED} = Create List s01.neofs.devenv:8080 s02.neofs.devenv:8080 s03.neofs.devenv:8080 s04.neofs.devenv:8080
Validate Policy REP 4 IN X CBF 1 SELECT 4 FROM * AS X 4 @{EXPECTED}
Validate Policy REP 4 IN X CBF 1 SELECT 4 FROM * AS X 4 @{EXPECTED}
@{EXPECTED} = Create List s03.neofs.devenv:8080
Validate Policy REP 1 IN LOC_PLACE CBF 1 SELECT 1 FROM LOC_SW AS LOC_PLACE FILTER Country EQ Sweden AS LOC_SW 1 @{EXPECTED}
Validate Policy REP 1 IN LOC_PLACE CBF 1 SELECT 1 FROM LOC_SW AS LOC_PLACE FILTER Country EQ Sweden AS LOC_SW 1 @{EXPECTED}
@{EXPECTED} = Create List s02.neofs.devenv:8080
Validate Policy REP 1 CBF 1 SELECT 1 FROM LOC_SPB FILTER Location EQ 'Saint Petersburg (ex Leningrad)' AS LOC_SPB 1 @{EXPECTED}
Validate Policy REP 1 CBF 1 SELECT 1 FROM LOC_SPB FILTER Location EQ 'Saint Petersburg (ex Leningrad)' AS LOC_SPB 1 @{EXPECTED}
@{EXPECTED} = Create List s01.neofs.devenv:8080 s02.neofs.devenv:8080
Validate Policy REP 1 IN LOC_SPB_PLACE REP 1 IN LOC_MSK_PLACE CBF 1 SELECT 1 FROM LOC_SPB AS LOC_SPB_PLACE SELECT 1 FROM LOC_MSK AS LOC_MSK_PLACE FILTER Location EQ 'Saint Petersburg (ex Leningrad)' AS LOC_SPB FILTER Location EQ 'Moskva' AS LOC_MSK 2 @{EXPECTED}
Validate Policy REP 1 IN LOC_SPB_PLACE REP 1 IN LOC_MSK_PLACE CBF 1 SELECT 1 FROM LOC_SPB AS LOC_SPB_PLACE SELECT 1 FROM LOC_MSK AS LOC_MSK_PLACE FILTER Location EQ 'Saint Petersburg (ex Leningrad)' AS LOC_SPB FILTER Location EQ 'Moskva' AS LOC_MSK 2 @{EXPECTED}
@{EXPECTED} = Create List s01.neofs.devenv:8080 s02.neofs.devenv:8080 s03.neofs.devenv:8080 s04.neofs.devenv:8080
Validate Policy REP 4 CBF 1 SELECT 4 FROM LOC_EU FILTER Continent EQ Europe AS LOC_EU 4 @{EXPECTED}
Validate Policy REP 4 CBF 1 SELECT 4 FROM LOC_EU FILTER Continent EQ Europe AS LOC_EU 4 @{EXPECTED}
@{EXPECTED} = Create List s02.neofs.devenv:8080
Validate Policy REP 1 CBF 1 SELECT 1 FROM LOC_SPB FILTER Location NE 'Moskva' AND Location NE 'Stockholm' AND Location NE 'Helsinki (Helsingfors)' AS LOC_SPB 1 @{EXPECTED}
Validate Policy REP 1 CBF 1 SELECT 1 FROM LOC_SPB FILTER Location NE 'Moskva' AND Location NE 'Stockholm' AND Location NE 'Helsinki (Helsingfors)' AS LOC_SPB 1 @{EXPECTED}
@{EXPECTED} = Create List s01.neofs.devenv:8080 s02.neofs.devenv:8080
Validate Policy REP 2 CBF 1 SELECT 2 FROM LOC_RU FILTER SubDivCode NE 'AB' AND SubDivCode NE '18' AS LOC_RU 2 @{EXPECTED}
Validate Policy REP 2 CBF 1 SELECT 2 FROM LOC_RU FILTER SubDivCode NE 'AB' AND SubDivCode NE '18' AS LOC_RU 2 @{EXPECTED}
@{EXPECTED} = Create List s01.neofs.devenv:8080 s02.neofs.devenv:8080
Validate Policy REP 2 CBF 1 SELECT 2 FROM LOC_RU FILTER Country EQ 'Russia' AS LOC_RU 2 @{EXPECTED}
Validate Policy REP 2 CBF 1 SELECT 2 FROM LOC_RU FILTER Country EQ 'Russia' AS LOC_RU 2 @{EXPECTED}
@{EXPECTED} = Create List s03.neofs.devenv:8080 s04.neofs.devenv:8080
Validate Policy REP 2 CBF 1 SELECT 2 FROM LOC_EU FILTER Country NE 'Russia' AS LOC_EU 2 @{EXPECTED}
Validate Policy REP 2 CBF 1 SELECT 2 FROM LOC_EU FILTER Country NE 'Russia' AS LOC_EU 2 @{EXPECTED}
Log Put operation should be failed with error "not enough nodes to SELECT from: 'X'"
Run Keyword And Expect Error *
... Validate Policy REP 2 IN X CBF 2 SELECT 6 FROM * AS X 2 @{EMPTY}
... Validate Policy REP 2 IN X CBF 2 SELECT 6 FROM * AS X 2 @{EMPTY}
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
@ -68,23 +71,23 @@ NeoFS Simple Netmap
Generate file
${FILE} = Generate file of bytes ${SIMPLE_OBJ_SIZE}
Set Global Variable ${FILE} ${FILE}
Generate Key and Pre-payment
${WALLET} = Init wallet
Generate wallet ${WALLET}
${ADDR} = Dump Address ${WALLET}
${USER_KEY_GEN} = Dump PrivKey ${WALLET} ${ADDR}
${USER_KEY_GEN} = Dump PrivKey ${WALLET} ${ADDR}
Set Global Variable ${PRIV_KEY} ${USER_KEY_GEN}
Payment Operations ${WALLET} ${ADDR} ${PRIV_KEY}
Payment Operations ${WALLET} ${ADDR} ${PRIV_KEY}
Payment Operations
[Arguments] ${WALLET} ${ADDR} ${KEY}
${TX} = Transfer Mainnet Gas wallets/wallet.json ${DEF_WALLET_ADDR} ${ADDR} 11
Wait Until Keyword Succeeds 1 min 15 sec
Wait Until Keyword Succeeds 1 min 15 sec
... Transaction accepted in block ${TX}
Get Transaction ${TX}
Expected Mainnet Balance ${ADDR} 11
@ -92,22 +95,22 @@ Payment Operations
${SCRIPT_HASH} = Get ScriptHash ${KEY}
${TX_DEPOSIT} = NeoFS Deposit ${WALLET} ${ADDR} ${SCRIPT_HASH} 10
Wait Until Keyword Succeeds 1 min 15 sec
Wait Until Keyword Succeeds 1 min 15 sec
... Transaction accepted in block ${TX_DEPOSIT}
Get Transaction ${TX_DEPOSIT}
Validate Policy
[Arguments] ${POLICY} ${EXPECTED_VAL} @{EXPECTED_LIST}
Log Container with rule ${POLICY}
${CID} = Create container ${PRIV_KEY} ${EMPTY} ${POLICY}
Container Existing ${PRIV_KEY} ${CID}
${S_OID} = Put object ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} ${EMPTY}
${CID} = Create container ${PRIV_KEY} ${EMPTY} ${POLICY}
Container Existing ${PRIV_KEY} ${CID}
${S_OID} = Put object ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} ${EMPTY}
Validate storage policy for object ${PRIV_KEY} ${EXPECTED_VAL} ${CID} ${S_OID} @{EXPECTED_LIST}
Get object ${PRIV_KEY} ${CID} ${S_OID} ${EMPTY} s_file_read
Get object ${PRIV_KEY} ${CID} ${S_OID} ${EMPTY} s_file_read
Cleanup
Cleanup Files
Get Docker Logs netmap_simple
Cleanup Files
Get Docker Logs netmap_simple

View file

@ -3,6 +3,7 @@ Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
*** Test cases ***
NeoFS Object Replication
@ -10,13 +11,15 @@ NeoFS Object Replication
[Tags] Migration Replication NeoFS NeoCLI
[Timeout] 25 min
[Setup] Create Temporary Directory
${WALLET} = Init wallet
Generate wallet ${WALLET}
${ADDR} = Dump Address ${WALLET}
${PRIV_KEY} = Dump PrivKey ${WALLET} ${ADDR}
${TX} = Transfer Mainnet Gas wallets/wallet.json ${DEF_WALLET_ADDR} ${ADDR} 11
Wait Until Keyword Succeeds 1 min 15 sec
Wait Until Keyword Succeeds 1 min 15 sec
... Transaction accepted in block ${TX}
Get Transaction ${TX}
Expected Mainnet Balance ${ADDR} 11
@ -24,7 +27,7 @@ NeoFS Object Replication
${SCRIPT_HASH} = Get ScriptHash ${PRIV_KEY}
${TX_DEPOSIT} = NeoFS Deposit ${WALLET} ${ADDR} ${SCRIPT_HASH} 10
Wait Until Keyword Succeeds 1 min 15 sec
Wait Until Keyword Succeeds 1 min 15 sec
... Transaction accepted in block ${TX_DEPOSIT}
Get Transaction ${TX_DEPOSIT}
@ -35,19 +38,19 @@ NeoFS Object Replication
${FILE} = Generate file of bytes ${SIMPLE_OBJ_SIZE}
${FILE_HASH} = Get file hash ${FILE}
${S_OID} = Put object ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} ${EMPTY}
Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${S_OID}
@{NODES_OBJ} = Get nodes with object ${PRIV_KEY} ${CID} ${S_OID}
${S_OID} = Put object ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} ${EMPTY}
Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${S_OID}
@{NODES_OBJ} = Get nodes with object ${PRIV_KEY} ${CID} ${S_OID}
${NODES_LOG_TIME} = Get Nodes Log Latest Timestamp
@{NODES_OBJ_STOPPED} = Stop nodes 1 @{NODES_OBJ}
${state} ${output}= Run Keyword And Ignore Error
... Wait Until Keyword Succeeds 10 min 2 min
... Wait Until Keyword Succeeds 10 min 2 min
... Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${S_OID}
Run Keyword If '${state}'!='PASS' Log Warning: Keyword failed: Validate storage policy for object ${S_OID} {\n}${output} WARN
Find in Nodes Log object successfully replicated ${NODES_LOG_TIME}
@ -59,14 +62,14 @@ NeoFS Object Replication
Sleep ${NEOFS_EPOCH_TIMEOUT}
Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${S_OID}
[Teardown] Cleanup
*** Keywords ***
Cleanup
Cleanup Files
Cleanup Files
Get Docker Logs replication

View file

@ -3,8 +3,9 @@ Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_object.robot
*** Test cases ***
NeoFS Complex Object Operations
@ -12,33 +13,35 @@ NeoFS Complex Object Operations
[Tags] Object NeoFS NeoCLI
[Timeout] 20 min
[Setup] Create Temporary Directory
Payment operations
Prepare container
${FILE} = Generate file of bytes ${COMPLEX_OBJ_SIZE}
${FILE_HASH} = Get file hash ${FILE}
${S_OID} = Put object ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} ${EMPTY}
${H_OID} = Put object ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${H_OID_OTH} = Put object ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} ${FILE_USR_HEADER_OTH}
${S_OID} = Put object ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} ${EMPTY}
${H_OID} = Put object ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${H_OID_OTH} = Put object ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} ${FILE_USR_HEADER_OTH}
Should Be True '${S_OID}'!='${H_OID}' and '${H_OID}'!='${H_OID_OTH}'
Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${S_OID}
Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${H_OID}
Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${H_OID_OTH}
Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${S_OID}
Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${H_OID}
Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${H_OID_OTH}
@{S_OBJ_ALL} = Create List ${S_OID} ${H_OID} ${H_OID_OTH}
@{S_OBJ_ALL} = Create List ${S_OID} ${H_OID} ${H_OID_OTH}
@{S_OBJ_H} = Create List ${H_OID}
@{S_OBJ_H_OTH} = Create List ${H_OID_OTH}
Search object ${PRIV_KEY} ${CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_ALL}
Search object ${PRIV_KEY} ${CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_ALL}
${GET_OBJ_S} = Get object ${PRIV_KEY} ${CID} ${S_OID} ${EMPTY} s_file_read
${GET_OBJ_H} = Get object ${PRIV_KEY} ${CID} ${H_OID} ${EMPTY} h_file_read
Verify file hash ${GET_OBJ_S} ${FILE_HASH}
Verify file hash ${GET_OBJ_H} ${FILE_HASH}
Verify file hash ${GET_OBJ_S} ${FILE_HASH}
Verify file hash ${GET_OBJ_H} ${FILE_HASH}
Get Range Hash ${PRIV_KEY} ${CID} ${S_OID} ${EMPTY} 0:10
Get Range Hash ${PRIV_KEY} ${CID} ${H_OID} ${EMPTY} 0:10
@ -46,13 +49,13 @@ NeoFS Complex Object Operations
Get Range ${PRIV_KEY} ${CID} ${S_OID} s_get_range ${EMPTY} 0:10
Get Range ${PRIV_KEY} ${CID} ${H_OID} h_get_range ${EMPTY} 0:10
Search object ${PRIV_KEY} ${CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_ALL}
Search object ${PRIV_KEY} ${CID} --root ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Search object ${PRIV_KEY} ${CID} --root ${EMPTY} ${FILE_USR_HEADER_OTH} ${S_OBJ_H_OTH}
Head object ${PRIV_KEY} ${CID} ${S_OID} ${EMPTY}
Search object ${PRIV_KEY} ${CID} --root ${EMPTY} ${EMPTY} ${S_OBJ_ALL}
Search object ${PRIV_KEY} ${CID} --root ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Search object ${PRIV_KEY} ${CID} --root ${EMPTY} ${FILE_USR_HEADER_OTH} ${S_OBJ_H_OTH}
Head object ${PRIV_KEY} ${CID} ${S_OID} ${EMPTY}
Head object ${PRIV_KEY} ${CID} ${H_OID} ${EMPTY} ${FILE_USR_HEADER}
Verify Split Chain ${PRIV_KEY} ${CID} ${S_OID}
Verify Split Chain ${PRIV_KEY} ${CID} ${H_OID}
@ -63,13 +66,13 @@ NeoFS Complex Object Operations
Verify Head tombstone ${PRIV_KEY} ${CID} ${TOMBSTONE_H} ${H_OID} ${ADDR}
Sleep 2min
Run Keyword And Expect Error *
Run Keyword And Expect Error *
... Get object ${PRIV_KEY} ${CID} ${S_OID} ${EMPTY} ${GET_OBJ_S}
Run Keyword And Expect Error *
Run Keyword And Expect Error *
... Get object ${PRIV_KEY} ${CID} ${H_OID} ${EMPTY} ${GET_OBJ_H}
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
@ -77,7 +80,7 @@ NeoFS Complex Object Operations
Cleanup
Cleanup Files
Get Docker Logs object_complex

View file

@ -3,8 +3,9 @@ Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_object.robot
*** Test cases ***
NeoFS Simple Object Operations
@ -12,6 +13,8 @@ NeoFS Simple Object Operations
[Tags] Object NeoFS NeoCLI
[Timeout] 20 min
[Setup] Create Temporary Directory
Payment operations
Prepare container
@ -43,7 +46,7 @@ NeoFS Simple Object Operations
Run Keyword And Expect Error *
... Get object ${PRIV_KEY} ${CID} ${OID_CUR} ${EMPTY} file_read
# Check that correct object with expiration in the future is existed
Get object ${PRIV_KEY} ${CID} ${OID_NXT} ${EMPTY} file_read
Get object ${PRIV_KEY} ${CID} ${OID_PST} ${EMPTY} file_read_pst
@ -57,16 +60,16 @@ NeoFS Simple Object Operations
# Check that correct object with expiration in the distant future is existed
Get object ${PRIV_KEY} ${CID} ${OID_PST} ${EMPTY} file_read_pst
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
Cleanup
Cleanup Files
Cleanup Files
Get Docker Logs object_expiration

View file

@ -3,8 +3,9 @@ Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_object.robot
*** Test cases ***
NeoFS Simple Object Operations
@ -12,6 +13,8 @@ NeoFS Simple Object Operations
[Tags] Object NeoFS NeoCLI
[Timeout] 10 min
[Setup] Create Temporary Directory
Payment operations
Prepare container
@ -19,13 +22,13 @@ NeoFS Simple Object Operations
${FILE_HASH} = Get file hash ${FILE}
${S_OID} = Put object ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} ${EMPTY}
${H_OID} = Put object ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${S_OID} = Put object ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} ${EMPTY}
${H_OID} = Put object ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} ${FILE_USR_HEADER}
${H_OID_OTH} = Put object ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} ${FILE_USR_HEADER_OTH}
Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${S_OID}
Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${H_OID}
Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${H_OID_OTH}
Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${S_OID}
Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${H_OID}
Validate storage policy for object ${PRIV_KEY} 2 ${CID} ${H_OID_OTH}
@{S_OBJ_ALL} = Create List ${S_OID} ${H_OID} ${H_OID_OTH}
@{S_OBJ_H} = Create List ${H_OID}
@ -33,47 +36,47 @@ NeoFS Simple Object Operations
${GET_OBJ_S} = Get object ${PRIV_KEY} ${CID} ${S_OID} ${EMPTY} s_file_read
${GET_OBJ_H} = Get object ${PRIV_KEY} ${CID} ${H_OID} ${EMPTY} h_file_read
Verify file hash ${GET_OBJ_S} ${FILE_HASH}
Verify file hash ${GET_OBJ_H} ${FILE_HASH}
Verify file hash ${GET_OBJ_S} ${FILE_HASH}
Verify file hash ${GET_OBJ_H} ${FILE_HASH}
Get Range Hash ${PRIV_KEY} ${CID} ${S_OID} ${EMPTY} 0:10
Get Range Hash ${PRIV_KEY} ${CID} ${H_OID} ${EMPTY} 0:10
Get Range ${PRIV_KEY} ${CID} ${S_OID} s_get_range ${EMPTY} 0:10
Get Range ${PRIV_KEY} ${CID} ${H_OID} h_get_range ${EMPTY} 0:10
Search object ${PRIV_KEY} ${CID} ${EMPTY} ${EMPTY} ${EMPTY} ${S_OBJ_ALL}
Search object ${PRIV_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Search object ${PRIV_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER_OTH} ${S_OBJ_H_OTH}
Head object ${PRIV_KEY} ${CID} ${S_OID} ${EMPTY}
Search object ${PRIV_KEY} ${CID} ${EMPTY} ${EMPTY} ${EMPTY} ${S_OBJ_ALL}
Search object ${PRIV_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
Search object ${PRIV_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER_OTH} ${S_OBJ_H_OTH}
Head object ${PRIV_KEY} ${CID} ${S_OID} ${EMPTY}
Head object ${PRIV_KEY} ${CID} ${H_OID} ${EMPTY} ${FILE_USR_HEADER}
${TOMBSTONE_S} = Delete object ${PRIV_KEY} ${CID} ${S_OID} ${EMPTY}
${TOMBSTONE_H} = Delete object ${PRIV_KEY} ${CID} ${H_OID} ${EMPTY}
Verify Head tombstone ${PRIV_KEY} ${CID} ${TOMBSTONE_S} ${S_OID} ${ADDR}
Verify Head tombstone ${PRIV_KEY} ${CID} ${TOMBSTONE_H} ${H_OID} ${ADDR}
Sleep 2min
Run Keyword And Expect Error *
Run Keyword And Expect Error *
... Get object ${PRIV_KEY} ${CID} ${S_OID} ${EMPTY} ${GET_OBJ_S}
Run Keyword And Expect Error *
Run Keyword And Expect Error *
... Get object ${PRIV_KEY} ${CID} ${H_OID} ${EMPTY} ${GET_OBJ_H}
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
Cleanup
Cleanup Files
Cleanup Files
Get Docker Logs object_simple

View file

@ -3,6 +3,7 @@ Variables ../../../variables/common.py
Library Collections
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_object.robot
@ -12,19 +13,21 @@ NeoFS Complex Storagegroup
[Tags] Object NeoFS NeoCLI
[Timeout] 20 min
[Setup] Create Temporary Directory
Payment operations
Create container
${FILE_S} = Generate file of bytes ${COMPLEX_OBJ_SIZE}
${FILE_S} = Generate file of bytes ${COMPLEX_OBJ_SIZE}
${FILE_HASH_S} = Get file hash ${FILE_S}
# Put two Simple Object
${S_OID_1} = Put object ${PRIV_KEY} ${FILE_S} ${CID} ${EMPTY} ${EMPTY}
${S_OID_2} = Put object ${PRIV_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
@{S_OBJ_ALL} = Create List ${S_OID_1} ${S_OID_2}
${S_OID_1} = Put object ${PRIV_KEY} ${FILE_S} ${CID} ${EMPTY} ${EMPTY}
${S_OID_2} = Put object ${PRIV_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
@{S_OBJ_ALL} = Create List ${S_OID_1} ${S_OID_2}
Log Storage group with 1 object
${SG_OID_1} = Put Storagegroup ${PRIV_KEY} ${CID} ${EMPTY} ${S_OID_1}
List Storagegroup ${PRIV_KEY} ${CID} ${EMPTY} ${SG_OID_1}
@ -32,7 +35,7 @@ NeoFS Complex Storagegroup
Get Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_1} ${EMPTY} ${COMPLEX_OBJ_SIZE} @{SPLIT_OBJ_1}
${Tombstone} = Delete Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_1} ${EMPTY}
Verify Head tombstone ${PRIV_KEY} ${CID} ${Tombstone} ${SG_OID_1} ${ADDR}
Run Keyword And Expect Error *
Run Keyword And Expect Error *
... Get Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_1} ${EMPTY} ${COMPLEX_OBJ_SIZE} @{SPLIT_OBJ_1}
List Storagegroup ${PRIV_KEY} ${CID} ${EMPTY} @{EMPTY}
@ -42,29 +45,25 @@ NeoFS Complex Storagegroup
List Storagegroup ${PRIV_KEY} ${CID} ${EMPTY} ${SG_OID_2}
@{SPLIT_OBJ_2} = Get Split objects ${PRIV_KEY} ${CID} ${S_OID_2}
@{SPLIT_OBJ_ALL} = Combine Lists ${SPLIT_OBJ_1} ${SPLIT_OBJ_2}
${EXPECTED_SIZE} = Evaluate 2*${COMPLEX_OBJ_SIZE}
${EXPECTED_SIZE} = Evaluate 2*${COMPLEX_OBJ_SIZE}
Get Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_2} ${EMPTY} ${EXPECTED_SIZE} @{SPLIT_OBJ_ALL}
${Tombstone} = Delete Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_2} ${EMPTY}
Verify Head tombstone ${PRIV_KEY} ${CID} ${Tombstone} ${SG_OID_2} ${ADDR}
Run Keyword And Expect Error *
Run Keyword And Expect Error *
... Get Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_2} ${EMPTY} ${EXPECTED_SIZE} @{SPLIT_OBJ_ALL}
List Storagegroup ${PRIV_KEY} ${CID} ${EMPTY} @{EMPTY}
Log Incorrect input
Run Keyword And Expect Error *
Run Keyword And Expect Error *
... Put Storagegroup ${PRIV_KEY} ${CID} ${EMPTY} ${UNEXIST_OID}
Run Keyword And Expect Error *
Run Keyword And Expect Error *
... Delete Storagegroup ${PRIV_KEY} ${CID} ${UNEXIST_OID} ${EMPTY}
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
Cleanup
Cleanup Files
Cleanup
Cleanup Files
Get Docker Logs object_storage_group_complex

View file

@ -3,6 +3,7 @@ Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_object.robot
@ -12,6 +13,8 @@ NeoFS Simple Storagegroup
[Tags] Object NeoFS NeoCLI
[Timeout] 20 min
[Setup] Create Temporary Directory
Payment operations
Create container
@ -20,18 +23,18 @@ NeoFS Simple Storagegroup
# Put two Simple Object
${S_OID_1} = Put object ${PRIV_KEY} ${FILE_S} ${CID} ${EMPTY} ${EMPTY}
${S_OID_2} = Put object ${PRIV_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
@{S_OBJ_ALL} = Create List ${S_OID_1} ${S_OID_2}
${S_OID_1} = Put object ${PRIV_KEY} ${FILE_S} ${CID} ${EMPTY} ${EMPTY}
${S_OID_2} = Put object ${PRIV_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
@{S_OBJ_ALL} = Create List ${S_OID_1} ${S_OID_2}
Log Storage group with 1 object
${SG_OID_1} = Put Storagegroup ${PRIV_KEY} ${CID} ${EMPTY} ${S_OID_1}
List Storagegroup ${PRIV_KEY} ${CID} ${EMPTY} ${SG_OID_1}
Get Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_1} ${EMPTY} ${SIMPLE_OBJ_SIZE} ${S_OID_1}
${Tombstone} = Delete Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_1} ${EMPTY}
Verify Head tombstone ${PRIV_KEY} ${CID} ${Tombstone} ${SG_OID_1} ${ADDR}
Run Keyword And Expect Error *
Run Keyword And Expect Error *
... Get Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_1} ${EMPTY} ${SIMPLE_OBJ_SIZE} ${S_OID_1}
List Storagegroup ${PRIV_KEY} ${CID} ${EMPTY} @{EMPTY}
@ -43,26 +46,20 @@ NeoFS Simple Storagegroup
Get Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_2} ${EMPTY} ${EXPECTED_SIZE} @{S_OBJ_ALL}
${Tombstone} = Delete Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_2} ${EMPTY}
Verify Head tombstone ${PRIV_KEY} ${CID} ${Tombstone} ${SG_OID_2} ${ADDR}
Run Keyword And Expect Error *
Run Keyword And Expect Error *
... Get Storagegroup ${PRIV_KEY} ${CID} ${SG_OID_2} ${EMPTY} ${EXPECTED_SIZE} @{S_OBJ_ALL}
List Storagegroup ${PRIV_KEY} ${CID} ${EMPTY} @{EMPTY}
Log Incorrect input
Run Keyword And Expect Error *
Run Keyword And Expect Error *
... Put Storagegroup ${PRIV_KEY} ${CID} ${EMPTY} ${UNEXIST_OID}
Run Keyword And Expect Error *
Run Keyword And Expect Error *
... Delete Storagegroup ${PRIV_KEY} ${CID} ${UNEXIST_OID} ${EMPTY}
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
Cleanup
Create List
Get Docker Logs object_storage_group_simple

View file

@ -3,6 +3,7 @@ Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
*** Variables ***
${DEPOSIT_AMOUNT} = 10
@ -14,40 +15,42 @@ NeoFS Deposit and Withdraw
[Tags] Withdraw NeoFS NeoCLI
[Timeout] 10 min
[Setup] Create Temporary Directory
${WALLET} = Init wallet
Generate wallet ${WALLET}
${ADDR} = Dump Address ${WALLET}
${PRIV_KEY} = Dump PrivKey ${WALLET} ${ADDR}
${TX} = Transfer Mainnet Gas wallets/wallet.json ${DEF_WALLET_ADDR} ${ADDR} 15
Wait Until Keyword Succeeds 1 min 15 sec
Wait Until Keyword Succeeds 1 min 15 sec
... Transaction accepted in block ${TX}
Get Transaction ${TX}
${MAINNET_BALANCE} = Expected Mainnet Balance ${ADDR} 15
${SCRIPT_HASH} = Get ScriptHash ${PRIV_KEY}
${TX_DEPOSIT} = NeoFS Deposit ${WALLET} ${ADDR} ${SCRIPT_HASH} ${DEPOSIT_AMOUNT}
Wait Until Keyword Succeeds 1 min 15 sec
Wait Until Keyword Succeeds 1 min 15 sec
... Transaction accepted in block ${TX_DEPOSIT}
Get Transaction ${TX_DEPOSIT}
# Expected amount diff will be formed from deposit amount and contract fee
${EXPECTED_DIFF} = Evaluate -${DEPOSIT_AMOUNT}-${NEOFS_CONTRACT_DEPOSIT_GAS_FEE}
${DEPOSIT_BALANCE} = Expected Mainnet Balance Diff ${ADDR} ${MAINNET_BALANCE} ${EXPECTED_DIFF}
${NEOFS_BALANCE} = Get Balance ${PRIV_KEY}
${NEOFS_BALANCE} = Get Balance ${PRIV_KEY}
${TX} = Withdraw Mainnet Gas ${WALLET} ${ADDR} ${SCRIPT_HASH} ${WITHDRAW_AMOUNT}
Wait Until Keyword Succeeds 1 min 15 sec
Wait Until Keyword Succeeds 1 min 15 sec
... Transaction accepted in block ${TX}
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
Get Balance ${PRIV_KEY}
Get Balance ${PRIV_KEY}
Mainnet Balance ${ADDR}
Expected Balance ${PRIV_KEY} ${NEOFS_BALANCE} -${WITHDRAW_AMOUNT}
@ -55,11 +58,11 @@ NeoFS Deposit and Withdraw
# Expected amount diff will be formed from withdrawal amount and contract fee
${EXPECTED_DIFF_W} = Evaluate ${WITHDRAW_AMOUNT}-${NEOFS_CONTRACT_WITHDRAW_GAS_FEE}
Expected Mainnet Balance Diff ${ADDR} ${DEPOSIT_BALANCE} ${EXPECTED_DIFF_W}
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
Cleanup
Cleanup Files
Get Docker Logs withdraw
Get Docker Logs withdraw

View file

@ -1,32 +1,33 @@
*** Settings ***
Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/gates.py
Library ../${RESOURCES}/utility_keywords.py
*** Test cases ***
NeoFS HTTP Gateway
NeoFS HTTP Gateway
[Documentation] Creates container and does PUT, GET via HTTP Gate
[Timeout] 5 min
[Setup] Create Temporary Directory
${WALLET} = Init wallet
Generate wallet ${WALLET}
${ADDR} = Dump Address ${WALLET}
${PRIV_KEY} = Dump PrivKey ${WALLET} ${ADDR}
${TX} = Transfer Mainnet Gas wallets/wallet.json ${DEF_WALLET_ADDR} ${ADDR} 6
Wait Until Keyword Succeeds 1 min 15 sec
Wait Until Keyword Succeeds 1 min 15 sec
... Transaction accepted in block ${TX}
Get Transaction ${TX}
Expected Mainnet Balance ${ADDR} 6
${SCRIPT_HASH} = Get ScriptHash ${PRIV_KEY}
${SCRIPT_HASH} = Get ScriptHash ${PRIV_KEY}
${TX_DEPOSIT} = NeoFS Deposit ${WALLET} ${ADDR} ${SCRIPT_HASH} 5
${TX_DEPOSIT} = NeoFS Deposit ${WALLET} ${ADDR} ${SCRIPT_HASH} 5
Wait Until Keyword Succeeds 1 min 15 sec
... Transaction accepted in block ${TX_DEPOSIT}
Get Transaction ${TX_DEPOSIT}
@ -40,9 +41,9 @@ NeoFS HTTP Gateway
${FILE_HASH} = Get file hash ${FILE}
${FILE_L_HASH} = Get file hash ${FILE_L}
${S_OID} = Put object ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} ${EMPTY}
${L_OID} = Put object ${PRIV_KEY} ${FILE_L} ${CID} ${EMPTY} ${EMPTY}
${S_OID} = Put object ${PRIV_KEY} ${FILE} ${CID} ${EMPTY} ${EMPTY}
${L_OID} = Put object ${PRIV_KEY} ${FILE_L} ${CID} ${EMPTY} ${EMPTY}
# By request from Service team - try to GET object from the node without object
@{GET_NODE_LIST} = Get nodes without object ${PRIV_KEY} ${CID} ${S_OID}
@ -51,8 +52,8 @@ NeoFS HTTP Gateway
${GET_OBJ_S} = Get object ${PRIV_KEY} ${CID} ${S_OID} ${EMPTY} s_file_read ${NODE}
${FILEPATH} = Get via HTTP Gate ${CID} ${S_OID}
Verify file hash ${GET_OBJ_S} ${FILE_HASH}
Verify file hash ${FILEPATH} ${FILE_HASH}
Verify file hash ${GET_OBJ_S} ${FILE_HASH}
Verify file hash ${FILEPATH} ${FILE_HASH}
@{GET_NODE_LIST} = Get nodes without object ${PRIV_KEY} ${CID} ${L_OID}
${NODE} = Evaluate random.choice($GET_NODE_LIST) random
@ -60,15 +61,15 @@ NeoFS HTTP Gateway
${GET_OBJ_L} = Get object ${PRIV_KEY} ${CID} ${L_OID} ${EMPTY} l_file_read ${NODE}
${FILEPATH} = Get via HTTP Gate ${CID} ${L_OID}
Verify file hash ${GET_OBJ_L} ${FILE_L_HASH}
Verify file hash ${FILEPATH} ${FILE_L_HASH}
Verify file hash ${GET_OBJ_L} ${FILE_L_HASH}
Verify file hash ${FILEPATH} ${FILE_L_HASH}
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
Cleanup
Cleanup Files
Get Docker Logs http_gate
Cleanup Files
Get Docker Logs http_gate

View file

@ -4,55 +4,56 @@ Library Collections
Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/gates.py
Library ../${RESOURCES}/utility_keywords.py
*** Test cases ***
NeoFS S3 Gateway
NeoFS S3 Gateway
[Documentation] Execute operations via S3 Gate
[Timeout] 5 min
[Setup] Create Temporary Directory
${PRIV_KEY} = Form WIF from String 1dd37fba80fec4e6a6f13fd708d8dcb3b29def768017052f6c930fa1c5d90bbb
${PRIV_KEY} = Form WIF from String 1dd37fba80fec4e6a6f13fd708d8dcb3b29def768017052f6c930fa1c5d90bbb
${WALLET} = Init wallet
Generate wallet from WIF ${WALLET} ${PRIV_KEY}
${ADDR} = Dump Address ${WALLET}
Dump PrivKey ${WALLET} ${ADDR}
${SCRIPT_HASH} = Get ScriptHash ${PRIV_KEY}
${TX_DEPOSIT} = NeoFS Deposit ${WALLET} ${ADDR} ${SCRIPT_HASH} 5
Generate wallet from WIF ${WALLET} ${PRIV_KEY}
${ADDR} = Dump Address ${WALLET}
Dump PrivKey ${WALLET} ${ADDR}
${SCRIPT_HASH} = Get ScriptHash ${PRIV_KEY}
${TX_DEPOSIT} = NeoFS Deposit ${WALLET} ${ADDR} ${SCRIPT_HASH} 5
Wait Until Keyword Succeeds 1 min 15 sec
... Transaction accepted in block ${TX_DEPOSIT}
Get Transaction ${TX_DEPOSIT}
${FILE_S3} = Generate file of bytes ${COMPLEX_OBJ_SIZE}
${FILE_S3_HASH} = Get file hash ${FILE_S3}
${FILE_S3_NAME} = Get file name ${FILE_S3}
${FILE_S3_NAME} = Get file name ${FILE_S3}
${FILE_FS} = Generate file of bytes ${COMPLEX_OBJ_SIZE}
${FILE_FS_HASH} = Get file hash ${FILE_FS}
${FILE_FS_NAME} = Get file name ${FILE_FS}
${FILE_FS_NAME} = Get file name ${FILE_FS}
${CID}
... ${BUCKET}
... ${ACCESS_KEY_ID}
... ${SEC_ACCESS_KEY}
... ${ACCESS_KEY_ID}
... ${SEC_ACCESS_KEY}
... ${OWNER_PRIV_KEY} = Init S3 Credentials ${PRIV_KEY} keys/s3_docker_hcs.pub.key
${CONTEINERS_LIST} = Container List ${PRIV_KEY}
${CONTEINERS_LIST} = Container List ${PRIV_KEY}
List Should Contain Value ${CONTEINERS_LIST} ${CID}
${S3_CLIENT} = Config S3 client ${ACCESS_KEY_ID} ${SEC_ACCESS_KEY}
${LIST_S3_BUCKETS} = List buckets S3 ${S3_CLIENT}
${S3_CLIENT} = Config S3 client ${ACCESS_KEY_ID} ${SEC_ACCESS_KEY}
${LIST_S3_BUCKETS} = List buckets S3 ${S3_CLIENT}
List Should Contain Value ${LIST_S3_BUCKETS} ${BUCKET}
Put object S3 ${S3_CLIENT} ${BUCKET} ${FILE_S3}
Head object S3 ${S3_CLIENT} ${BUCKET} ${FILE_S3_NAME}
${OID_FS} = Put object ${PRIV_KEY} ${FILE_FS} ${CID} ${EMPTY} ${EMPTY}
Head object ${PRIV_KEY} ${CID} ${OID_FS} ${EMPTY}
${OID_FS} = Put object ${PRIV_KEY} ${FILE_FS} ${CID} ${EMPTY} ${EMPTY}
Head object ${PRIV_KEY} ${CID} ${OID_FS} ${EMPTY}
${LIST_S3_OBJECTS} = List objects S3 ${S3_CLIENT} ${BUCKET}
List Should Contain Value ${LIST_S3_OBJECTS} ${FILE_S3_NAME}
@ -62,20 +63,20 @@ NeoFS S3 Gateway
List Should Contain Value ${LIST_V2_S3_OBJECTS} ${FILE_S3_NAME}
List Should Contain Value ${LIST_V2_S3_OBJECTS} ${FILE_S3_NAME}
${OID_LIST_S3} = Search object ${PRIV_KEY} ${CID} ${EMPTY} ${EMPTY} FileName=${FILE_S3_NAME}
${OID_LIST_S3} = Search object ${PRIV_KEY} ${CID} ${EMPTY} ${EMPTY} FileName=${FILE_S3_NAME}
${OID_S3} = Get From List ${OID_LIST_S3} 0
Get object S3 ${S3_CLIENT} ${BUCKET} ${FILE_S3_NAME} s3_obj_get_s3
Get object S3 ${S3_CLIENT} ${BUCKET} ${FILE_FS_NAME} fs_obj_get_s3
Verify file hash s3_obj_get_s3 ${FILE_S3_HASH}
Verify file hash fs_obj_get_s3 ${FILE_FS_HASH}
Verify file hash s3_obj_get_s3 ${FILE_S3_HASH}
Verify file hash fs_obj_get_s3 ${FILE_FS_HASH}
Get object ${PRIV_KEY} ${CID} ${OID_S3} ${EMPTY} s3_obj_get_fs
Get object ${PRIV_KEY} ${CID} ${OID_FS} ${EMPTY} fs_obj_get_fs
Verify file hash s3_obj_get_fs ${FILE_S3_HASH}
Verify file hash fs_obj_get_fs ${FILE_FS_HASH}
Verify file hash s3_obj_get_fs ${FILE_S3_HASH}
Verify file hash fs_obj_get_fs ${FILE_FS_HASH}
Copy object S3 ${S3_CLIENT} ${BUCKET} ${FILE_S3_NAME} NewName
${LIST_S3_OBJECTS} = List objects S3 ${S3_CLIENT} ${BUCKET}
@ -85,10 +86,10 @@ NeoFS S3 Gateway
${LIST_S3_OBJECTS} = List objects S3 ${S3_CLIENT} ${BUCKET}
List Should Not Contain Value ${LIST_S3_OBJECTS} FILE_S3_NAME
[Teardown] Cleanup
[Teardown] Cleanup
*** Keywords ***
Cleanup
Cleanup Files
Get Docker Logs s3_gate
Cleanup Files
Get Docker Logs s3_gate