#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 subprocess
import os import os
@ -367,23 +367,6 @@ def container_existing(private_key: str, cid: str):
_find_cid(complProc.stdout, cid) _find_cid(complProc.stdout, cid)
return 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') @keyword('Search object')
def search_object(private_key: str, cid: str, keys: str, bearer: str, filters: str, def search_object(private_key: str, cid: str, keys: str, bearer: str, filters: str,
@ -583,29 +566,6 @@ def _verify_child_link(private_key: str, cid: str, oid: str, header_last_parsed:
return final_verif_data 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') @keyword('Verify Head Tombstone')
def verify_head_tombstone(private_key: str, cid: str, oid_ts: str, oid: str, addr: str): def verify_head_tombstone(private_key: str, cid: str, oid_ts: str, oid: str, addr: str):
object_cmd = ( object_cmd = (
@ -842,17 +802,6 @@ def verify_file_hash(filename, expected_hash):
else: else:
raise Exception("File hash '{}' is not equal to {}".format(file_hash, expected_hash)) 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') @keyword('Put object')
def put_object(private_key: str, path: str, cid: str, bearer: str, user_headers: str, def put_object(private_key: str, path: str, cid: str, bearer: str, user_headers: str,
endpoint: str="", options: str="" ): endpoint: str="", options: str="" ):
@ -1106,23 +1055,6 @@ def delete_storagegroup(private_key: str, cid: str, oid: str, bearer_token: str=
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e:
raise Exception("command '{}' return with error (code {}): {}".format(e.cmd, e.returncode, e.output)) 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): def _get_file_hash(filename):
blocksize = 65536 blocksize = 65536
hash = hashlib.md5() 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 Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_acl_basic.robot Resource common_steps_acl_basic.robot
@ -12,6 +13,8 @@ Basic ACL Operations for Private Container
[Tags] ACL NeoFS NeoCLI [Tags] ACL NeoFS NeoCLI
[Timeout] 20 min [Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys Generate Keys
Create Containers Create Containers

View file

@ -3,6 +3,7 @@ Variables ../../../variables/common.py
Library Collections Library Collections
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_acl_basic.robot Resource common_steps_acl_basic.robot
@ -13,6 +14,8 @@ Basic ACL Operations for Private Container
[Tags] ACL NeoFS NeoCLI [Tags] ACL NeoFS NeoCLI
[Timeout] 20 min [Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys Generate Keys
Create Containers Create Containers

View file

@ -2,6 +2,7 @@
Variables ../../../variables/common.py Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_acl_basic.robot Resource common_steps_acl_basic.robot
@ -12,6 +13,8 @@ Basic ACL Operations for Public Container
[Tags] ACL NeoFS NeoCLI [Tags] ACL NeoFS NeoCLI
[Timeout] 20 min [Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys Generate Keys
Create Containers Create Containers

View file

@ -3,6 +3,7 @@ Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_acl_basic.robot Resource common_steps_acl_basic.robot
@ -13,6 +14,8 @@ Basic ACL Operations for Public Container
[Tags] ACL NeoFS NeoCLI [Tags] ACL NeoFS NeoCLI
[Timeout] 20 min [Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys Generate Keys
Create Containers Create Containers

View file

@ -2,6 +2,7 @@
Variables ../../../variables/common.py Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_acl_basic.robot Resource common_steps_acl_basic.robot
@ -12,6 +13,8 @@ Basic ACL Operations for Read-Only Container
[Tags] ACL NeoFS NeoCLI [Tags] ACL NeoFS NeoCLI
[Timeout] 20 min [Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys Generate Keys
Create Containers Create Containers

View file

@ -3,6 +3,7 @@ Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_acl_basic.robot Resource common_steps_acl_basic.robot
@ -13,6 +14,8 @@ Basic ACL Operations for Read-Only Container
[Tags] ACL NeoFS NeoCLI [Tags] ACL NeoFS NeoCLI
[Timeout] 20 min [Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys Generate Keys
Create Containers Create Containers

View file

@ -2,6 +2,7 @@
Variables ../../../variables/common.py Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Library Collections Library Collections
Resource common_steps_acl_bearer.robot Resource common_steps_acl_bearer.robot
@ -13,6 +14,8 @@ BearerToken Operations
[Tags] ACL NeoFS NeoCLI BearerToken [Tags] ACL NeoFS NeoCLI BearerToken
[Timeout] 20 min [Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys Generate Keys
Prepare eACL Role rules Prepare eACL Role rules

View file

@ -2,6 +2,7 @@
Variables ../../../variables/common.py Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Library Collections Library Collections
Resource common_steps_acl_bearer.robot Resource common_steps_acl_bearer.robot
@ -13,6 +14,8 @@ BearerToken Operations
[Tags] ACL NeoFS NeoCLI BearerToken [Tags] ACL NeoFS NeoCLI BearerToken
[Timeout] 20 min [Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys Generate Keys
Prepare eACL Role rules Prepare eACL Role rules

View file

@ -2,6 +2,7 @@
Variables ../../../variables/common.py Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Library Collections Library Collections
Resource common_steps_acl_bearer.robot Resource common_steps_acl_bearer.robot
@ -12,6 +13,8 @@ BearerToken Operations for Сompound Operations
[Tags] ACL NeoFS NeoCLI BearerToken [Tags] ACL NeoFS NeoCLI BearerToken
[Timeout] 20 min [Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys Generate Keys
Prepare eACL Role rules Prepare eACL Role rules

View file

@ -2,6 +2,7 @@
Variables ../../../variables/common.py Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Library Collections Library Collections
Resource common_steps_acl_bearer.robot Resource common_steps_acl_bearer.robot
@ -13,6 +14,8 @@ BearerToken Operations with Filter OID Equal
[Tags] ACL NeoFS NeoCLI BearerToken [Tags] ACL NeoFS NeoCLI BearerToken
[Timeout] 20 min [Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys Generate Keys
Prepare eACL Role rules Prepare eACL Role rules

View file

@ -2,6 +2,7 @@
Variables ../../../variables/common.py Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Library Collections Library Collections
Resource common_steps_acl_bearer.robot Resource common_steps_acl_bearer.robot
@ -13,6 +14,8 @@ BearerToken Operations with Filter OID NotEqual
[Tags] ACL NeoFS NeoCLI BearerToken [Tags] ACL NeoFS NeoCLI BearerToken
[Timeout] 20 min [Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys Generate Keys
Prepare eACL Role rules Prepare eACL Role rules

View file

@ -2,18 +2,19 @@
Variables ../../../variables/common.py Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Library Collections Library Collections
Resource common_steps_acl_bearer.robot Resource common_steps_acl_bearer.robot
*** Test cases *** *** Test cases ***
BearerToken Operations with Filter UserHeader Equal BearerToken Operations with Filter UserHeader Equal
[Documentation] Testcase to validate NeoFS operations with BearerToken with Filter UserHeader Equal. [Documentation] Testcase to validate NeoFS operations with BearerToken with Filter UserHeader Equal.
[Tags] ACL NeoFS NeoCLI BearerToken [Tags] ACL NeoFS NeoCLI BearerToken
[Timeout] 20 min [Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys Generate Keys
Prepare eACL Role rules Prepare eACL Role rules
@ -28,13 +29,10 @@ BearerToken Operations with Filter UserHeader Equal
[Teardown] Cleanup [Teardown] Cleanup
*** Keywords *** *** Keywords ***
Prepare eACL Role rules 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 # eACL rules for all operations and similar permissions
@{Roles} = Create List OTHERS USER SYSTEM @{Roles} = Create List OTHERS USER SYSTEM
FOR ${role} IN @{Roles} FOR ${role} IN @{Roles}
@ -51,7 +49,6 @@ Prepare eACL Role rules
Set Global Variable ${EACL_DENY_ALL_${role}} gen_eacl_deny_all_${role} Set Global Variable ${EACL_DENY_ALL_${role}} gen_eacl_deny_all_${role}
END END
Check eACL Deny and Allow All Bearer Filter UserHeader Equal Check eACL Deny and Allow All Bearer Filter UserHeader Equal
${CID} = Create Container Public ${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}
@ -59,7 +56,6 @@ Check eACL Deny and Allow All Bearer Filter UserHeader Equal
${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} @{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 Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H} Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}

View file

@ -2,17 +2,19 @@
Variables ../../../variables/common.py Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Library Collections Library Collections
Resource common_steps_acl_bearer.robot Resource common_steps_acl_bearer.robot
*** Test cases *** *** Test cases ***
BearerToken Operations Filter UserHeader NotEqual BearerToken Operations Filter UserHeader NotEqual
[Documentation] Testcase to validate NeoFS operations with BearerToken Filter UserHeader NotEqual. [Documentation] Testcase to validate NeoFS operations with BearerToken Filter UserHeader NotEqual.
[Tags] ACL NeoFS NeoCLI BearerToken [Tags] ACL NeoFS NeoCLI BearerToken
[Timeout] 20 min [Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys Generate Keys
Prepare eACL Role rules Prepare eACL Role rules
@ -27,8 +29,6 @@ BearerToken Operations Filter UserHeader NotEqual
[Teardown] Cleanup [Teardown] Cleanup
*** Keywords *** *** Keywords ***
Check eACL Deny and Allow All Bearer Filter UserHeader NotEqual Check eACL Deny and Allow All Bearer Filter UserHeader NotEqual

View file

@ -3,6 +3,7 @@
Variables ../../../variables/common.py Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Library Collections Library Collections
Resource common_steps_acl_bearer.robot Resource common_steps_acl_bearer.robot
@ -13,6 +14,8 @@ BearerToken Operations for Inaccessible Container
[Tags] ACL NeoFS NeoCLI BearerToken [Tags] ACL NeoFS NeoCLI BearerToken
[Timeout] 20 min [Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys Generate Keys
Prepare eACL Role rules Prepare eACL Role rules
@ -27,8 +30,6 @@ BearerToken Operations for Inaccessible Container
[Teardown] Cleanup [Teardown] Cleanup
*** Keywords *** *** Keywords ***
Check Container Inaccessible and Allow All Bearer Check Container Inaccessible and Allow All Bearer

View file

@ -1,21 +1,20 @@
*** Settings *** *** Settings ***
Variables ../../../variables/common.py Variables ../../../variables/common.py
Library Collections Library Collections
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_acl_bearer.robot Resource common_steps_acl_bearer.robot
*** Test cases *** *** Test cases ***
BearerToken Operations BearerToken Operations
[Documentation] Testcase to validate NeoFS operations with BearerToken. [Documentation] Testcase to validate NeoFS operations with BearerToken.
[Tags] ACL NeoFS NeoCLI BearerToken [Tags] ACL NeoFS NeoCLI BearerToken
[Timeout] 20 min [Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys Generate Keys
Prepare eACL Role rules Prepare eACL Role rules

View file

@ -2,6 +2,7 @@
Variables ../../../variables/common.py Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Library Collections Library Collections
Resource common_steps_acl_bearer.robot Resource common_steps_acl_bearer.robot
@ -13,6 +14,8 @@ BearerToken Operations with Filter Requst Equal
[Tags] ACL NeoFS NeoCLI BearerToken [Tags] ACL NeoFS NeoCLI BearerToken
[Timeout] 20 min [Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys Generate Keys
Prepare eACL Role rules Prepare eACL Role rules

View file

@ -2,6 +2,7 @@
Variables ../../../variables/common.py Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Library Collections Library Collections
Resource common_steps_acl_bearer.robot Resource common_steps_acl_bearer.robot
@ -13,6 +14,8 @@ BearerToken Operations with Filter Requst NotEqual
[Tags] ACL NeoFS NeoCLI BearerToken [Tags] ACL NeoFS NeoCLI BearerToken
[Timeout] 20 min [Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys Generate Keys
Prepare eACL Role rules Prepare eACL Role rules

View file

@ -3,6 +3,7 @@ Variables ../../../variables/common.py
Library Collections Library Collections
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_acl_extended.robot Resource common_steps_acl_extended.robot
@ -12,6 +13,8 @@ Extended ACL Operations
[Tags] ACL eACL NeoFS NeoCLI [Tags] ACL eACL NeoFS NeoCLI
[Timeout] 20 min [Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys Generate Keys
Prepare eACL Role rules Prepare eACL Role rules

View file

@ -3,6 +3,7 @@ Variables ../../../variables/common.py
Library Collections Library Collections
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_acl_extended.robot Resource common_steps_acl_extended.robot
@ -12,6 +13,8 @@ Extended ACL Operations
[Tags] ACL eACL NeoFS NeoCLI [Tags] ACL eACL NeoFS NeoCLI
[Timeout] 20 min [Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys Generate Keys
Prepare eACL Role rules Prepare eACL Role rules

View file

@ -3,6 +3,7 @@ Variables ../../../variables/common.py
Library Collections Library Collections
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_acl_extended.robot Resource common_steps_acl_extended.robot
@ -12,6 +13,8 @@ Extended ACL Operations
[Tags] ACL eACL NeoFS NeoCLI [Tags] ACL eACL NeoFS NeoCLI
[Timeout] 20 min [Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys Generate Keys
Prepare eACL Role rules Prepare eACL Role rules

View file

@ -3,6 +3,7 @@ Variables ../../../variables/common.py
Library Collections Library Collections
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_acl_extended.robot Resource common_steps_acl_extended.robot
@ -12,6 +13,8 @@ Extended ACL Operations
[Tags] ACL eACL NeoFS NeoCLI [Tags] ACL eACL NeoFS NeoCLI
[Timeout] 20 min [Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys Generate Keys
Prepare eACL Role rules Prepare eACL Role rules

View file

@ -3,6 +3,7 @@ Variables ../../../variables/common.py
Library Collections Library Collections
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_acl_extended.robot Resource common_steps_acl_extended.robot
@ -13,6 +14,8 @@ Extended ACL Operations
[Tags] ACL eACL NeoFS NeoCLI [Tags] ACL eACL NeoFS NeoCLI
[Timeout] 20 min [Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys Generate Keys
Prepare eACL Role rules Prepare eACL Role rules

View file

@ -3,6 +3,7 @@ Variables ../../../variables/common.py
Library Collections Library Collections
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_acl_extended.robot Resource common_steps_acl_extended.robot
@ -12,6 +13,8 @@ Extended ACL Operations
[Tags] ACL eACL NeoFS NeoCLI [Tags] ACL eACL NeoFS NeoCLI
[Timeout] 20 min [Timeout] 20 min
[Setup] Create Temporary Directory
Generate Keys Generate Keys
Prepare eACL Role rules Prepare eACL Role rules
@ -19,7 +22,6 @@ Extended ACL Operations
Generate files ${SIMPLE_OBJ_SIZE} Generate files ${SIMPLE_OBJ_SIZE}
Check Filters Check Filters
Log Check extended ACL with complex object Log Check extended ACL with complex object
Generate files ${COMPLEX_OBJ_SIZE} Generate files ${COMPLEX_OBJ_SIZE}
Check Filters Check Filters
@ -29,14 +31,12 @@ Extended ACL Operations
*** Keywords *** *** Keywords ***
Check Filters Check Filters
Check eACL MatchType String Equal Object Check eACL MatchType String Equal Object
Check eACL MatchType String Not Equal Object Check eACL MatchType String Not Equal Object
Check eACL MatchType String Equal Request Deny Check eACL MatchType String Equal Request Deny
Check eACL MatchType String Equal Request Allow Check eACL MatchType String Equal Request Allow
Check eACL MatchType String Equal Request Deny Check eACL MatchType String Equal Request Deny
${CID} = Create Container Public ${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}
@ -81,7 +81,6 @@ Check eACL MatchType String Equal Request Deny
Delete object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} --xhdr a=22 Delete object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} --xhdr a=22
Check eACL MatchType String Equal Request Allow Check eACL MatchType String Equal Request Allow
${CID} = Create Container Public ${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}

View file

@ -3,6 +3,7 @@ Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
*** Test cases *** *** Test cases ***
@ -11,6 +12,8 @@ NeoFS Simple Netmap
[Tags] Netmap NeoFS NeoCLI [Tags] Netmap NeoFS NeoCLI
[Timeout] 20 min [Timeout] 20 min
[Setup] Create Temporary Directory
Generate Key and Pre-payment Generate Key and Pre-payment
Generate file Generate file

View file

@ -3,6 +3,7 @@ Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
*** Test cases *** *** Test cases ***
NeoFS Object Replication NeoFS Object Replication
@ -10,6 +11,8 @@ NeoFS Object Replication
[Tags] Migration Replication NeoFS NeoCLI [Tags] Migration Replication NeoFS NeoCLI
[Timeout] 25 min [Timeout] 25 min
[Setup] Create Temporary Directory
${WALLET} = Init wallet ${WALLET} = Init wallet
Generate wallet ${WALLET} Generate wallet ${WALLET}
${ADDR} = Dump Address ${WALLET} ${ADDR} = Dump Address ${WALLET}

View file

@ -3,6 +3,7 @@ Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_object.robot Resource common_steps_object.robot
@ -12,6 +13,8 @@ NeoFS Complex Object Operations
[Tags] Object NeoFS NeoCLI [Tags] Object NeoFS NeoCLI
[Timeout] 20 min [Timeout] 20 min
[Setup] Create Temporary Directory
Payment operations Payment operations
Prepare container Prepare container

View file

@ -3,6 +3,7 @@ Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_object.robot Resource common_steps_object.robot
@ -12,6 +13,8 @@ NeoFS Simple Object Operations
[Tags] Object NeoFS NeoCLI [Tags] Object NeoFS NeoCLI
[Timeout] 20 min [Timeout] 20 min
[Setup] Create Temporary Directory
Payment operations Payment operations
Prepare container Prepare container

View file

@ -3,6 +3,7 @@ Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_object.robot Resource common_steps_object.robot
@ -12,6 +13,8 @@ NeoFS Simple Object Operations
[Tags] Object NeoFS NeoCLI [Tags] Object NeoFS NeoCLI
[Timeout] 10 min [Timeout] 10 min
[Setup] Create Temporary Directory
Payment operations Payment operations
Prepare container Prepare container

View file

@ -3,6 +3,7 @@ Variables ../../../variables/common.py
Library Collections Library Collections
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_object.robot Resource common_steps_object.robot
@ -12,6 +13,8 @@ NeoFS Complex Storagegroup
[Tags] Object NeoFS NeoCLI [Tags] Object NeoFS NeoCLI
[Timeout] 20 min [Timeout] 20 min
[Setup] Create Temporary Directory
Payment operations Payment operations
Create container Create container
@ -64,7 +67,3 @@ NeoFS Complex Storagegroup
Cleanup Cleanup
Cleanup Files Cleanup Files
Get Docker Logs object_storage_group_complex Get Docker Logs object_storage_group_complex

View file

@ -3,6 +3,7 @@ Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
Resource common_steps_object.robot Resource common_steps_object.robot
@ -12,6 +13,8 @@ NeoFS Simple Storagegroup
[Tags] Object NeoFS NeoCLI [Tags] Object NeoFS NeoCLI
[Timeout] 20 min [Timeout] 20 min
[Setup] Create Temporary Directory
Payment operations Payment operations
Create container Create container
@ -59,10 +62,4 @@ NeoFS Simple Storagegroup
*** Keywords *** *** Keywords ***
Cleanup Cleanup
Create List
Get Docker Logs object_storage_group_simple Get Docker Logs object_storage_group_simple

View file

@ -3,6 +3,7 @@ Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/utility_keywords.py
*** Variables *** *** Variables ***
${DEPOSIT_AMOUNT} = 10 ${DEPOSIT_AMOUNT} = 10
@ -14,6 +15,8 @@ NeoFS Deposit and Withdraw
[Tags] Withdraw NeoFS NeoCLI [Tags] Withdraw NeoFS NeoCLI
[Timeout] 10 min [Timeout] 10 min
[Setup] Create Temporary Directory
${WALLET} = Init wallet ${WALLET} = Init wallet
Generate wallet ${WALLET} Generate wallet ${WALLET}
${ADDR} = Dump Address ${WALLET} ${ADDR} = Dump Address ${WALLET}

View file

@ -1,10 +1,9 @@
*** Settings *** *** Settings ***
Variables ../../../variables/common.py Variables ../../../variables/common.py
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/gates.py Library ../${RESOURCES}/gates.py
Library ../${RESOURCES}/utility_keywords.py
*** Test cases *** *** Test cases ***
@ -13,6 +12,8 @@ NeoFS HTTP Gateway
[Documentation] Creates container and does PUT, GET via HTTP Gate [Documentation] Creates container and does PUT, GET via HTTP Gate
[Timeout] 5 min [Timeout] 5 min
[Setup] Create Temporary Directory
${WALLET} = Init wallet ${WALLET} = Init wallet
Generate wallet ${WALLET} Generate wallet ${WALLET}
${ADDR} = Dump Address ${WALLET} ${ADDR} = Dump Address ${WALLET}

View file

@ -4,6 +4,7 @@ Library Collections
Library ../${RESOURCES}/neofs.py Library ../${RESOURCES}/neofs.py
Library ../${RESOURCES}/payment_neogo.py Library ../${RESOURCES}/payment_neogo.py
Library ../${RESOURCES}/gates.py Library ../${RESOURCES}/gates.py
Library ../${RESOURCES}/utility_keywords.py
*** Test cases *** *** Test cases ***
@ -11,8 +12,9 @@ NeoFS S3 Gateway
[Documentation] Execute operations via S3 Gate [Documentation] Execute operations via S3 Gate
[Timeout] 5 min [Timeout] 5 min
[Setup] Create Temporary Directory
${PRIV_KEY} = Form WIF from String 1dd37fba80fec4e6a6f13fd708d8dcb3b29def768017052f6c930fa1c5d90bbb ${PRIV_KEY} = Form WIF from String 1dd37fba80fec4e6a6f13fd708d8dcb3b29def768017052f6c930fa1c5d90bbb
${WALLET} = Init wallet ${WALLET} = Init wallet
Generate wallet from WIF ${WALLET} ${PRIV_KEY} Generate wallet from WIF ${WALLET} ${PRIV_KEY}
@ -42,7 +44,6 @@ NeoFS S3 Gateway
${CONTEINERS_LIST} = Container List ${PRIV_KEY} ${CONTEINERS_LIST} = Container List ${PRIV_KEY}
List Should Contain Value ${CONTEINERS_LIST} ${CID} List Should Contain Value ${CONTEINERS_LIST} ${CID}
${S3_CLIENT} = Config S3 client ${ACCESS_KEY_ID} ${SEC_ACCESS_KEY} ${S3_CLIENT} = Config S3 client ${ACCESS_KEY_ID} ${SEC_ACCESS_KEY}
${LIST_S3_BUCKETS} = List buckets S3 ${S3_CLIENT} ${LIST_S3_BUCKETS} = List buckets S3 ${S3_CLIENT}