Rename neofs to frostfs #6

Merged
dansingjulia merged 1 commit from rename_1 into master 2023-02-16 14:26:12 +00:00
83 changed files with 330 additions and 338 deletions

View file

@ -3,8 +3,8 @@
First, thank you for contributing! We love and encourage pull requests from
everyone. Please follow the guidelines:
- Check the open [issues](https://github.com/nspcc-dev/neofs-testlib/issues) and
[pull requests](https://github.com/nspcc-dev/neofs-testlib/pulls) for existing
- Check the open [issues](https://github.com/TrueCloudLab/frostfs-testlib/issues) and
[pull requests](https://github.com/TrueCloudLab/frostfs-testlib/pulls) for existing
discussions.
- Open an issue first, to discuss a new feature or enhancement.
@ -22,12 +22,12 @@ everyone. Please follow the guidelines:
## Development Workflow
Start by forking the `neofs-testlib` repository, make changes in a branch and then
Start by forking the `frostfs-testlib` repository, make changes in a branch and then
send a pull request. We encourage pull requests to discuss code changes. Here
are the steps in details:
### Set up your GitHub Repository
Fork [NeoFS testlib upstream](https://github.com/nspcc-dev/neofs-testlib/fork) source
Fork [FrostFS testlib upstream](https://github.com/TrueCloudLab/frostfs-testlib/fork) source
repository to your own personal repository. Copy the URL of your fork and clone it:
```shell
@ -36,13 +36,13 @@ $ git clone <url of your fork>
### Set up git remote as ``upstream``
```shell
$ cd neofs-testlib
$ git remote add upstream https://github.com/nspcc-dev/neofs-testlib
$ cd frostfs-testlib
$ git remote add upstream https://github.com/TrueCloudLab/frostfs-testlib
$ git fetch upstream
```
### Set up development environment
To setup development environment for `neofs-testlib`, please, take the following steps:
To setup development environment for `frostfs-testlib`, please, take the following steps:
1. Prepare virtualenv
```shell
@ -183,9 +183,9 @@ Do not use relative imports. Even if the module is in the same package, use the
To format docstrings, please, use [Google Style Docstrings](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html). Type annotations should be specified in the code and not in docstrings (please, refer to [this sample](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/index.html#type-annotations)).
## Editable installation
If you would like to modify code of the library in the integration with your test suite, you can use editable installation. For that, in virtual environment of your test suite (not in the virtual environment of the testlib itself!) run the following command (path to `neofs-testlib` directory might be different on your machine):
If you would like to modify code of the library in the integration with your test suite, you can use editable installation. For that, in virtual environment of your test suite (not in the virtual environment of the testlib itself!) run the following command (path to `frostfs-testlib` directory might be different on your machine):
```shell
$ pip install -e ../neofs-testlib
$ pip install -e ../frostfs-testlib
```
# Maintaining guide
@ -225,7 +225,7 @@ To check that package description will be correctly rendered at PyPI, please, us
$ twine check dist/*
```
To upload package to [test PyPI](https://test.pypi.org/project/neofs-testlib/), please, use command:
To upload package to [test PyPI](https://test.pypi.org/project/frostfs-testlib/), please, use command:
```shell
$ twine upload -r testpypi dist/*
```

View file

@ -1,10 +1,10 @@
# neofs-testlib
This library provides building blocks and utilities to facilitate development of automated tests for NeoFS system.
# frostfs-testlib
This library provides building blocks and utilities to facilitate development of automated tests for FrostFS system.
## Installation
Library can be installed via pip:
```shell
$ pip install neofs-testlib
$ pip install frostfs-testlib
```
## Configuration
@ -16,7 +16,7 @@ Reporter is a singleton component that is used by the library to store test arti
Reporter sends artifacts to handlers that are responsible for actual storing in particular system. By default reporter is initialized without any handlers and won't take any actions to store the artifacts. To add handlers directly via code you can use method `register_handler`:
```python
from neofs_testlib.reporter import AllureHandler, get_reporter
from frostfs_testlib.reporter import AllureHandler, get_reporter
get_reporter().register_handler(AllureHandler())
```
@ -30,10 +30,10 @@ get_reporter().configure({ "handlers": [{"plugin_name": "allure"}] })
```
### Hosting Configuration
Hosting component is a class that represents infrastructure (machines/containers/services) where neoFS is hosted. Interaction with specific infrastructure instance (host) is encapsulated in classes that implement interface `neofs_testlib.hosting.Host`. To pass information about hosts to the `Hosting` class in runtime we use method `configure`:
Hosting component is a class that represents infrastructure (machines/containers/services) where neoFS is hosted. Interaction with specific infrastructure instance (host) is encapsulated in classes that implement interface `frostfs_testlib.hosting.Host`. To pass information about hosts to the `Hosting` class in runtime we use method `configure`:
```python
from neofs_testlib.hosting import Hosting
from frostfs_testlib.hosting import Hosting
hosting = Hosting()
hosting.configure({ "hosts": [{ "address": "localhost", "plugin_name": "docker" ... }]})
@ -41,18 +41,18 @@ hosting.configure({ "hosts": [{ "address": "localhost", "plugin_name": "docker"
## Plugins
Testlib uses [entrypoint specification](https://docs.python.org/3/library/importlib.metadata.html) for plugins. Testlib supports the following entrypoint groups for plugins:
- `neofs.testlib.reporter` - group for reporter handler plugins. Plugin should be a class that implements interface `neofs_testlib.reporter.interfaces.ReporterHandler`.
- `frostfs.testlib.reporter` - group for reporter handler plugins. Plugin should be a class that implements interface `frostfs_testlib.reporter.interfaces.ReporterHandler`.
### Example reporter plugin
In this example we will consider two Python projects:
- Project "my_neofs_plugins" where we will build a plugin that extends testlib functionality.
- Project "my_neofs_tests" that uses "neofs_testlib" and "my_neofs_plugins" to build some tests.
- Project "my_frostfs_plugins" where we will build a plugin that extends testlib functionality.
- Project "my_frostfs_tests" that uses "frostfs_testlib" and "my_frostfs_plugins" to build some tests.
Let's say we want to implement some custom reporter handler that can be used as a plugin for testlib. Pseudo-code of implementation can look like that:
```python
# File my_neofs_plugins/src/foo/bar/custom_handler.py
# File my_frostfs_plugins/src/foo/bar/custom_handler.py
from contextlib import AbstractContextManager
from neofs_testlib.reporter import ReporterHandler
from frostfs_testlib.reporter import ReporterHandler
class CustomHandler(ReporterHandler):
@ -63,18 +63,18 @@ class CustomHandler(ReporterHandler):
... some implementation ...
```
Then in the file `pyproject.toml` of "my_neofs_plugins" we should register entrypoint for this plugin. Entrypoint must belong to the group `neofs.testlib.reporter`:
Then in the file `pyproject.toml` of "my_frostfs_plugins" we should register entrypoint for this plugin. Entrypoint must belong to the group `frostfs.testlib.reporter`:
```yaml
# File my_neofs_plugins/pyproject.toml
[project.entry-points."neofs.testlib.reporter"]
# File my_frostfs_plugins/pyproject.toml
[project.entry-points."frostfs.testlib.reporter"]
my_custom_handler = "foo.bar.custom_handler:CustomHandler"
```
Finally, to use this handler in our test project "my_neofs_tests", we should configure reporter with name of the handler plugin:
Finally, to use this handler in our test project "my_frostfs_tests", we should configure reporter with name of the handler plugin:
```python
# File my_neofs_tests/src/conftest.py
from neofs_testlib.reporter import get_reporter
# File my_frostfs_tests/src/conftest.py
from frostfs_testlib.reporter import get_reporter
get_reporter().configure({ "handlers": [{"plugin_name": "my_custom_handler"}] })
```
@ -92,4 +92,4 @@ The library provides the following primary components:
## Contributing
Any contributions to the library should conform to the [contribution guideline](https://github.com/nspcc-dev/neofs-testlib/blob/master/CONTRIBUTING.md).
Any contributions to the library should conform to the [contribution guideline](https://github.com/TrueCloudLab/frostfs-testlib/blob/master/CONTRIBUTING.md).

View file

@ -3,9 +3,9 @@ requires = ["setuptools>=65.0.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "neofs-testlib"
name = "frostfs-testlib"
version = "1.1.1"
description = "Building blocks and utilities to facilitate development of automated tests for NeoFS system"
description = "Building blocks and utilities to facilitate development of automated tests for FrostFS system"
readme = "README.md"
authors = [{ name = "NSPCC", email = "info@nspcc.ru" }]
license = { text = "GNU General Public License v3 (GPLv3)" }
@ -14,7 +14,7 @@ classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
]
keywords = ["neofs", "test"]
keywords = ["frostfs", "test"]
dependencies = [
"allure-python-commons>=2.9.45",
"docker>=4.4.0",
@ -30,13 +30,13 @@ requires-python = ">=3.10"
dev = ["black", "bumpver", "isort", "pre-commit"]
[project.urls]
Homepage = "https://github.com/nspcc-dev/neofs-testlib"
Homepage = "https://github.com/TrueCloudLab/frostfs-testlib"
[project.entry-points."neofs.testlib.reporter"]
allure = "neofs_testlib.reporter.allure_handler:AllureHandler"
[project.entry-points."frostfs.testlib.reporter"]
allure = "frostfs_testlib.reporter.allure_handler:AllureHandler"
[project.entry-points."neofs.testlib.hosting"]
docker = "neofs_testlib.hosting.docker_host:DockerHost"
[project.entry-points."frostfs.testlib.hosting"]
docker = "frostfs_testlib.hosting.docker_host:DockerHost"
[tool.isort]
profile = "black"
@ -57,4 +57,4 @@ push = false
[tool.bumpver.file_patterns]
"pyproject.toml" = ['current_version = "{version}"', 'version = "{version}"']
"src/neofs_testlib/__init__.py" = ["{version}"]
"src/frostfs_testlib/__init__.py" = ["{version}"]

View file

@ -0,0 +1,2 @@
from frostfs_testlib.blockchain.multisig import Multisig
from frostfs_testlib.blockchain.rpc_client import RPCClient

View file

@ -1,4 +1,4 @@
from neofs_testlib.cli import NeoGo
from frostfs_testlib.cli import NeoGo
class Multisig:

View file

@ -6,7 +6,7 @@ from cli import NeoGo
from shell import Shell
from utils.converters import process_b64_bytearray
from neofs_testlib.blockchain import Multisig
from frostfs_testlib.blockchain import Multisig
class RoleDesignation:

View file

@ -4,7 +4,7 @@ from typing import Any, Dict, Optional
import requests
logger = logging.getLogger("neofs.testlib.blockchain")
logger = logging.getLogger("frostfs.testlib.blockchain")
class NeoRPCException(Exception):

View file

@ -0,0 +1,4 @@
from frostfs_testlib.cli.frostfs_adm import FrostfsAdm
from frostfs_testlib.cli.frostfs_authmate import FrostfsAuthmate
from frostfs_testlib.cli.frostfs_cli import FrostfsCli
from frostfs_testlib.cli.neogo import NeoGo, NetworkType

View file

@ -1,6 +1,6 @@
from typing import Optional
from neofs_testlib.shell import CommandOptions, CommandResult, InteractiveInput, Shell
from frostfs_testlib.shell import CommandOptions, CommandResult, InteractiveInput, Shell
class CliCommand:

View file

@ -0,0 +1 @@
from frostfs_testlib.cli.frostfs_adm.adm import FrostfsAdm

View file

@ -0,0 +1,22 @@
from typing import Optional
from frostfs_testlib.cli.frostfs_adm.config import FrostfsAdmConfig
from frostfs_testlib.cli.frostfs_adm.morph import FrostfsAdmMorph
from frostfs_testlib.cli.frostfs_adm.storage_config import FrostfsAdmStorageConfig
from frostfs_testlib.cli.frostfs_adm.subnet import FrostfsAdmMorphSubnet
from frostfs_testlib.cli.frostfs_adm.version import FrostfsAdmVersion
from frostfs_testlib.shell import Shell
class FrostfsAdm:
morph: Optional[FrostfsAdmMorph] = None
subnet: Optional[FrostfsAdmMorphSubnet] = None
storage_config: Optional[FrostfsAdmStorageConfig] = None
version: Optional[FrostfsAdmVersion] = None
def __init__(self, shell: Shell, frostfs_adm_exec_path: str, config_file: Optional[str] = None):
self.config = FrostfsAdmConfig(shell, frostfs_adm_exec_path, config=config_file)
self.morph = FrostfsAdmMorph(shell, frostfs_adm_exec_path, config=config_file)
self.subnet = FrostfsAdmMorphSubnet(shell, frostfs_adm_exec_path, config=config_file)
self.storage_config = FrostfsAdmStorageConfig(shell, frostfs_adm_exec_path, config=config_file)
self.version = FrostfsAdmVersion(shell, frostfs_adm_exec_path, config=config_file)

View file

@ -0,0 +1,22 @@
from frostfs_testlib.cli.cli_command import CliCommand
from frostfs_testlib.shell import CommandResult
class FrostfsAdmConfig(CliCommand):
def init(self, path: str = "~/.frostfs/adm/config.yml") -> CommandResult:
"""Initialize basic frostfs-adm configuration file.
Args:
path: Path to config (default ~/.frostfs/adm/config.yml).
Returns:
Command's result.
"""
return self._execute(
"config init",
**{
param: param_value
for param, param_value in locals().items()
if param not in ["self"]
},
)

View file

@ -1,10 +1,10 @@
from typing import Optional
from neofs_testlib.cli.cli_command import CliCommand
from neofs_testlib.shell import CommandResult
from frostfs_testlib.cli.cli_command import CliCommand
from frostfs_testlib.shell import CommandResult
class NeofsAdmMorph(CliCommand):
class FrostfsAdmMorph(CliCommand):
def deposit_notary(
self,
rpc_endpoint: str,
@ -88,7 +88,7 @@ class NeofsAdmMorph(CliCommand):
container_contract: Optional[str] = None,
dump: str = "./testlib_dump_container",
) -> CommandResult:
"""Dump NeoFS containers to file.
"""Dump FrostFS containers to file.
Args:
cid: Containers to dump.
@ -129,7 +129,7 @@ class NeofsAdmMorph(CliCommand):
def force_new_epoch(
self, rpc_endpoint: Optional[str] = None, alphabet: Optional[str] = None
) -> CommandResult:
"""Create new NeoFS epoch event in the side chain.
"""Create new FrostFS epoch event in the side chain.
Args:
alphabet: Path to alphabet wallets dir.
@ -218,9 +218,9 @@ class NeofsAdmMorph(CliCommand):
alphabet_wallets: Path to alphabet wallets dir.
container_alias_fee: Container alias fee (default 500).
container_fee: Container registration fee (default 1000).
contracts: Path to archive with compiled NeoFS contracts
contracts: Path to archive with compiled FrostFS contracts
(default fetched from latest github release).
epoch_duration: Amount of side chain blocks in one NeoFS epoch (default 240).
epoch_duration: Amount of side chain blocks in one FrostFS epoch (default 240).
homomorphic_disabled: Disable object homomorphic hashing.
local_dump: Path to the blocks dump file.
max_object_size: Max single object size in bytes (default 67108864).
@ -273,7 +273,7 @@ class NeofsAdmMorph(CliCommand):
cid: str,
dump: str,
) -> CommandResult:
"""Restore NeoFS containers from file.
"""Restore FrostFS containers from file.
Args:
alphabet_wallets: Path to alphabet wallets dir.
@ -335,11 +335,11 @@ class NeofsAdmMorph(CliCommand):
alphabet_wallets: str,
contracts: Optional[str] = None,
) -> CommandResult:
"""Update NeoFS contracts.
"""Update FrostFS contracts.
Args:
alphabet_wallets: Path to alphabet wallets dir.
contracts: Path to archive with compiled NeoFS contracts
contracts: Path to archive with compiled FrostFS contracts
(default fetched from latest github release).
rpc_endpoint: N3 RPC node endpoint.

View file

@ -1,10 +1,10 @@
from neofs_testlib.cli.cli_command import CliCommand
from neofs_testlib.shell import CommandResult
from frostfs_testlib.cli.cli_command import CliCommand
from frostfs_testlib.shell import CommandResult
class NeofsAdmStorageConfig(CliCommand):
class FrostfsAdmStorageConfig(CliCommand):
def set(self, account: str, wallet: str) -> CommandResult:
"""Initialize basic neofs-adm configuration file.
"""Initialize basic frostfs-adm configuration file.
Args:
account: Wallet account.

View file

@ -1,14 +1,14 @@
from typing import Optional
from neofs_testlib.cli.cli_command import CliCommand
from neofs_testlib.shell import CommandResult
from frostfs_testlib.cli.cli_command import CliCommand
from frostfs_testlib.shell import CommandResult
class NeofsAdmMorphSubnet(CliCommand):
class FrostfsAdmMorphSubnet(CliCommand):
def create(
self, rpc_endpoint: str, address: str, wallet: str, notary: bool = False
) -> CommandResult:
"""Create NeoFS subnet.
"""Create FrostFS subnet.
Args:
address: Address in the wallet, optional.
@ -29,7 +29,7 @@ class NeofsAdmMorphSubnet(CliCommand):
)
def get(self, rpc_endpoint: str, subnet: str) -> CommandResult:
"""Read information about the NeoFS subnet.
"""Read information about the FrostFS subnet.
Args:
rpc_endpoint: N3 RPC node endpoint.
@ -50,7 +50,7 @@ class NeofsAdmMorphSubnet(CliCommand):
def remove(
self, rpc_endpoint: str, wallet: str, subnet: str, address: Optional[str] = None
) -> CommandResult:
"""Remove NeoFS subnet.
"""Remove FrostFS subnet.
Args:
address: Address in the wallet, optional.
@ -80,7 +80,7 @@ class NeofsAdmMorphSubnet(CliCommand):
group: Optional[str] = None,
address: Optional[str] = None,
) -> CommandResult:
"""Add admin to the NeoFS subnet.
"""Add admin to the FrostFS subnet.
Args:
address: Address in the wallet, optional.
@ -112,7 +112,7 @@ class NeofsAdmMorphSubnet(CliCommand):
client: Optional[str] = None,
address: Optional[str] = None,
) -> CommandResult:
"""Remove admin of the NeoFS subnet.
"""Remove admin of the FrostFS subnet.
Args:
address: Address in the wallet, optional.
@ -143,7 +143,7 @@ class NeofsAdmMorphSubnet(CliCommand):
group: Optional[str] = None,
address: Optional[str] = None,
) -> CommandResult:
"""Add client to the NeoFS subnet.
"""Add client to the FrostFS subnet.
Args:
address: Address in the wallet, optional.
@ -174,7 +174,7 @@ class NeofsAdmMorphSubnet(CliCommand):
subnet: str,
address: Optional[str] = None,
) -> CommandResult:
"""Remove client of the NeoFS subnet.
"""Remove client of the FrostFS subnet.
Args:
address: Address in the wallet, optional.
@ -197,7 +197,7 @@ class NeofsAdmMorphSubnet(CliCommand):
)
def node_add(self, rpc_endpoint: str, wallet: str, node: str, subnet: str) -> CommandResult:
"""Add node to the NeoFS subnet.
"""Add node to the FrostFS subnet.
Args:
node: Hex-encoded public key of the node.
@ -218,7 +218,7 @@ class NeofsAdmMorphSubnet(CliCommand):
)
def node_remove(self, rpc_endpoint: str, wallet: str, node: str, subnet: str) -> CommandResult:
"""Remove node from the NeoFS subnet.
"""Remove node from the FrostFS subnet.
Args:
node: Hex-encoded public key of the node.

View file

@ -1,8 +1,8 @@
from neofs_testlib.cli.cli_command import CliCommand
from neofs_testlib.shell import CommandResult
from frostfs_testlib.cli.cli_command import CliCommand
from frostfs_testlib.shell import CommandResult
class NeofsAdmVersion(CliCommand):
class FrostfsAdmVersion(CliCommand):
def get(self) -> CommandResult:
"""Application version

View file

@ -0,0 +1 @@
from frostfs_testlib.cli.frostfs_authmate.authmate import FrostfsAuthmate

View file

@ -0,0 +1,14 @@
from typing import Optional
from frostfs_testlib.cli.frostfs_authmate.secret import FrostfsAuthmateSecret
from frostfs_testlib.cli.frostfs_authmate.version import FrostfsAuthmateVersion
from frostfs_testlib.shell import Shell
class FrostfsAuthmate:
secret: Optional[FrostfsAuthmateSecret] = None
version: Optional[FrostfsAuthmateVersion] = None
def __init__(self, shell: Shell, frostfs_authmate_exec_path: str):
self.secret = FrostfsAuthmateSecret(shell, frostfs_authmate_exec_path)
self.version = FrostfsAuthmateVersion(shell, frostfs_authmate_exec_path)

View file

@ -1,10 +1,10 @@
from typing import Optional, Union
from neofs_testlib.cli.cli_command import CliCommand
from neofs_testlib.shell import CommandResult
from frostfs_testlib.cli.cli_command import CliCommand
from frostfs_testlib.shell import CommandResult
class NeofsAuthmateSecret(CliCommand):
class FrostfsAuthmateSecret(CliCommand):
def obtain(
self,
wallet: str,
@ -15,13 +15,13 @@ class NeofsAuthmateSecret(CliCommand):
address: Optional[str] = None,
gate_address: Optional[str] = None,
) -> CommandResult:
"""Obtain a secret from NeoFS network.
"""Obtain a secret from FrostFS network.
Args:
wallet: Path to the wallet.
wallet_password: Wallet password.
address: Address of wallet account.
peer: Address of neofs peer to connect to.
peer: Address of frostfs peer to connect to.
gate_wallet: Path to the wallet.
gate_address: Address of wallet account.
access_key_id: Access key id for s3.
@ -55,13 +55,13 @@ class NeofsAuthmateSecret(CliCommand):
container_policy: Optional[str] = None,
aws_cli_credentials: Optional[str] = None,
) -> CommandResult:
"""Obtain a secret from NeoFS network
"""Obtain a secret from FrostFS network
Args:
wallet: Path to the wallet.
wallet_password: Wallet password.
address: Address of wallet account.
peer: Address of a neofs peer to connect to.
peer: Address of a frostfs peer to connect to.
bearer_rules: Rules for bearer token as plain json string.
gate_public_key: Public 256r1 key of a gate (send list[str] of keys to use multiple gates).
container_id: Auth container id to put the secret into.
@ -73,7 +73,7 @@ class NeofsAuthmateSecret(CliCommand):
lifetime: Lifetime of tokens. For example 50h30m (note: max time unit is an hour so to
set a day you should use 24h). It will be ceil rounded to the nearest amount of
epoch. (default: 720h0m0s).
container_policy: Mapping AWS storage class to NeoFS storage policy as plain json string
container_policy: Mapping AWS storage class to FrostFS storage policy as plain json string
or path to json file.
aws_cli_credentials: Path to the aws cli credential file.

View file

@ -1,8 +1,8 @@
from neofs_testlib.cli.cli_command import CliCommand
from neofs_testlib.shell import CommandResult
from frostfs_testlib.cli.cli_command import CliCommand
from frostfs_testlib.shell import CommandResult
class NeofsAuthmateVersion(CliCommand):
class FrostfsAuthmateVersion(CliCommand):
def get(self) -> CommandResult:
"""Application version

View file

@ -0,0 +1 @@
from frostfs_testlib.cli.frostfs_cli.cli import FrostfsCli

View file

@ -1,10 +1,10 @@
from typing import Optional
from neofs_testlib.cli.cli_command import CliCommand
from neofs_testlib.shell import CommandResult
from frostfs_testlib.cli.cli_command import CliCommand
from frostfs_testlib.shell import CommandResult
class NeofsCliAccounting(CliCommand):
class FrostfsCliAccounting(CliCommand):
def balance(
self,
wallet: Optional[str] = None,
@ -12,7 +12,7 @@ class NeofsCliAccounting(CliCommand):
address: Optional[str] = None,
owner: Optional[str] = None,
) -> CommandResult:
"""Get internal balance of NeoFS account
"""Get internal balance of FrostFS account
Args:
address: Address of wallet account.

View file

@ -1,10 +1,10 @@
from typing import Optional
from neofs_testlib.cli.cli_command import CliCommand
from neofs_testlib.shell import CommandResult
from frostfs_testlib.cli.cli_command import CliCommand
from frostfs_testlib.shell import CommandResult
class NeofsCliACL(CliCommand):
class FrostfsCliACL(CliCommand):
def extended_create(
self, cid: str, out: str, file: Optional[str] = None, rule: Optional[list] = None
) -> CommandResult:
@ -22,7 +22,7 @@ class NeofsCliACL(CliCommand):
Well-known system object headers start with '$Object:' prefix.
User defined headers start without prefix.
Read more about filter keys at:
http://github.com/nspcc-dev/neofs-api/blob/master/proto-docs/acl.md#message-eaclrecordfilter
http://github.com/TrueCloudLab/frostfs-api/blob/master/proto-docs/acl.md#message-eaclrecordfilter
Match is '=' for matching and '!=' for non-matching filter.
Value is a valid unicode string corresponding to object or request header value.

View file

@ -0,0 +1,38 @@
from typing import Optional
from frostfs_testlib.cli.frostfs_cli.accounting import FrostfsCliAccounting
from frostfs_testlib.cli.frostfs_cli.acl import FrostfsCliACL
from frostfs_testlib.cli.frostfs_cli.container import FrostfsCliContainer
from frostfs_testlib.cli.frostfs_cli.netmap import FrostfsCliNetmap
from frostfs_testlib.cli.frostfs_cli.object import FrostfsCliObject
from frostfs_testlib.cli.frostfs_cli.session import FrostfsCliSession
from frostfs_testlib.cli.frostfs_cli.shards import FrostfsCliShards
from frostfs_testlib.cli.frostfs_cli.storagegroup import FrostfsCliStorageGroup
from frostfs_testlib.cli.frostfs_cli.util import FrostfsCliUtil
from frostfs_testlib.cli.frostfs_cli.version import FrostfsCliVersion
from frostfs_testlib.shell import Shell
class FrostfsCli:
accounting: Optional[FrostfsCliAccounting] = None
acl: Optional[FrostfsCliACL] = None
container: Optional[FrostfsCliContainer] = None
netmap: Optional[FrostfsCliNetmap] = None
object: Optional[FrostfsCliObject] = None
session: Optional[FrostfsCliSession] = None
shards: Optional[FrostfsCliShards] = None
storagegroup: Optional[FrostfsCliStorageGroup] = None
util: Optional[FrostfsCliUtil] = None
version: Optional[FrostfsCliVersion] = None
def __init__(self, shell: Shell, frostfs_cli_exec_path: str, config_file: Optional[str] = None):
self.accounting = FrostfsCliAccounting(shell, frostfs_cli_exec_path, config=config_file)
self.acl = FrostfsCliACL(shell, frostfs_cli_exec_path, config=config_file)
self.container = FrostfsCliContainer(shell, frostfs_cli_exec_path, config=config_file)
self.netmap = FrostfsCliNetmap(shell, frostfs_cli_exec_path, config=config_file)
self.object = FrostfsCliObject(shell, frostfs_cli_exec_path, config=config_file)
self.session = FrostfsCliSession(shell, frostfs_cli_exec_path, config=config_file)
self.shards = FrostfsCliShards(shell, frostfs_cli_exec_path, config=config_file)
self.storagegroup = FrostfsCliStorageGroup(shell, frostfs_cli_exec_path, config=config_file)
self.util = FrostfsCliUtil(shell, frostfs_cli_exec_path, config=config_file)
self.version = FrostfsCliVersion(shell, frostfs_cli_exec_path, config=config_file)

View file

@ -1,10 +1,10 @@
from typing import Optional
from neofs_testlib.cli.cli_command import CliCommand
from neofs_testlib.shell import CommandResult
from frostfs_testlib.cli.cli_command import CliCommand
from frostfs_testlib.shell import CommandResult
class NeofsCliContainer(CliCommand):
class FrostfsCliContainer(CliCommand):
def create(
self,
rpc_endpoint: str,
@ -24,7 +24,7 @@ class NeofsCliContainer(CliCommand):
timeout: Optional[str] = None,
) -> CommandResult:
"""
Create a new container and register it in the NeoFS.
Create a new container and register it in the FrostFS.
It will be stored in the sidechain when the Inner Ring accepts it.
Args:

View file

@ -1,10 +1,10 @@
from typing import Optional
from neofs_testlib.cli.cli_command import CliCommand
from neofs_testlib.shell import CommandResult
from frostfs_testlib.cli.cli_command import CliCommand
from frostfs_testlib.shell import CommandResult
class NeofsCliNetmap(CliCommand):
class FrostfsCliNetmap(CliCommand):
def epoch(
self,
rpc_endpoint: str,
@ -43,7 +43,7 @@ class NeofsCliNetmap(CliCommand):
xhdr: Optional[dict] = None,
) -> CommandResult:
"""
Get information about NeoFS network.
Get information about FrostFS network.
Args:
address: Address of wallet account

View file

@ -1,10 +1,10 @@
from typing import Optional
from neofs_testlib.cli.cli_command import CliCommand
from neofs_testlib.shell import CommandResult
from frostfs_testlib.cli.cli_command import CliCommand
from frostfs_testlib.shell import CommandResult
class NeofsCliObject(CliCommand):
class FrostfsCliObject(CliCommand):
def delete(
self,
rpc_endpoint: str,
@ -19,7 +19,7 @@ class NeofsCliObject(CliCommand):
timeout: Optional[str] = None,
) -> CommandResult:
"""
Delete object from NeoFS.
Delete object from FrostFS.
Args:
address: Address of wallet account.
@ -59,7 +59,7 @@ class NeofsCliObject(CliCommand):
timeout: Optional[str] = None,
) -> CommandResult:
"""
Get object from NeoFS.
Get object from FrostFS.
Args:
address: Address of wallet account.
@ -235,7 +235,7 @@ class NeofsCliObject(CliCommand):
timeout: Optional[str] = None,
) -> CommandResult:
"""
Put object to NeoFS.
Put object to FrostFS.
Args:
address: Address of wallet account.

View file

@ -1,10 +1,10 @@
from typing import Optional
from neofs_testlib.cli.cli_command import CliCommand
from neofs_testlib.shell import CommandResult
from frostfs_testlib.cli.cli_command import CliCommand
from frostfs_testlib.shell import CommandResult
class NeofsCliSession(CliCommand):
class FrostfsCliSession(CliCommand):
def create(
self,
rpc_endpoint: str,

View file

@ -1,10 +1,10 @@
from typing import Optional
from neofs_testlib.cli.cli_command import CliCommand
from neofs_testlib.shell import CommandResult
from frostfs_testlib.cli.cli_command import CliCommand
from frostfs_testlib.shell import CommandResult
class NeofsCliShards(CliCommand):
class FrostfsCliShards(CliCommand):
def flush_cache(
self,
endpoint: str,

View file

@ -1,10 +1,10 @@
from typing import Optional
from neofs_testlib.cli.cli_command import CliCommand
from neofs_testlib.shell import CommandResult
from frostfs_testlib.cli.cli_command import CliCommand
from frostfs_testlib.shell import CommandResult
class NeofsCliStorageGroup(CliCommand):
class FrostfsCliStorageGroup(CliCommand):
def put(
self,
rpc_endpoint: str,
@ -18,7 +18,7 @@ class NeofsCliStorageGroup(CliCommand):
xhdr: Optional[dict] = None,
) -> CommandResult:
"""
Put storage group to NeoFS.
Put storage group to FrostFS.
Args:
address: Address of wallet account.
@ -54,7 +54,7 @@ class NeofsCliStorageGroup(CliCommand):
xhdr: Optional[dict] = None,
) -> CommandResult:
"""
Get storage group from NeoFS.
Get storage group from FrostFS.
Args:
address: Address of wallet account.
@ -89,7 +89,7 @@ class NeofsCliStorageGroup(CliCommand):
xhdr: Optional[dict] = None,
) -> CommandResult:
"""
List storage groups in NeoFS container.
List storage groups in FrostFS container.
Args:
address: Address of wallet account.
@ -124,7 +124,7 @@ class NeofsCliStorageGroup(CliCommand):
xhdr: Optional[dict] = None,
) -> CommandResult:
"""
Delete storage group from NeoFS.
Delete storage group from FrostFS.
Args:
address: Address of wallet account.

View file

@ -1,10 +1,10 @@
from typing import Optional
from neofs_testlib.cli.cli_command import CliCommand
from neofs_testlib.shell import CommandResult
from frostfs_testlib.cli.cli_command import CliCommand
from frostfs_testlib.shell import CommandResult
class NeofsCliUtil(CliCommand):
class FrostfsCliUtil(CliCommand):
def sign_bearer_token(
self,
wallet: str,

View file

@ -0,0 +1,13 @@
from frostfs_testlib.cli.cli_command import CliCommand
from frostfs_testlib.shell import CommandResult
class FrostfsCliVersion(CliCommand):
def get(self) -> CommandResult:
"""
Application version and FrostFS API compatibility.
Returns:
Command's result.
"""
return self._execute("", version=True)

View file

@ -0,0 +1,2 @@
from frostfs_testlib.cli.neogo.go import NeoGo
from frostfs_testlib.cli.neogo.network_type import NetworkType

View file

@ -1,7 +1,7 @@
from typing import Optional
from neofs_testlib.cli.cli_command import CliCommand
from neofs_testlib.shell import CommandResult
from frostfs_testlib.cli.cli_command import CliCommand
from frostfs_testlib.shell import CommandResult
class NeoGoCandidate(CliCommand):

View file

@ -1,7 +1,7 @@
from typing import Optional
from neofs_testlib.cli.cli_command import CliCommand
from neofs_testlib.shell import CommandResult
from frostfs_testlib.cli.cli_command import CliCommand
from frostfs_testlib.shell import CommandResult
class NeoGoContract(CliCommand):

View file

@ -1,8 +1,8 @@
from typing import Optional
from neofs_testlib.cli.cli_command import CliCommand
from neofs_testlib.cli.neogo.network_type import NetworkType
from neofs_testlib.shell import CommandResult
from frostfs_testlib.cli.cli_command import CliCommand
from frostfs_testlib.cli.neogo.network_type import NetworkType
from frostfs_testlib.shell import CommandResult
class NeoGoDb(CliCommand):

View file

@ -1,14 +1,14 @@
from typing import Optional
from neofs_testlib.cli.neogo.candidate import NeoGoCandidate
from neofs_testlib.cli.neogo.contract import NeoGoContract
from neofs_testlib.cli.neogo.db import NeoGoDb
from neofs_testlib.cli.neogo.nep17 import NeoGoNep17
from neofs_testlib.cli.neogo.node import NeoGoNode
from neofs_testlib.cli.neogo.query import NeoGoQuery
from neofs_testlib.cli.neogo.version import NeoGoVersion
from neofs_testlib.cli.neogo.wallet import NeoGoWallet
from neofs_testlib.shell import Shell
from frostfs_testlib.cli.neogo.candidate import NeoGoCandidate
from frostfs_testlib.cli.neogo.contract import NeoGoContract
from frostfs_testlib.cli.neogo.db import NeoGoDb
from frostfs_testlib.cli.neogo.nep17 import NeoGoNep17
from frostfs_testlib.cli.neogo.node import NeoGoNode
from frostfs_testlib.cli.neogo.query import NeoGoQuery
from frostfs_testlib.cli.neogo.version import NeoGoVersion
from frostfs_testlib.cli.neogo.wallet import NeoGoWallet
from frostfs_testlib.shell import Shell
class NeoGo:

View file

@ -1,7 +1,7 @@
from typing import Optional
from neofs_testlib.cli.cli_command import CliCommand
from neofs_testlib.shell import CommandResult
from frostfs_testlib.cli.cli_command import CliCommand
from frostfs_testlib.shell import CommandResult
class NeoGoNep17(CliCommand):

View file

@ -1,6 +1,6 @@
from neofs_testlib.cli.cli_command import CliCommand
from neofs_testlib.cli.neogo.network_type import NetworkType
from neofs_testlib.shell import CommandResult
from frostfs_testlib.cli.cli_command import CliCommand
from frostfs_testlib.cli.neogo.network_type import NetworkType
from frostfs_testlib.shell import CommandResult
class NeoGoNode(CliCommand):

View file

@ -1,5 +1,5 @@
from neofs_testlib.cli.cli_command import CliCommand
from neofs_testlib.shell import CommandResult
from frostfs_testlib.cli.cli_command import CliCommand
from frostfs_testlib.shell import CommandResult
class NeoGoQuery(CliCommand):

View file

@ -1,5 +1,5 @@
from neofs_testlib.cli.cli_command import CliCommand
from neofs_testlib.shell import CommandResult
from frostfs_testlib.cli.cli_command import CliCommand
from frostfs_testlib.shell import CommandResult
class NeoGoVersion(CliCommand):

View file

@ -1,7 +1,7 @@
from typing import Optional
from neofs_testlib.cli.cli_command import CliCommand
from neofs_testlib.shell import CommandResult
from frostfs_testlib.cli.cli_command import CliCommand
from frostfs_testlib.shell import CommandResult
class NeoGoWallet(CliCommand):

View file

@ -0,0 +1,3 @@
from frostfs_testlib.hosting.config import CLIConfig, HostConfig, ServiceConfig
from frostfs_testlib.hosting.hosting import Hosting
from frostfs_testlib.hosting.interfaces import Host

View file

@ -10,12 +10,12 @@ from typing import Any, Optional
import docker
from requests import HTTPError
from neofs_testlib.hosting.config import ParsedAttributes
from neofs_testlib.hosting.interfaces import DiskInfo, Host
from neofs_testlib.shell import LocalShell, Shell, SSHShell
from neofs_testlib.shell.command_inspectors import SudoInspector
from frostfs_testlib.hosting.config import ParsedAttributes
from frostfs_testlib.hosting.interfaces import Host
from frostfs_testlib.shell import LocalShell, Shell, SSHShell
from frostfs_testlib.shell.command_inspectors import SudoInspector
logger = logging.getLogger("neofs.testlib.hosting")
logger = logging.getLogger("frostfs.testlib.hosting")
@dataclass
@ -142,15 +142,6 @@ class DockerHost(Host):
cmd = f"{meta_clean_cmd}{data_clean_cmd}"
shell.exec(cmd)
def attach_disk(self, device: str, disk_info: DiskInfo) -> None:
raise NotImplementedError("Not supported for docker")
def detach_disk(self, device: str) -> DiskInfo:
raise NotImplementedError("Not supported for docker")
def is_disk_attached(self, device: str, disk_info: DiskInfo) -> bool:
raise NotImplementedError("Not supported for docker")
def dump_logs(
self,
directory_path: str,

View file

@ -1,9 +1,9 @@
import re
from typing import Any
from neofs_testlib.hosting.config import HostConfig, ServiceConfig
from neofs_testlib.hosting.interfaces import Host
from neofs_testlib.plugins import load_plugin
from frostfs_testlib.hosting.config import HostConfig, ServiceConfig
from frostfs_testlib.hosting.interfaces import Host
from frostfs_testlib.plugins import load_plugin
class Hosting:
@ -36,7 +36,7 @@ class Hosting:
host_configs = [HostConfig(**host_config) for host_config in config["hosts"]]
for host_config in host_configs:
host_class = load_plugin("neofs.testlib.hosting", host_config.plugin_name)
host_class = load_plugin("frostfs.testlib.hosting", host_config.plugin_name)
host = host_class(host_config)
hosts.append(host)

View file

@ -2,8 +2,8 @@ from abc import ABC, abstractmethod
from datetime import datetime
from typing import Any, Optional
from neofs_testlib.hosting.config import CLIConfig, HostConfig, ServiceConfig
from neofs_testlib.shell.interfaces import Shell
from frostfs_testlib.hosting.config import CLIConfig, HostConfig, ServiceConfig
from frostfs_testlib.shell.interfaces import Shell
class DiskInfo(dict):

View file

@ -1,6 +1,6 @@
from neofs_testlib.reporter.allure_handler import AllureHandler
from neofs_testlib.reporter.interfaces import ReporterHandler
from neofs_testlib.reporter.reporter import Reporter
from frostfs_testlib.reporter.allure_handler import AllureHandler
from frostfs_testlib.reporter.interfaces import ReporterHandler
from frostfs_testlib.reporter.reporter import Reporter
__reporter = Reporter()

View file

@ -6,7 +6,7 @@ from typing import Any
import allure
from allure import attachment_type
from neofs_testlib.reporter.interfaces import ReporterHandler
from frostfs_testlib.reporter.interfaces import ReporterHandler
class AllureHandler(ReporterHandler):

View file

@ -2,8 +2,8 @@ from contextlib import AbstractContextManager, contextmanager
from types import TracebackType
from typing import Any, Optional
from neofs_testlib.plugins import load_plugin
from neofs_testlib.reporter.interfaces import ReporterHandler
from frostfs_testlib.plugins import load_plugin
from frostfs_testlib.reporter.interfaces import ReporterHandler
@contextmanager
@ -42,7 +42,7 @@ class Reporter:
# Setup handlers from the specified config
handler_configs = config.get("handlers", [])
for handler_config in handler_configs:
handler_class = load_plugin("neofs.testlib.reporter", handler_config["plugin_name"])
handler_class = load_plugin("frostfs.testlib.reporter", handler_config["plugin_name"])
self.register_handler(handler_class())
def step(self, name: str) -> AbstractContextManager:

View file

@ -0,0 +1,3 @@
from frostfs_testlib.shell.interfaces import CommandOptions, CommandResult, InteractiveInput, Shell
from frostfs_testlib.shell.local_shell import LocalShell
from frostfs_testlib.shell.ssh_shell import SSHShell

View file

@ -1,4 +1,4 @@
from neofs_testlib.shell.interfaces import CommandInspector
from frostfs_testlib.shell.interfaces import CommandInspector
class SudoInspector(CommandInspector):

View file

@ -6,10 +6,10 @@ from typing import IO, Optional
import pexpect
from neofs_testlib.reporter import get_reporter
from neofs_testlib.shell.interfaces import CommandInspector, CommandOptions, CommandResult, Shell
from frostfs_testlib.reporter import get_reporter
from frostfs_testlib.shell.interfaces import CommandInspector, CommandOptions, CommandResult, Shell
logger = logging.getLogger("neofs.testlib.shell")
logger = logging.getLogger("frostfs.testlib.shell")
reporter = get_reporter()

View file

@ -19,10 +19,10 @@ from paramiko import (
)
from paramiko.ssh_exception import AuthenticationException
from neofs_testlib.reporter import get_reporter
from neofs_testlib.shell.interfaces import CommandInspector, CommandOptions, CommandResult, Shell
from frostfs_testlib.reporter import get_reporter
from frostfs_testlib.shell.interfaces import CommandInspector, CommandOptions, CommandResult, Shell
logger = logging.getLogger("neofs.testlib.shell")
logger = logging.getLogger("frostfs.testlib.shell")
reporter = get_reporter()

View file

@ -4,7 +4,7 @@ import logging
from neo3.wallet import wallet as neo3_wallet
from neo3.wallet import account as neo3_account
logger = logging.getLogger("neofs.testlib.utils")
logger = logging.getLogger("frostfs.testlib.utils")
def init_wallet(wallet_path: str, wallet_password: str):

View file

@ -1,2 +0,0 @@
from neofs_testlib.blockchain.multisig import Multisig
from neofs_testlib.blockchain.rpc_client import RPCClient

View file

@ -1,4 +0,0 @@
from neofs_testlib.cli.neofs_adm import NeofsAdm
from neofs_testlib.cli.neofs_authmate import NeofsAuthmate
from neofs_testlib.cli.neofs_cli import NeofsCli
from neofs_testlib.cli.neogo import NeoGo, NetworkType

View file

@ -1 +0,0 @@
from neofs_testlib.cli.neofs_adm.adm import NeofsAdm

View file

@ -1,22 +0,0 @@
from typing import Optional
from neofs_testlib.cli.neofs_adm.config import NeofsAdmConfig
from neofs_testlib.cli.neofs_adm.morph import NeofsAdmMorph
from neofs_testlib.cli.neofs_adm.storage_config import NeofsAdmStorageConfig
from neofs_testlib.cli.neofs_adm.subnet import NeofsAdmMorphSubnet
from neofs_testlib.cli.neofs_adm.version import NeofsAdmVersion
from neofs_testlib.shell import Shell
class NeofsAdm:
morph: Optional[NeofsAdmMorph] = None
subnet: Optional[NeofsAdmMorphSubnet] = None
storage_config: Optional[NeofsAdmStorageConfig] = None
version: Optional[NeofsAdmVersion] = None
def __init__(self, shell: Shell, neofs_adm_exec_path: str, config_file: Optional[str] = None):
self.config = NeofsAdmConfig(shell, neofs_adm_exec_path, config=config_file)
self.morph = NeofsAdmMorph(shell, neofs_adm_exec_path, config=config_file)
self.subnet = NeofsAdmMorphSubnet(shell, neofs_adm_exec_path, config=config_file)
self.storage_config = NeofsAdmStorageConfig(shell, neofs_adm_exec_path, config=config_file)
self.version = NeofsAdmVersion(shell, neofs_adm_exec_path, config=config_file)

View file

@ -1,22 +0,0 @@
from neofs_testlib.cli.cli_command import CliCommand
from neofs_testlib.shell import CommandResult
class NeofsAdmConfig(CliCommand):
def init(self, path: str = "~/.neofs/adm/config.yml") -> CommandResult:
"""Initialize basic neofs-adm configuration file.
Args:
path: Path to config (default ~/.neofs/adm/config.yml).
Returns:
Command's result.
"""
return self._execute(
"config init",
**{
param: param_value
for param, param_value in locals().items()
if param not in ["self"]
},
)

View file

@ -1 +0,0 @@
from neofs_testlib.cli.neofs_authmate.authmate import NeofsAuthmate

View file

@ -1,14 +0,0 @@
from typing import Optional
from neofs_testlib.cli.neofs_authmate.secret import NeofsAuthmateSecret
from neofs_testlib.cli.neofs_authmate.version import NeofsAuthmateVersion
from neofs_testlib.shell import Shell
class NeofsAuthmate:
secret: Optional[NeofsAuthmateSecret] = None
version: Optional[NeofsAuthmateVersion] = None
def __init__(self, shell: Shell, neofs_authmate_exec_path: str):
self.secret = NeofsAuthmateSecret(shell, neofs_authmate_exec_path)
self.version = NeofsAuthmateVersion(shell, neofs_authmate_exec_path)

View file

@ -1 +0,0 @@
from neofs_testlib.cli.neofs_cli.cli import NeofsCli

View file

@ -1,38 +0,0 @@
from typing import Optional
from neofs_testlib.cli.neofs_cli.accounting import NeofsCliAccounting
from neofs_testlib.cli.neofs_cli.acl import NeofsCliACL
from neofs_testlib.cli.neofs_cli.container import NeofsCliContainer
from neofs_testlib.cli.neofs_cli.netmap import NeofsCliNetmap
from neofs_testlib.cli.neofs_cli.object import NeofsCliObject
from neofs_testlib.cli.neofs_cli.session import NeofsCliSession
from neofs_testlib.cli.neofs_cli.shards import NeofsCliShards
from neofs_testlib.cli.neofs_cli.storagegroup import NeofsCliStorageGroup
from neofs_testlib.cli.neofs_cli.util import NeofsCliUtil
from neofs_testlib.cli.neofs_cli.version import NeofsCliVersion
from neofs_testlib.shell import Shell
class NeofsCli:
accounting: Optional[NeofsCliAccounting] = None
acl: Optional[NeofsCliACL] = None
container: Optional[NeofsCliContainer] = None
netmap: Optional[NeofsCliNetmap] = None
object: Optional[NeofsCliObject] = None
session: Optional[NeofsCliSession] = None
shards: Optional[NeofsCliShards] = None
storagegroup: Optional[NeofsCliStorageGroup] = None
util: Optional[NeofsCliUtil] = None
version: Optional[NeofsCliVersion] = None
def __init__(self, shell: Shell, neofs_cli_exec_path: str, config_file: Optional[str] = None):
self.accounting = NeofsCliAccounting(shell, neofs_cli_exec_path, config=config_file)
self.acl = NeofsCliACL(shell, neofs_cli_exec_path, config=config_file)
self.container = NeofsCliContainer(shell, neofs_cli_exec_path, config=config_file)
self.netmap = NeofsCliNetmap(shell, neofs_cli_exec_path, config=config_file)
self.object = NeofsCliObject(shell, neofs_cli_exec_path, config=config_file)
self.session = NeofsCliSession(shell, neofs_cli_exec_path, config=config_file)
self.shards = NeofsCliShards(shell, neofs_cli_exec_path, config=config_file)
self.storagegroup = NeofsCliStorageGroup(shell, neofs_cli_exec_path, config=config_file)
self.util = NeofsCliUtil(shell, neofs_cli_exec_path, config=config_file)
self.version = NeofsCliVersion(shell, neofs_cli_exec_path, config=config_file)

View file

@ -1,13 +0,0 @@
from neofs_testlib.cli.cli_command import CliCommand
from neofs_testlib.shell import CommandResult
class NeofsCliVersion(CliCommand):
def get(self) -> CommandResult:
"""
Application version and NeoFS API compatibility.
Returns:
Command's result.
"""
return self._execute("", version=True)

View file

@ -1,2 +0,0 @@
from neofs_testlib.cli.neogo.go import NeoGo
from neofs_testlib.cli.neogo.network_type import NetworkType

View file

@ -1,3 +0,0 @@
from neofs_testlib.hosting.config import CLIConfig, HostConfig, ServiceConfig
from neofs_testlib.hosting.hosting import Hosting
from neofs_testlib.hosting.interfaces import Host

View file

@ -1,3 +0,0 @@
from neofs_testlib.shell.interfaces import CommandOptions, CommandResult, InteractiveInput, Shell
from neofs_testlib.shell.local_shell import LocalShell
from neofs_testlib.shell.ssh_shell import SSHShell

View file

@ -1,6 +1,6 @@
import traceback
from neofs_testlib.shell.interfaces import CommandResult
from frostfs_testlib.shell.interfaces import CommandResult
def format_error_details(error: Exception) -> str:

View file

@ -1,15 +1,15 @@
from unittest import TestCase
from unittest.mock import Mock
from neofs_testlib.cli import NeofsAdm, NeofsCli, NeoGo
from neofs_testlib.cli.cli_command import CliCommand
from neofs_testlib.shell.interfaces import CommandOptions, InteractiveInput
from frostfs_testlib.cli import FrostfsAdm, FrostfsCli, NeoGo
from frostfs_testlib.cli.cli_command import CliCommand
from frostfs_testlib.shell.interfaces import CommandOptions, InteractiveInput
class TestCli(TestCase):
neofs_adm_exec_path = "neo-adm-exec"
neofs_go_exec_path = "neo-go-exec"
neofs_cli_exec_path = "neo-cli-exec"
frostfs_adm_exec_path = "neo-adm-exec"
frostfs_go_exec_path = "neo-go-exec"
frostfs_cli_exec_path = "neo-cli-exec"
address = "0x0000000000000000000"
addresses = ["0x000000", "0xDEADBEEF", "0xBABECAFE"]
@ -30,12 +30,12 @@ class TestCli(TestCase):
def test_container_create(self):
shell = Mock()
neofs_cli = NeofsCli(
frostfs_cli = FrostfsCli(
config_file=self.config_file,
neofs_cli_exec_path=self.neofs_cli_exec_path,
frostfs_cli_exec_path=self.frostfs_cli_exec_path,
shell=shell,
)
neofs_cli.container.create(
frostfs_cli.container.create(
rpc_endpoint=self.rpc_endpoint,
wallet=self.wallet,
basic_acl=self.basic_acl,
@ -46,7 +46,7 @@ class TestCli(TestCase):
xhdr = ",".join(f"{param}={value}" for param, value in self.xhdr.items())
expected_command = (
f"{self.neofs_cli_exec_path} --config {self.config_file} container create "
f"{self.frostfs_cli_exec_path} --config {self.config_file} container create "
f"--rpc-endpoint '{self.rpc_endpoint}' --wallet '{self.wallet}' "
f"--basic-acl '{self.basic_acl}' --await --policy '{self.policy}' "
f"--xhdr '{xhdr}'"
@ -57,7 +57,7 @@ class TestCli(TestCase):
def test_bad_wallet_argument(self):
shell = Mock()
neo_go = NeoGo(
shell=shell, config_path=self.config_file, neo_go_exec_path=self.neofs_go_exec_path
shell=shell, config_path=self.config_file, neo_go_exec_path=self.frostfs_go_exec_path
)
with self.assertRaises(Exception) as exc_msg:
neo_go.contract.add_group(
@ -88,7 +88,7 @@ class TestCli(TestCase):
def test_wallet_sign(self):
shell = Mock()
neo_go = NeoGo(
shell=shell, config_path=self.config_file, neo_go_exec_path=self.neofs_go_exec_path
shell=shell, config_path=self.config_file, neo_go_exec_path=self.frostfs_go_exec_path
)
neo_go.wallet.sign(
input_file=self.file1,
@ -101,7 +101,7 @@ class TestCli(TestCase):
)
expected_command = (
f"{self.neofs_go_exec_path} --config_path {self.config_file} wallet sign "
f"{self.frostfs_go_exec_path} --config_path {self.config_file} wallet sign "
f"--input-file '{self.file1}' --address '{self.address}' "
f"--rpc-endpoint '{self.rpc_endpoint}' --wallet '{self.wallet}' "
f"--out '{self.file2}' --timeout '{self.timeout}s'"
@ -118,12 +118,12 @@ class TestCli(TestCase):
def test_subnet_create(self):
shell = Mock()
neofs_adm = NeofsAdm(
frostfs_adm = FrostfsAdm(
config_file=self.config_file,
neofs_adm_exec_path=self.neofs_adm_exec_path,
frostfs_adm_exec_path=self.frostfs_adm_exec_path,
shell=shell,
)
neofs_adm.subnet.create(
frostfs_adm.subnet.create(
address=self.address,
rpc_endpoint=self.rpc_endpoint,
wallet=self.wallet,
@ -131,7 +131,7 @@ class TestCli(TestCase):
)
expected_command = (
f"{self.neofs_adm_exec_path} --config {self.config_file} morph subnet create "
f"{self.frostfs_adm_exec_path} --config {self.config_file} morph subnet create "
f"--rpc-endpoint '{self.rpc_endpoint}' --address '{self.address}' "
f"--wallet '{self.wallet}' --notary"
)
@ -141,7 +141,7 @@ class TestCli(TestCase):
def test_wallet_nep17_multitransfer(self):
shell = Mock()
neo_go = NeoGo(
shell=shell, config_path=self.config_file, neo_go_exec_path=self.neofs_go_exec_path
shell=shell, config_path=self.config_file, neo_go_exec_path=self.frostfs_go_exec_path
)
neo_go.nep17.multitransfer(
wallet=self.wallet,
@ -157,7 +157,7 @@ class TestCli(TestCase):
to_address = "".join(f" --to '{address}'" for address in self.addresses)
expected_command = (
f"{self.neofs_go_exec_path} --config_path {self.config_file} "
f"{self.frostfs_go_exec_path} --config_path {self.config_file} "
f"wallet nep17 multitransfer --token '{self.token}'"
f"{to_address} --sysgas '{self.sysgas}' --rpc-endpoint '{self.rpc_endpoint}' "
f"--wallet '{self.wallet}' --from '{self.address}' --force --amount {self.amount} "
@ -168,7 +168,7 @@ class TestCli(TestCase):
def test_version(self):
shell = Mock()
neofs_adm = NeofsAdm(shell=shell, neofs_adm_exec_path=self.neofs_adm_exec_path)
neofs_adm.version.get()
frostfs_adm = FrostfsAdm(shell=shell, frostfs_adm_exec_path=self.frostfs_adm_exec_path)
frostfs_adm.version.get()
shell.exec.assert_called_once_with(f"{self.neofs_adm_exec_path} --version")
shell.exec.assert_called_once_with(f"{self.frostfs_adm_exec_path} --version")

View file

@ -1,6 +1,6 @@
from unittest import TestCase
from neofs_testlib.utils import converters
from frostfs_testlib.utils import converters
class TestConverters(TestCase):

View file

@ -1,6 +1,6 @@
from unittest import TestCase
from neofs_testlib.hosting import CLIConfig, Hosting, ServiceConfig
from frostfs_testlib.hosting import CLIConfig, Hosting, ServiceConfig
class TestHosting(TestCase):

View file

@ -1,7 +1,7 @@
from unittest import TestCase
from neofs_testlib.shell.interfaces import CommandOptions, InteractiveInput
from neofs_testlib.shell.local_shell import LocalShell
from frostfs_testlib.shell.interfaces import CommandOptions, InteractiveInput
from frostfs_testlib.shell.local_shell import LocalShell
from tests.helpers import format_error_details, get_output_lines

View file

@ -4,7 +4,7 @@ from typing import Optional
from unittest import TestCase
from unittest.mock import MagicMock
from neofs_testlib.reporter import Reporter
from frostfs_testlib.reporter import Reporter
class TestLocalShellInteractive(TestCase):

View file

@ -1,8 +1,9 @@
import os
from unittest import SkipTest, TestCase
from neofs_testlib.shell.interfaces import CommandOptions, InteractiveInput
from neofs_testlib.shell.ssh_shell import SSHShell
from frostfs_testlib.shell.interfaces import CommandOptions, InteractiveInput
from frostfs_testlib.shell.ssh_shell import SSHShell
from tests.helpers import format_error_details, get_output_lines

View file

@ -5,7 +5,7 @@ from uuid import uuid4
from neo3.wallet.wallet import Wallet
from neofs_testlib.utils.wallet import init_wallet, get_last_address_from_wallet
from frostfs_testlib.utils.wallet import init_wallet, get_last_address_from_wallet
class TestWallet(TestCase):