Rename to frostfs

Signed-off-by: Yulia Kovshova <y.kovshova@yadro.com>
This commit is contained in:
Юлия Ковшова 2023-01-09 15:46:03 +03:00 committed by Julia Kovshova
parent f6056a4f79
commit 19809c5641
67 changed files with 392 additions and 368 deletions

View file

@ -5,98 +5,98 @@ hosts:
- name: s01 - name: s01
attributes: attributes:
container_name: s01 container_name: s01
config_path: ../neofs-dev-env/services/storage/.storage.env config_path: ../frostfs-dev-env/services/storage/.storage.env
wallet_path: ../neofs-dev-env/services/storage/wallet01.json wallet_path: ../frostfs-dev-env/services/storage/wallet01.json
local_config_path: ./TemporaryDir/empty-password.yml local_config_path: ./TemporaryDir/empty-password.yml
local_wallet_path: ../neofs-dev-env/services/storage/wallet01.json local_wallet_path: ../frostfs-dev-env/services/storage/wallet01.json
wallet_password: "" wallet_password: ""
volume_name: storage_storage_s01 volume_name: storage_storage_s01
endpoint_data0: s01.neofs.devenv:8080 endpoint_data0: s01.frostfs.devenv:8080
control_endpoint: s01.neofs.devenv:8081 control_endpoint: s01.frostfs.devenv:8081
un_locode: "RU MOW" un_locode: "RU MOW"
- name: s02 - name: s02
attributes: attributes:
container_name: s02 container_name: s02
config_path: ../neofs-dev-env/services/storage/.storage.env config_path: ../frostfs-dev-env/services/storage/.storage.env
wallet_path: ../neofs-dev-env/services/storage/wallet02.json wallet_path: ../frostfs-dev-env/services/storage/wallet02.json
local_config_path: ./TemporaryDir/empty-password.yml local_config_path: ./TemporaryDir/empty-password.yml
local_wallet_path: ../neofs-dev-env/services/storage/wallet02.json local_wallet_path: ../frostfs-dev-env/services/storage/wallet02.json
wallet_password: "" wallet_password: ""
volume_name: storage_storage_s02 volume_name: storage_storage_s02
endpoint_data0: s02.neofs.devenv:8080 endpoint_data0: s02.frostfs.devenv:8080
control_endpoint: s02.neofs.devenv:8081 control_endpoint: s02.frostfs.devenv:8081
un_locode: "RU LED" un_locode: "RU LED"
- name: s03 - name: s03
attributes: attributes:
container_name: s03 container_name: s03
config_path: ../neofs-dev-env/services/storage/.storage.env config_path: ../frostfs-dev-env/services/storage/.storage.env
wallet_path: ../neofs-dev-env/services/storage/wallet03.json wallet_path: ../frostfs-dev-env/services/storage/wallet03.json
local_config_path: ./TemporaryDir/empty-password.yml local_config_path: ./TemporaryDir/empty-password.yml
local_wallet_path: ../neofs-dev-env/services/storage/wallet03.json local_wallet_path: ../frostfs-dev-env/services/storage/wallet03.json
wallet_password: "" wallet_password: ""
volume_name: storage_storage_s03 volume_name: storage_storage_s03
endpoint_data0: s03.neofs.devenv:8080 endpoint_data0: s03.frostfs.devenv:8080
control_endpoint: s03.neofs.devenv:8081 control_endpoint: s03.frostfs.devenv:8081
un_locode: "SE STO" un_locode: "SE STO"
- name: s04 - name: s04
attributes: attributes:
container_name: s04 container_name: s04
config_path: ../neofs-dev-env/services/storage/.storage.env config_path: ../frostfs-dev-env/services/storage/.storage.env
wallet_path: ../neofs-dev-env/services/storage/wallet04.json wallet_path: ../frostfs-dev-env/services/storage/wallet04.json
local_config_path: ./TemporaryDir/empty-password.yml local_config_path: ./TemporaryDir/empty-password.yml
local_wallet_path: ../neofs-dev-env/services/storage/wallet04.json local_wallet_path: ../frostfs-dev-env/services/storage/wallet04.json
wallet_password: "" wallet_password: ""
volume_name: storage_storage_s04 volume_name: storage_storage_s04
endpoint_data0: s04.neofs.devenv:8080 endpoint_data0: s04.frostfs.devenv:8080
control_endpoint: s04.neofs.devenv:8081 control_endpoint: s04.frostfs.devenv:8081
un_locode: "FI HEL" un_locode: "FI HEL"
- name: s3-gate01 - name: s3-gate01
attributes: attributes:
container_name: s3_gate container_name: s3_gate
config_path: ../neofs-dev-env/services/s3_gate/.s3.env config_path: ../frostfs-dev-env/services/s3_gate/.s3.env
wallet_path: ../neofs-dev-env/services/s3_gate/wallet.json wallet_path: ../frostfs-dev-env/services/s3_gate/wallet.json
local_config_path: ./TemporaryDir/password-s3.yml local_config_path: ./TemporaryDir/password-s3.yml
local_wallet_path: ../neofs-dev-env/services/s3_gate/wallet.json local_wallet_path: ../frostfs-dev-env/services/s3_gate/wallet.json
wallet_password: "s3" wallet_password: "s3"
endpoint_data0: https://s3.neofs.devenv:8080 endpoint_data0: https://s3.frostfs.devenv:8080
- name: http-gate01 - name: http-gate01
attributes: attributes:
container_name: http_gate container_name: http_gate
config_path: ../neofs-dev-env/services/http_gate/.http.env config_path: ../frostfs-dev-env/services/http_gate/.http.env
wallet_path: ../neofs-dev-env/services/http_gate/wallet.json wallet_path: ../frostfs-dev-env/services/http_gate/wallet.json
local_config_path: ./TemporaryDir/password-other.yml local_config_path: ./TemporaryDir/password-other.yml
local_wallet_path: ../neofs-dev-env/services/http_gate/wallet.json local_wallet_path: ../frostfs-dev-env/services/http_gate/wallet.json
wallet_password: "one" wallet_password: "one"
endpoint_data0: http://http.neofs.devenv endpoint_data0: http://http.frostfs.devenv
- name: ir01 - name: ir01
attributes: attributes:
container_name: ir01 container_name: ir01
config_path: ../neofs-dev-env/services/ir/.ir.env config_path: ../frostfs-dev-env/services/ir/.ir.env
wallet_path: ../neofs-dev-env/services/ir/az.json wallet_path: ../frostfs-dev-env/services/ir/az.json
local_config_path: ./TemporaryDir/password-other.yml local_config_path: ./TemporaryDir/password-other.yml
local_wallet_path: ../neofs-dev-env/services/ir/az.json local_wallet_path: ../frostfs-dev-env/services/ir/az.json
wallet_password: "one" wallet_password: "one"
- name: morph-chain01 - name: morph-chain01
attributes: attributes:
container_name: morph_chain container_name: morph_chain
config_path: ../neofs-dev-env/services/morph_chain/protocol.privnet.yml config_path: ../frostfs-dev-env/services/morph_chain/protocol.privnet.yml
wallet_path: ../neofs-dev-env/services/morph_chain/node-wallet.json wallet_path: ../frostfs-dev-env/services/morph_chain/node-wallet.json
local_config_path: ./TemporaryDir/password-other.yml local_config_path: ./TemporaryDir/password-other.yml
local_wallet_path: ../neofs-dev-env/services/morph_chain/node-wallet.json local_wallet_path: ../frostfs-dev-env/services/morph_chain/node-wallet.json
wallet_password: "one" wallet_password: "one"
endpoint_internal0: http://morph-chain.neofs.devenv:30333 endpoint_internal0: http://morph-chain.frostfs.devenv:30333
- name: main-chain01 - name: main-chain01
attributes: attributes:
container_name: main_chain container_name: main_chain
config_path: ../neofs-dev-env/services/chain/protocol.privnet.yml config_path: ../frostfs-dev-env/services/chain/protocol.privnet.yml
wallet_path: ../neofs-dev-env/services/chain/node-wallet.json wallet_path: ../frostfs-dev-env/services/chain/node-wallet.json
local_config_path: ./TemporaryDir/password-other.yml local_config_path: ./TemporaryDir/password-other.yml
local_wallet_path: ../neofs-dev-env/services/chain/node-wallet.json local_wallet_path: ../frostfs-dev-env/services/chain/node-wallet.json
wallet_password: "one" wallet_password: "one"
endpoint_internal0: http://main-chain.neofs.devenv:30333 endpoint_internal0: http://main-chain.frostfs.devenv:30333
- name: coredns01 - name: coredns01
attributes: attributes:
container_name: coredns container_name: coredns
clis: clis:
- name: neofs-cli - name: frostfs-cli
exec_path: neofs-cli exec_path: frostfs-cli

View file

@ -3,8 +3,8 @@
First, thank you for contributing! We love and encourage pull requests from First, thank you for contributing! We love and encourage pull requests from
everyone. Please follow the guidelines: everyone. Please follow the guidelines:
- Check the open [issues](https://github.com/nspcc-dev/neofs-testcases/issues) and - Check the open [issues](https://github.com/TrueCloudLab/frostfs-testcases/issues) and
[pull requests](https://github.com/nspcc-dev/neofs-testcases/pulls) for existing [pull requests](https://github.com/TrueCloudLab/frostfs-testcases/pulls) for existing
discussions. discussions.
- Open an issue first, to discuss a new feature or enhancement. - Open an issue first, to discuss a new feature or enhancement.
@ -22,13 +22,13 @@ everyone. Please follow the guidelines:
## Development Workflow ## Development Workflow
Start by forking the `neofs-testcases` repository, make changes in a branch and then Start by forking the `frostfs-testcases` repository, make changes in a branch and then
send a pull request. We encourage pull requests to discuss code changes. Here send a pull request. We encourage pull requests to discuss code changes. Here
are the steps in details: are the steps in details:
### Set up your GitHub Repository ### Set up your GitHub Repository
Fork [NeoFS testcases upstream](https://github.com/nspcc-dev/neofs-testcases/fork) source Fork [FrosfFS testcases upstream](https://github.com/TrueCloudLab/frostfs-testcases/fork) source
repository to your own personal repository. Copy the URL of your fork and clone it: repository to your own personal repository. Copy the URL of your fork and clone it:
```shell ```shell
@ -36,16 +36,15 @@ $ git clone <url of your fork>
``` ```
### Set up git remote as ``upstream`` ### Set up git remote as ``upstream``
```sh
```shell $ cd frostfs-testcases
$ cd neofs-testcases $ git remote add upstream https://github.com/TrueCloudLab/frostfs-testcases
$ git remote add upstream https://github.com/nspcc-dev/neofs-testcases
$ git fetch upstream $ git fetch upstream
``` ```
### Set up development environment ### Set up development environment
To setup development environment for `neofs-testcases`, please, take the following steps: To setup development environment for `frosfs-testcases`, please, take the following steps:
1. Prepare virtualenv 1. Prepare virtualenv
```shell ```shell

View file

@ -14,32 +14,32 @@ These tests rely on resources and utility modules that have been originally deve
### Initial preparation ### Initial preparation
1. Install neofs-cli 1. Install frostfs-cli
- `git clone git@github.com:nspcc-dev/neofs-node.git` - `git clone git@github.com:nspcc-dev/frostfs-node.git`
- `cd neofs-node` - `cd frostfs-node`
- `make` - `make`
- `sudo cp bin/neofs-cli /usr/local/bin/neofs-cli` - `sudo cp bin/frostfs-cli /usr/local/bin/frostfs-cli`
2. Install neofs-authmate 2. Install frostfs-authmate
- `git clone git@github.com:nspcc-dev/neofs-s3-gw.git` - `git clone git@github.com:nspcc-dev/frostfs-s3-gw.git`
- `cd neofs-s3-gw` - `cd frostfs-s3-gw`
- `make` - `make`
- `sudo cp bin/neofs-authmate /usr/local/bin/neofs-authmate` - `sudo cp bin/frostfs-authmate /usr/local/bin/frostfs-authmate`
3. Install neo-go 3. Install neo-go
- `git clone git@github.com:nspcc-dev/neo-go.git` - `git clone git@github.com:nspcc-dev/neo-go.git`
- `cd neo-go` - `cd neo-go`
- `git checkout v0.92.0` (or the current version in the neofs-dev-env) - `git checkout v0.92.0` (or the current version in the frostfs-dev-env)
- `make` - `make`
- `sudo cp bin/neo-go /usr/local/bin/neo-go` - `sudo cp bin/neo-go /usr/local/bin/neo-go`
or download binary from releases: https://github.com/nspcc-dev/neo-go/releases or download binary from releases: https://github.com/nspcc-dev/neo-go/releases
4. Clone neofs-dev-env 4. Clone frostfs-dev-env
`git clone git@github.com:nspcc-dev/neofs-dev-env.git` `git clone git@github.com:nspcc-dev/frostfs-dev-env.git`
Note that we expect neofs-dev-env to be located under Note that we expect frostfs-dev-env to be located under
the `<testcases_root_dir>/../neofs-dev-env` directory. If you put this repo in any other place, the `<testcases_root_dir>/../frostfs-dev-env` directory. If you put this repo in any other place,
manually set the full path to neofs-dev-env in the environment variable `DEVENV_PATH` at this step. manually set the full path to frostfs-dev-env in the environment variable `DEVENV_PATH` at this step.
5. Make sure you have installed all of the following prerequisites on your machine 5. Make sure you have installed all of the following prerequisites on your machine
@ -49,8 +49,8 @@ python3.9
python3.9-dev python3.9-dev
libssl-dev libssl-dev
``` ```
As we use neofs-dev-env, you'll also need to install As we use frostfs-dev-env, you'll also need to install
[prerequisites](https://github.com/nspcc-dev/neofs-dev-env#prerequisites) of this repository. [prerequisites](https://github.com/nspcc-dev/frostfs-dev-env#prerequisites) of this repository.
6. Prepare virtualenv 6. Prepare virtualenv
@ -122,7 +122,7 @@ $ docker run -p 5050:5050 -e CHECK_RESULTS_EVERY_SECONDS=30 -e KEEP_HISTORY=1 \
Then, you can check the allure report in your browser [by this link](http://localhost:5050/allure-docker-service/projects/default/reports/latest/index.html?redirect=false) Then, you can check the allure report in your browser [by this link](http://localhost:5050/allure-docker-service/projects/default/reports/latest/index.html?redirect=false)
NOTE: feel free to select a different location for `allure-reports` directory, there is no requirement to have it inside `neofs-testcases`. For example, you can place it under `/tmp` path. NOTE: feel free to select a different location for `allure-reports` directory, there is no requirement to have it inside `frostfs-testcases`. For example, you can place it under `/tmp` path.
# Contributing # Contributing

View file

@ -1,6 +1,6 @@
[tool.isort] [tool.isort]
profile = "black" profile = "black"
src_paths = ["neofs-keywords", "pytest_tests", "robot"] src_paths = ["pytest_tests", "robot"]
line_length = 100 line_length = 100
[tool.black] [tool.black]

View file

@ -1,10 +1,10 @@
import logging import logging
import re import re
from common import NEOFS_ADM_EXEC, NEOFS_CLI_EXEC, WALLET_CONFIG from common import FROSTFS_ADM_EXEC, FROSTFS_CLI_EXEC, WALLET_CONFIG
from neofs_testlib.cli import NeofsAdm, NeofsCli from frostfs_testlib.cli import FrostfsAdm, FrostfsCli
from neofs_testlib.hosting import Hosting from frostfs_testlib.hosting import Hosting
from neofs_testlib.shell import Shell from frostfs_testlib.shell import Shell
logger = logging.getLogger("NeoLogger") logger = logging.getLogger("NeoLogger")
@ -12,18 +12,18 @@ logger = logging.getLogger("NeoLogger")
def get_local_binaries_versions(shell: Shell) -> dict[str, str]: def get_local_binaries_versions(shell: Shell) -> dict[str, str]:
versions = {} versions = {}
for binary in ["neo-go", "neofs-authmate"]: for binary in ["neo-go", "frostfs-authmate"]:
out = shell.exec(f"{binary} --version").stdout out = shell.exec(f"{binary} --version").stdout
versions[binary] = _parse_version(out) versions[binary] = _parse_version(out)
neofs_cli = NeofsCli(shell, NEOFS_CLI_EXEC, WALLET_CONFIG) frostfs_cli = FrostfsCli(shell, FROSTFS_CLI_EXEC, WALLET_CONFIG)
versions["neofs-cli"] = _parse_version(neofs_cli.version.get().stdout) versions["frostfs-cli"] = _parse_version(frostfs_cli.version.get().stdout)
try: try:
neofs_adm = NeofsAdm(shell, NEOFS_ADM_EXEC) frostfs_adm = FrostfsAdm(shell, FROSTFS_ADM_EXEC)
versions["neofs-adm"] = _parse_version(neofs_adm.version.get().stdout) versions["frostfs-adm"] = _parse_version(frostfs_adm.version.get().stdout)
except RuntimeError: except RuntimeError:
logger.info(f"neofs-adm not installed") logger.info(f"frostfs-adm not installed")
out = shell.exec("aws --version").stdout out = shell.exec("aws --version").stdout
out_lines = out.split("\n") out_lines = out.split("\n")

View file

@ -5,9 +5,9 @@ from typing import Any
import data_formatters import data_formatters
import yaml import yaml
from neofs_testlib.blockchain import RPCClient from frostfs_testlib.blockchain import RPCClient
from neofs_testlib.hosting import Host, Hosting from frostfs_testlib.hosting import Host, Hosting
from neofs_testlib.hosting.config import ServiceConfig from frostfs_testlib.hosting.config import ServiceConfig
from test_control import wait_for_success from test_control import wait_for_success
@ -108,7 +108,7 @@ class InnerRingNode(NodeBase):
Inner ring node is not always the same as physical host (or physical node, if you will): Inner ring node is not always the same as physical host (or physical node, if you will):
It can be service running in a container or on physical host It can be service running in a container or on physical host
For testing perspective, it's not relevant how it is actually running, For testing perspective, it's not relevant how it is actually running,
since neofs network will still treat it as "node" since frostfs network will still treat it as "node"
""" """
pass pass
@ -147,7 +147,7 @@ class MorphChain(NodeBase):
Consensus node is not always the same as physical host (or physical node, if you will): Consensus node is not always the same as physical host (or physical node, if you will):
It can be service running in a container or on physical host It can be service running in a container or on physical host
For testing perspective, it's not relevant how it is actually running, For testing perspective, it's not relevant how it is actually running,
since neofs network will still treat it as "node" since frostfs network will still treat it as "node"
""" """
rpc_client: RPCClient = None rpc_client: RPCClient = None
@ -170,7 +170,7 @@ class MainChain(NodeBase):
Consensus node is not always the same as physical host: Consensus node is not always the same as physical host:
It can be service running in a container or on physical host (or physical node, if you will): It can be service running in a container or on physical host (or physical node, if you will):
For testing perspective, it's not relevant how it is actually running, For testing perspective, it's not relevant how it is actually running,
since neofs network will still treat it as "node" since frostfs network will still treat it as "node"
""" """
rpc_client: RPCClient = None rpc_client: RPCClient = None
@ -193,7 +193,7 @@ class StorageNode(NodeBase):
Storage node is not always the same as physical host: Storage node is not always the same as physical host:
It can be service running in a container or on physical host (or physical node, if you will): It can be service running in a container or on physical host (or physical node, if you will):
For testing perspective, it's not relevant how it is actually running, For testing perspective, it's not relevant how it is actually running,
since neofs network will still treat it as "node" since frostfs network will still treat it as "node"
""" """
def get_rpc_endpoint(self) -> str: def get_rpc_endpoint(self) -> str:

View file

@ -4,8 +4,8 @@ from typing import Optional
import allure import allure
from cluster import Cluster from cluster import Cluster
from file_helper import generate_file, get_file_hash from file_helper import generate_file, get_file_hash
from neofs_testlib.shell import Shell from frostfs_testlib.shell import Shell
from neofs_verbs import put_object, put_object_to_random_node from frostfs_verbs import put_object, put_object_to_random_node
from storage_object import StorageObjectInfo from storage_object import StorageObjectInfo
from wallet import WalletFile from wallet import WalletFile

View file

@ -1,4 +1,4 @@
from neofs_testlib.shell import Shell from frostfs_testlib.shell import Shell
class IpTablesHelper: class IpTablesHelper:

View file

@ -5,14 +5,14 @@ from time import sleep
from typing import Optional from typing import Optional
import allure import allure
from neofs_testlib.shell import Shell from frostfs_testlib.shell import Shell
from remote_process import RemoteProcess from remote_process import RemoteProcess
EXIT_RESULT_CODE = 0 EXIT_RESULT_CODE = 0
LOAD_RESULTS_PATTERNS = { LOAD_RESULTS_PATTERNS = {
"grpc": { "grpc": {
"write_ops": r"neofs_obj_put_total\W*\d*\W*(?P<write_ops>\d*\.\d*)", "write_ops": r"frostfs_obj_put_total\W*\d*\W*(?P<write_ops>\d*\.\d*)",
"read_ops": r"neofs_obj_get_total\W*\d*\W*(?P<read_ops>\d*\.\d*)", "read_ops": r"frostfs_obj_get_total\W*\d*\W*(?P<read_ops>\d*\.\d*)",
}, },
"s3": { "s3": {
"write_ops": r"aws_obj_put_total\W*\d*\W*(?P<write_ops>\d*\.\d*)", "write_ops": r"aws_obj_put_total\W*\d*\W*(?P<write_ops>\d*\.\d*)",

View file

@ -4,8 +4,8 @@ import uuid
from typing import Optional from typing import Optional
import allure import allure
from neofs_testlib.shell import Shell from frostfs_testlib.shell import Shell
from neofs_testlib.shell.interfaces import CommandOptions from frostfs_testlib.shell.interfaces import CommandOptions
from tenacity import retry, stop_after_attempt, wait_fixed from tenacity import retry, stop_after_attempt, wait_fixed

View file

@ -47,7 +47,7 @@ def placement_policy_from_container(container_info: str) -> str:
FILTER Country EQ Sweden AS LOC_SW FILTER Country EQ Sweden AS LOC_SW
Args: Args:
container_info: output from neofs-cli container get command container_info: output from frostfs-cli container get command
Returns: Returns:
placement policy as a string placement policy as a string

View file

@ -4,8 +4,8 @@ from dataclasses import dataclass
from cluster import Cluster, NodeBase from cluster import Cluster, NodeBase
from common import FREE_STORAGE, WALLET_CONFIG, WALLET_PASS from common import FREE_STORAGE, WALLET_CONFIG, WALLET_PASS
from neofs_testlib.shell import Shell from frostfs_testlib.shell import Shell
from neofs_testlib.utils.wallet import get_last_address_from_wallet, init_wallet from frostfs_testlib.utils.wallet import get_last_address_from_wallet, init_wallet
from python_keywords.payment_neogo import deposit_gas, transfer_gas from python_keywords.payment_neogo import deposit_gas, transfer_gas

View file

@ -13,7 +13,7 @@ markers =
# functional markers # functional markers
container: tests for container creation container: tests for container creation
grpc_api: standard gRPC API tests grpc_api: standard gRPC API tests
grpc_control: tests related to using neofs-cli control commands grpc_control: tests related to using frostfs-cli control commands
grpc_object_lock: gRPC lock tests grpc_object_lock: gRPC lock tests
http_gate: HTTP gate contract http_gate: HTTP gate contract
s3_gate: All S3 gate tests s3_gate: All S3 gate tests
@ -25,7 +25,7 @@ markers =
s3_gate_tagging: Tagging S3 gate tests s3_gate_tagging: Tagging S3 gate tests
s3_gate_versioning: Versioning S3 gate tests s3_gate_versioning: Versioning S3 gate tests
long: long tests (with long execution time) long: long tests (with long execution time)
node_mgmt: neofs control commands node_mgmt: frostfs control commands
session_token: tests for operations with session token session_token: tests for operations with session token
static_session: tests for operations with static session token static_session: tests for operations with static session token
bearer: tests for bearer tokens bearer: tests for bearer tokens
@ -40,6 +40,6 @@ markers =
failover_network: tests for network failure failover_network: tests for network failure
failover_reboot: tests for system recovery after reboot of a node failover_reboot: tests for system recovery after reboot of a node
add_nodes: add nodes to cluster add_nodes: add nodes to cluster
check_binaries: check neofs installed binaries versions check_binaries: check frostfs installed binaries versions
payments: tests for payment associated operations payments: tests for payment associated operations
load: performance tests load: performance tests

View file

@ -2,7 +2,7 @@ import allure
import epoch import epoch
import pytest import pytest
from cluster import Cluster from cluster import Cluster
from neofs_testlib.shell import Shell from frostfs_testlib.shell import Shell
# To skip adding every mandatory singleton dependency to EACH test function # To skip adding every mandatory singleton dependency to EACH test function

View file

@ -4,14 +4,14 @@ from dataclasses import asdict
import allure import allure
from common import STORAGE_NODE_SERVICE_NAME_REGEX from common import STORAGE_NODE_SERVICE_NAME_REGEX
from frostfs_testlib.cli.frostfs_authmate import FrostfsAuthmate
from frostfs_testlib.cli.neogo import NeoGo
from frostfs_testlib.hosting import Hosting
from frostfs_testlib.shell import CommandOptions, SSHShell
from frostfs_testlib.shell.interfaces import InteractiveInput
from k6 import K6, LoadParams, LoadResults from k6 import K6, LoadParams, LoadResults
from neofs_testlib.cli.neofs_authmate import NeofsAuthmate
from neofs_testlib.cli.neogo import NeoGo
from neofs_testlib.hosting import Hosting
from neofs_testlib.shell import CommandOptions, SSHShell
from neofs_testlib.shell.interfaces import InteractiveInput
NEOFS_AUTHMATE_PATH = "neofs-s3-authmate" FROSTFS_AUTHMATE_PATH = "frostfs-s3-authmate"
STOPPED_HOSTS = [] STOPPED_HOSTS = []
@ -56,8 +56,8 @@ def init_s3_client(
path = ssh_client.exec(r"sudo find . -name 'k6' -exec dirname {} \; -quit").stdout.strip( path = ssh_client.exec(r"sudo find . -name 'k6' -exec dirname {} \; -quit").stdout.strip(
"\n" "\n"
) )
neofs_authmate_exec = NeofsAuthmate(ssh_client, NEOFS_AUTHMATE_PATH) frostfs_authmate_exec = FrostfsAuthmate(ssh_client, FROSTFS_AUTHMATE_PATH)
issue_secret_output = neofs_authmate_exec.secret.issue( issue_secret_output = frostfs_authmate_exec.secret.issue(
wallet=f"{path}/scenarios/files/wallet.json", wallet=f"{path}/scenarios/files/wallet.json",
peer=node_endpoint, peer=node_endpoint,
bearer_rules=f"{path}/scenarios/files/rules.json", bearer_rules=f"{path}/scenarios/files/rules.json",

View file

@ -17,8 +17,8 @@ from botocore.exceptions import ClientError
from cli_helpers import _cmd_run, _configure_aws_cli, _run_with_passwd from cli_helpers import _cmd_run, _configure_aws_cli, _run_with_passwd
from cluster import Cluster from cluster import Cluster
from cluster_test_base import ClusterTestBase from cluster_test_base import ClusterTestBase
from common import NEOFS_AUTHMATE_EXEC from common import FROSTFS_AUTHMATE_EXEC
from neofs_testlib.shell import Shell from frostfs_testlib.shell import Shell
from pytest import FixtureRequest from pytest import FixtureRequest
from python_keywords.container import list_containers from python_keywords.container import list_containers
@ -128,7 +128,7 @@ def init_s3_credentials(
s3gate_node = cluster.s3gates[0] s3gate_node = cluster.s3gates[0]
gate_public_key = s3gate_node.get_wallet_public_key() gate_public_key = s3gate_node.get_wallet_public_key()
cmd = ( cmd = (
f"{NEOFS_AUTHMATE_EXEC} --debug --with-log --timeout {CREDENTIALS_CREATE_TIMEOUT} " f"{FROSTFS_AUTHMATE_EXEC} --debug --with-log --timeout {CREDENTIALS_CREATE_TIMEOUT} "
f"issue-secret --wallet {wallet_path} --gate-public-key={gate_public_key} " f"issue-secret --wallet {wallet_path} --gate-public-key={gate_public_key} "
f"--peer {cluster.default_rpc_endpoint} --container-friendly-name {bucket} " f"--peer {cluster.default_rpc_endpoint} --container-friendly-name {bucket} "
f"--bearer-rules {s3_bearer_rules}" f"--bearer-rules {s3_bearer_rules}"

View file

@ -9,11 +9,11 @@ from typing import Any, Optional
import allure import allure
import json_transformers import json_transformers
from common import ASSETS_DIR, NEOFS_CLI_EXEC, WALLET_CONFIG from common import ASSETS_DIR, FROSTFS_CLI_EXEC, WALLET_CONFIG
from data_formatters import get_wallet_public_key from data_formatters import get_wallet_public_key
from frostfs_testlib.cli import FrostfsCli
from frostfs_testlib.shell import Shell
from json_transformers import encode_for_json from json_transformers import encode_for_json
from neofs_testlib.cli import NeofsCli
from neofs_testlib.shell import Shell
from storage_object_info import StorageObjectInfo from storage_object_info import StorageObjectInfo
from wallet import WalletFile from wallet import WalletFile
@ -249,8 +249,8 @@ def create_session_token(
The path to the generated session token file. The path to the generated session token file.
""" """
session_token = os.path.join(os.getcwd(), ASSETS_DIR, str(uuid.uuid4())) session_token = os.path.join(os.getcwd(), ASSETS_DIR, str(uuid.uuid4()))
neofscli = NeofsCli(shell=shell, neofs_cli_exec_path=NEOFS_CLI_EXEC) frostfscli = FrostfsCli(shell=shell, frostfs_cli_exec_path=FROSTFS_CLI_EXEC)
neofscli.session.create( frostfscli.session.create(
rpc_endpoint=rpc_endpoint, rpc_endpoint=rpc_endpoint,
address=owner, address=owner,
wallet=wallet_path, wallet=wallet_path,
@ -274,8 +274,10 @@ def sign_session_token(shell: Shell, session_token_file: str, wlt: WalletFile) -
The path to the signed token. The path to the signed token.
""" """
signed_token_file = os.path.join(os.getcwd(), ASSETS_DIR, str(uuid.uuid4())) signed_token_file = os.path.join(os.getcwd(), ASSETS_DIR, str(uuid.uuid4()))
neofscli = NeofsCli(shell=shell, neofs_cli_exec_path=NEOFS_CLI_EXEC, config_file=WALLET_CONFIG) frostfscli = FrostfsCli(
neofscli.util.sign_session_token( shell=shell, frostfs_cli_exec_path=FROSTFS_CLI_EXEC, config_file=WALLET_CONFIG
)
frostfscli.util.sign_session_token(
wallet=wlt.path, from_file=session_token_file, to_file=signed_token_file wallet=wlt.path, from_file=session_token_file, to_file=signed_token_file
) )
return signed_token_file return signed_token_file

View file

@ -5,9 +5,9 @@ import allure
import pytest import pytest
from cluster import Cluster from cluster import Cluster
from epoch import tick_epoch from epoch import tick_epoch
from frostfs_testlib.shell import Shell
from grpc_responses import OBJECT_ALREADY_REMOVED from grpc_responses import OBJECT_ALREADY_REMOVED
from neofs_testlib.shell import Shell from python_keywords.frostfs_verbs import delete_object, get_object
from python_keywords.neofs_verbs import delete_object, get_object
from storage_object_info import StorageObjectInfo from storage_object_info import StorageObjectInfo
from tombstone import verify_head_tombstone from tombstone import verify_head_tombstone

View file

@ -8,11 +8,11 @@ import pytest
from cluster import Cluster from cluster import Cluster
from common import WALLET_CONFIG, WALLET_PASS from common import WALLET_CONFIG, WALLET_PASS
from file_helper import generate_file from file_helper import generate_file
from neofs_testlib.shell import Shell from frostfs_testlib.shell import Shell
from neofs_testlib.utils.wallet import init_wallet from frostfs_testlib.utils.wallet import init_wallet
from python_keywords.acl import EACLRole from python_keywords.acl import EACLRole
from python_keywords.container import create_container from python_keywords.container import create_container
from python_keywords.neofs_verbs import put_object_to_random_node from python_keywords.frostfs_verbs import put_object_to_random_node
from wellknown_acl import PUBLIC_ACL from wellknown_acl import PUBLIC_ACL
OBJECT_COUNT = 5 OBJECT_COUNT = 5

View file

@ -8,8 +8,8 @@ import pytest
from cluster_test_base import ClusterTestBase from cluster_test_base import ClusterTestBase
from common import ASSETS_DIR, FREE_STORAGE, WALLET_PASS from common import ASSETS_DIR, FREE_STORAGE, WALLET_PASS
from file_helper import generate_file from file_helper import generate_file
from frostfs_testlib.utils.wallet import init_wallet
from grpc_responses import OBJECT_ACCESS_DENIED, OBJECT_NOT_FOUND from grpc_responses import OBJECT_ACCESS_DENIED, OBJECT_NOT_FOUND
from neofs_testlib.utils.wallet import init_wallet
from python_keywords.acl import ( from python_keywords.acl import (
EACLAccess, EACLAccess,
EACLOperation, EACLOperation,
@ -20,7 +20,7 @@ from python_keywords.acl import (
set_eacl, set_eacl,
) )
from python_keywords.container import create_container from python_keywords.container import create_container
from python_keywords.neofs_verbs import put_object_to_random_node from python_keywords.frostfs_verbs import put_object_to_random_node
from python_keywords.payment_neogo import deposit_gas, transfer_gas from python_keywords.payment_neogo import deposit_gas, transfer_gas
from python_keywords.storage_group import ( from python_keywords.storage_group import (
delete_storagegroup, delete_storagegroup,

View file

@ -8,7 +8,7 @@ from python_keywords.container_access import (
check_no_access_to_container, check_no_access_to_container,
check_read_only_container, check_read_only_container,
) )
from python_keywords.neofs_verbs import put_object_to_random_node from python_keywords.frostfs_verbs import put_object_to_random_node
from wellknown_acl import PRIVATE_ACL_F, PUBLIC_ACL_F, READONLY_ACL_F from wellknown_acl import PRIVATE_ACL_F, PUBLIC_ACL_F, READONLY_ACL_F

View file

@ -24,7 +24,9 @@ from python_keywords.container_access import (
class TestACLBearer(ClusterTestBase): class TestACLBearer(ClusterTestBase):
@pytest.mark.parametrize("role", [EACLRole.USER, EACLRole.OTHERS]) @pytest.mark.parametrize("role", [EACLRole.USER, EACLRole.OTHERS])
def test_bearer_token_operations(self, wallets, eacl_container_with_objects, role): def test_bearer_token_operations(self, wallets, eacl_container_with_objects, role):
allure.dynamic.title(f"Testcase to validate NeoFS operations with {role.value} BearerToken") allure.dynamic.title(
f"Testcase to validate FrostFS operations with {role.value} BearerToken"
)
cid, objects_oids, file_path = eacl_container_with_objects cid, objects_oids, file_path = eacl_container_with_objects
user_wallet = wallets.get_wallet() user_wallet = wallets.get_wallet()
deny_wallet = wallets.get_wallet(role) deny_wallet = wallets.get_wallet(role)

View file

@ -2,7 +2,7 @@ import allure
import pytest import pytest
from cluster_test_base import ClusterTestBase from cluster_test_base import ClusterTestBase
from failover_utils import wait_object_replication from failover_utils import wait_object_replication
from neofs_testlib.shell import Shell from frostfs_testlib.shell import Shell
from python_keywords.acl import ( from python_keywords.acl import (
EACLAccess, EACLAccess,
EACLOperation, EACLOperation,
@ -17,7 +17,7 @@ from python_keywords.container_access import (
check_full_access_to_container, check_full_access_to_container,
check_no_access_to_container, check_no_access_to_container,
) )
from python_keywords.neofs_verbs import put_object_to_random_node from python_keywords.frostfs_verbs import put_object_to_random_node
from python_keywords.node_management import drop_object from python_keywords.node_management import drop_object
from python_keywords.object_access import ( from python_keywords.object_access import (
can_delete_object, can_delete_object,
@ -74,7 +74,7 @@ class TestEACLContainer(ClusterTestBase):
not_deny_role_wallet = user_wallet if deny_role == EACLRole.OTHERS else other_wallet not_deny_role_wallet = user_wallet if deny_role == EACLRole.OTHERS else other_wallet
deny_role_str = "all others" if deny_role == EACLRole.OTHERS else "user" deny_role_str = "all others" if deny_role == EACLRole.OTHERS else "user"
not_deny_role_str = "user" if deny_role == EACLRole.OTHERS else "all others" not_deny_role_str = "user" if deny_role == EACLRole.OTHERS else "all others"
allure.dynamic.title(f"Testcase to deny NeoFS operations for {deny_role_str}.") allure.dynamic.title(f"Testcase to deny FrostFS operations for {deny_role_str}.")
cid, object_oids, file_path = eacl_container_with_objects cid, object_oids, file_path = eacl_container_with_objects
with allure.step(f"Deny all operations for {deny_role_str} via eACL"): with allure.step(f"Deny all operations for {deny_role_str} via eACL"):
@ -148,7 +148,7 @@ class TestEACLContainer(ClusterTestBase):
cluster=self.cluster, cluster=self.cluster,
) )
@allure.title("Testcase to allow NeoFS operations for only one other pubkey.") @allure.title("Testcase to allow FrostFS operations for only one other pubkey.")
def test_extended_acl_deny_all_operations_exclude_pubkey( def test_extended_acl_deny_all_operations_exclude_pubkey(
self, wallets, eacl_container_with_objects self, wallets, eacl_container_with_objects
): ):
@ -209,7 +209,7 @@ class TestEACLContainer(ClusterTestBase):
cluster=self.cluster, cluster=self.cluster,
) )
@allure.title("Testcase to validate NeoFS replication with eACL deny rules.") @allure.title("Testcase to validate FrostFS replication with eACL deny rules.")
def test_extended_acl_deny_replication( def test_extended_acl_deny_replication(
self, self,
wallets, wallets,
@ -251,7 +251,7 @@ class TestEACLContainer(ClusterTestBase):
storage_nodes, storage_nodes,
) )
@allure.title("Testcase to validate NeoFS system operations with extended ACL") @allure.title("Testcase to validate FrostFS system operations with extended ACL")
def test_extended_actions_system(self, wallets, eacl_container_with_objects): def test_extended_actions_system(self, wallets, eacl_container_with_objects):
user_wallet = wallets.get_wallet() user_wallet = wallets.get_wallet()
ir_wallet, storage_wallet = wallets.get_wallets_list(role=EACLRole.SYSTEM)[:2] ir_wallet, storage_wallet = wallets.get_wallets_list(role=EACLRole.SYSTEM)[:2]

View file

@ -20,7 +20,7 @@ from python_keywords.container_access import (
check_full_access_to_container, check_full_access_to_container,
check_no_access_to_container, check_no_access_to_container,
) )
from python_keywords.neofs_verbs import put_object_to_random_node from python_keywords.frostfs_verbs import put_object_to_random_node
from python_keywords.object_access import can_get_head_object, can_get_object, can_put_object from python_keywords.object_access import can_get_head_object, can_get_object, can_put_object
from wellknown_acl import PUBLIC_ACL from wellknown_acl import PUBLIC_ACL
@ -128,7 +128,7 @@ class TestEACLFilters(ClusterTestBase):
"match_type", [EACLMatchType.STRING_EQUAL, EACLMatchType.STRING_NOT_EQUAL] "match_type", [EACLMatchType.STRING_EQUAL, EACLMatchType.STRING_NOT_EQUAL]
) )
def test_extended_acl_filters_request(self, wallets, eacl_container_with_objects, match_type): def test_extended_acl_filters_request(self, wallets, eacl_container_with_objects, match_type):
allure.dynamic.title(f"Validate NeoFS operations with request filter: {match_type.name}") allure.dynamic.title(f"Validate FrostFS operations with request filter: {match_type.name}")
user_wallet = wallets.get_wallet() user_wallet = wallets.get_wallet()
other_wallet = wallets.get_wallet(EACLRole.OTHERS) other_wallet = wallets.get_wallet(EACLRole.OTHERS)
( (
@ -243,7 +243,7 @@ class TestEACLFilters(ClusterTestBase):
self, wallets, eacl_container_with_objects, match_type self, wallets, eacl_container_with_objects, match_type
): ):
allure.dynamic.title( allure.dynamic.title(
f"Validate NeoFS operations with deny user headers filter: {match_type.name}" f"Validate FrostFS operations with deny user headers filter: {match_type.name}"
) )
user_wallet = wallets.get_wallet() user_wallet = wallets.get_wallet()
other_wallet = wallets.get_wallet(EACLRole.OTHERS) other_wallet = wallets.get_wallet(EACLRole.OTHERS)
@ -425,7 +425,7 @@ class TestEACLFilters(ClusterTestBase):
self, wallets, eacl_container_with_objects, match_type self, wallets, eacl_container_with_objects, match_type
): ):
allure.dynamic.title( allure.dynamic.title(
"Testcase to validate NeoFS operation with allow eACL user headers filters:" "Testcase to validate FrostFS operation with allow eACL user headers filters:"
f"{match_type.name}" f"{match_type.name}"
) )
user_wallet = wallets.get_wallet() user_wallet = wallets.get_wallet()

View file

@ -0,0 +1,3 @@
import schemathesis
schema = schemathesis.from_uri("http://172.26.160.223:5000/api/openapi.json")

View file

@ -21,6 +21,10 @@ from common import (
WALLET_PASS, WALLET_PASS,
) )
from env_properties import save_env_properties from env_properties import save_env_properties
from frostfs_testlib.hosting import Hosting
from frostfs_testlib.reporter import AllureHandler, get_reporter
from frostfs_testlib.shell import LocalShell, Shell
from frostfs_testlib.utils.wallet import init_wallet
from k6 import LoadParams from k6 import LoadParams
from load import get_services_endpoints, prepare_k6_instances from load import get_services_endpoints, prepare_k6_instances
from load_params import ( from load_params import (
@ -32,12 +36,8 @@ from load_params import (
LOAD_NODE_SSH_USER, LOAD_NODE_SSH_USER,
LOAD_NODES, LOAD_NODES,
) )
from neofs_testlib.hosting import Hosting
from neofs_testlib.reporter import AllureHandler, get_reporter
from neofs_testlib.shell import LocalShell, Shell
from neofs_testlib.utils.wallet import init_wallet
from payment_neogo import deposit_gas, transfer_gas from payment_neogo import deposit_gas, transfer_gas
from python_keywords.neofs_verbs import get_netmap_netinfo from python_keywords.frostfs_verbs import get_netmap_netinfo
from python_keywords.node_management import storage_node_healthcheck from python_keywords.node_management import storage_node_healthcheck
from helpers.wallet import WalletFactory from helpers.wallet import WalletFactory

View file

@ -9,7 +9,7 @@ from failover_utils import wait_all_storage_nodes_returned, wait_object_replicat
from file_helper import generate_file, get_file_hash from file_helper import generate_file, get_file_hash
from iptables_helper import IpTablesHelper from iptables_helper import IpTablesHelper
from python_keywords.container import create_container from python_keywords.container import create_container
from python_keywords.neofs_verbs import get_object, put_object_to_random_node from python_keywords.frostfs_verbs import get_object, put_object_to_random_node
from wellknown_acl import PUBLIC_ACL from wellknown_acl import PUBLIC_ACL
from steps.cluster_test_base import ClusterTestBase from steps.cluster_test_base import ClusterTestBase

View file

@ -5,10 +5,10 @@ import pytest
from cluster import Cluster, StorageNode from cluster import Cluster, StorageNode
from failover_utils import wait_all_storage_nodes_returned, wait_object_replication from failover_utils import wait_all_storage_nodes_returned, wait_object_replication
from file_helper import generate_file, get_file_hash from file_helper import generate_file, get_file_hash
from neofs_testlib.hosting import Host from frostfs_testlib.hosting import Host
from neofs_testlib.shell import CommandOptions from frostfs_testlib.shell import CommandOptions
from python_keywords.container import create_container from python_keywords.container import create_container
from python_keywords.neofs_verbs import get_object, put_object_to_random_node from python_keywords.frostfs_verbs import get_object, put_object_to_random_node
from wellknown_acl import PUBLIC_ACL from wellknown_acl import PUBLIC_ACL
from steps.cluster_test_base import ClusterTestBase from steps.cluster_test_base import ClusterTestBase

View file

@ -6,6 +6,7 @@ from common import (
S3_GATE_SERVICE_NAME_REGEX, S3_GATE_SERVICE_NAME_REGEX,
STORAGE_NODE_SERVICE_NAME_REGEX, STORAGE_NODE_SERVICE_NAME_REGEX,
) )
from frostfs_testlib.hosting import Hosting
from k6 import LoadParams from k6 import LoadParams
from load import ( from load import (
clear_cache_and_data, clear_cache_and_data,
@ -33,7 +34,6 @@ from load_params import (
STORAGE_NODE_COUNT, STORAGE_NODE_COUNT,
WRITERS, WRITERS,
) )
from neofs_testlib.hosting import Hosting
ENDPOINTS_ATTRIBUTES = { ENDPOINTS_ATTRIBUTES = {
"http": {"regex": HTTP_GATE_SERVICE_NAME_REGEX, "endpoint_attribute": "endpoint"}, "http": {"regex": HTTP_GATE_SERVICE_NAME_REGEX, "endpoint_attribute": "endpoint"},

View file

@ -7,13 +7,13 @@ import allure
import pytest import pytest
from cluster import StorageNode from cluster import StorageNode
from cluster_test_base import ClusterTestBase from cluster_test_base import ClusterTestBase
from common import MORPH_BLOCK_TIME, NEOFS_CONTRACT_CACHE_TIMEOUT from common import FROSTFS_CONTRACT_CACHE_TIMEOUT, MORPH_BLOCK_TIME
from epoch import tick_epoch from epoch import tick_epoch
from file_helper import generate_file from file_helper import generate_file
from grpc_responses import OBJECT_NOT_FOUND, error_matches_status from grpc_responses import OBJECT_NOT_FOUND, error_matches_status
from python_keywords.container import create_container, get_container from python_keywords.container import create_container, get_container
from python_keywords.failover_utils import wait_object_replication from python_keywords.failover_utils import wait_object_replication
from python_keywords.neofs_verbs import ( from python_keywords.frostfs_verbs import (
delete_object, delete_object,
get_object, get_object,
get_object_from_random_node, get_object_from_random_node,
@ -324,10 +324,10 @@ class TestNodeManagement(ClusterTestBase):
self.validate_object_copies(wallet, placement_rule, file_path, expected_copies) self.validate_object_copies(wallet, placement_rule, file_path, expected_copies)
@pytest.mark.node_mgmt @pytest.mark.node_mgmt
@allure.title("NeoFS object could be dropped using control command") @allure.title("FrostFS object could be dropped using control command")
def test_drop_object(self, default_wallet, complex_object_size, simple_object_size): def test_drop_object(self, default_wallet, complex_object_size, simple_object_size):
""" """
Test checks object could be dropped using `neofs-cli control drop-objects` command. Test checks object could be dropped using `frostfs-cli control drop-objects` command.
""" """
wallet = default_wallet wallet = default_wallet
endpoint = self.cluster.default_rpc_endpoint endpoint = self.cluster.default_rpc_endpoint
@ -474,7 +474,7 @@ class TestNodeManagement(ClusterTestBase):
if copies == expected_copies: if copies == expected_copies:
break break
tick_epoch(self.shell, self.cluster) tick_epoch(self.shell, self.cluster)
sleep(parse_time(NEOFS_CONTRACT_CACHE_TIMEOUT)) sleep(parse_time(FROSTFS_CONTRACT_CACHE_TIMEOUT))
else: else:
raise AssertionError(f"There are no {expected_copies} copies during time") raise AssertionError(f"There are no {expected_copies} copies during time")

View file

@ -7,6 +7,7 @@ import pytest
from cluster import Cluster from cluster import Cluster
from complex_object_actions import get_complex_object_split_ranges from complex_object_actions import get_complex_object_split_ranges
from file_helper import generate_file, get_file_content, get_file_hash from file_helper import generate_file, get_file_content, get_file_hash
from frostfs_testlib.shell import Shell
from grpc_responses import ( from grpc_responses import (
INVALID_LENGTH_SPECIFIER, INVALID_LENGTH_SPECIFIER,
INVALID_OFFSET_SPECIFIER, INVALID_OFFSET_SPECIFIER,
@ -14,10 +15,9 @@ from grpc_responses import (
INVALID_RANGE_ZERO_LENGTH, INVALID_RANGE_ZERO_LENGTH,
OUT_OF_RANGE, OUT_OF_RANGE,
) )
from neofs_testlib.shell import Shell
from pytest import FixtureRequest from pytest import FixtureRequest
from python_keywords.container import create_container from python_keywords.container import create_container
from python_keywords.neofs_verbs import ( from python_keywords.frostfs_verbs import (
get_object_from_random_node, get_object_from_random_node,
get_range, get_range,
get_range_hash, get_range_hash,

View file

@ -3,8 +3,8 @@ import pytest
from cluster import Cluster from cluster import Cluster
from container import REP_2_FOR_3_NODES_PLACEMENT_RULE, SINGLE_PLACEMENT_RULE, create_container from container import REP_2_FOR_3_NODES_PLACEMENT_RULE, SINGLE_PLACEMENT_RULE, create_container
from epoch import get_epoch from epoch import get_epoch
from neofs_testlib.shell import Shell from frostfs_testlib.shell import Shell
from neofs_verbs import delete_object, get_object from frostfs_verbs import delete_object, get_object
from pytest import FixtureRequest from pytest import FixtureRequest
from python_keywords.acl import EACLAccess, EACLOperation, EACLRole, EACLRule, form_bearertoken_file from python_keywords.acl import EACLAccess, EACLOperation, EACLRole, EACLRule, form_bearertoken_file
from wellknown_acl import EACL_PUBLIC_READ_WRITE from wellknown_acl import EACL_PUBLIC_READ_WRITE

View file

@ -7,7 +7,7 @@ from file_helper import generate_file, get_file_hash
from grpc_responses import OBJECT_NOT_FOUND from grpc_responses import OBJECT_NOT_FOUND
from pytest import FixtureRequest from pytest import FixtureRequest
from python_keywords.container import create_container from python_keywords.container import create_container
from python_keywords.neofs_verbs import get_object_from_random_node, put_object_to_random_node from python_keywords.frostfs_verbs import get_object_from_random_node, put_object_to_random_node
from utility import wait_for_gc_pass_on_storage_nodes from utility import wait_for_gc_pass_on_storage_nodes
from steps.cluster_test_base import ClusterTestBase from steps.cluster_test_base import ClusterTestBase

View file

@ -8,6 +8,7 @@ from cluster_test_base import ClusterTestBase
from common import STORAGE_GC_TIME from common import STORAGE_GC_TIME
from complex_object_actions import get_link_object, get_storage_object_chunks from complex_object_actions import get_link_object, get_storage_object_chunks
from epoch import ensure_fresh_epoch, get_epoch, tick_epoch from epoch import ensure_fresh_epoch, get_epoch, tick_epoch
from frostfs_testlib.shell import Shell
from grpc_responses import ( from grpc_responses import (
LIFETIME_REQUIRED, LIFETIME_REQUIRED,
LOCK_NON_REGULAR_OBJECT, LOCK_NON_REGULAR_OBJECT,
@ -17,11 +18,10 @@ from grpc_responses import (
OBJECT_IS_LOCKED, OBJECT_IS_LOCKED,
OBJECT_NOT_FOUND, OBJECT_NOT_FOUND,
) )
from neofs_testlib.shell import Shell
from node_management import drop_object from node_management import drop_object
from pytest import FixtureRequest from pytest import FixtureRequest
from python_keywords.container import create_container from python_keywords.container import create_container
from python_keywords.neofs_verbs import delete_object, head_object, lock_object from python_keywords.frostfs_verbs import delete_object, head_object, lock_object
from storage_policy import get_nodes_with_object from storage_policy import get_nodes_with_object
from test_control import expect_not_raises, wait_for_success from test_control import expect_not_raises, wait_for_success
from utility import parse_time, wait_for_gc_pass_on_storage_nodes from utility import parse_time, wait_for_gc_pass_on_storage_nodes

View file

@ -5,9 +5,9 @@ import allure
import pytest import pytest
import yaml import yaml
from cluster_test_base import ClusterTestBase from cluster_test_base import ClusterTestBase
from common import FREE_STORAGE, NEOFS_CLI_EXEC, WALLET_CONFIG from common import FREE_STORAGE, FROSTFS_CLI_EXEC, WALLET_CONFIG
from neofs_testlib.cli import NeofsCli from frostfs_testlib.cli import FrostfsCli
from neofs_testlib.shell import CommandResult, Shell from frostfs_testlib.shell import CommandResult, Shell
from wallet import WalletFactory, WalletFile from wallet import WalletFactory, WalletFile
logger = logging.getLogger("NeoLogger") logger = logging.getLogger("NeoLogger")
@ -27,8 +27,8 @@ class TestBalanceAccounting(ClusterTestBase):
return wallet_factory.create_wallet() return wallet_factory.create_wallet()
@pytest.fixture(scope="class") @pytest.fixture(scope="class")
def cli(self, client_shell: Shell) -> NeofsCli: def cli(self, client_shell: Shell) -> FrostfsCli:
return NeofsCli(client_shell, NEOFS_CLI_EXEC, WALLET_CONFIG) return FrostfsCli(client_shell, FROSTFS_CLI_EXEC, WALLET_CONFIG)
@allure.step("Check deposit amount") @allure.step("Check deposit amount")
def check_amount(self, result: CommandResult) -> None: def check_amount(self, result: CommandResult) -> None:
@ -53,13 +53,13 @@ class TestBalanceAccounting(ClusterTestBase):
"rpc-endpoint": endpoint, "rpc-endpoint": endpoint,
"wallet": wallet, "wallet": wallet,
} }
api_config_file = os.path.join(config_dir, "neofs-cli-api-config.yaml") api_config_file = os.path.join(config_dir, "frostfs-cli-api-config.yaml")
with open(api_config_file, "w") as file: with open(api_config_file, "w") as file:
yaml.dump(api_config, file) yaml.dump(api_config, file)
return api_config_file return api_config_file
@allure.title("Test balance request with wallet and address") @allure.title("Test balance request with wallet and address")
def test_balance_wallet_address(self, main_wallet: WalletFile, cli: NeofsCli): def test_balance_wallet_address(self, main_wallet: WalletFile, cli: FrostfsCli):
result = cli.accounting.balance( result = cli.accounting.balance(
wallet=main_wallet.path, wallet=main_wallet.path,
rpc_endpoint=self.cluster.default_rpc_endpoint, rpc_endpoint=self.cluster.default_rpc_endpoint,
@ -69,7 +69,7 @@ class TestBalanceAccounting(ClusterTestBase):
self.check_amount(result) self.check_amount(result)
@allure.title("Test balance request with wallet only") @allure.title("Test balance request with wallet only")
def test_balance_wallet(self, main_wallet: WalletFile, cli: NeofsCli): def test_balance_wallet(self, main_wallet: WalletFile, cli: FrostfsCli):
result = cli.accounting.balance( result = cli.accounting.balance(
wallet=main_wallet.path, rpc_endpoint=self.cluster.default_rpc_endpoint wallet=main_wallet.path, rpc_endpoint=self.cluster.default_rpc_endpoint
) )
@ -77,7 +77,7 @@ class TestBalanceAccounting(ClusterTestBase):
@allure.title("Test balance request with wallet and wrong address") @allure.title("Test balance request with wallet and wrong address")
def test_balance_wrong_address( def test_balance_wrong_address(
self, main_wallet: WalletFile, other_wallet: WalletFile, cli: NeofsCli self, main_wallet: WalletFile, other_wallet: WalletFile, cli: FrostfsCli
): ):
with pytest.raises(Exception, match="address option must be specified and valid"): with pytest.raises(Exception, match="address option must be specified and valid"):
cli.accounting.balance( cli.accounting.balance(
@ -95,7 +95,7 @@ class TestBalanceAccounting(ClusterTestBase):
) )
logger.info(f"Config with API endpoint: {config_file}") logger.info(f"Config with API endpoint: {config_file}")
cli = NeofsCli(client_shell, NEOFS_CLI_EXEC, config_file=config_file) cli = FrostfsCli(client_shell, FROSTFS_CLI_EXEC, config_file=config_file)
result = cli.accounting.balance() result = cli.accounting.balance()
self.check_amount(result) self.check_amount(result)

View file

@ -6,6 +6,7 @@ import pytest
from epoch import get_epoch, tick_epoch from epoch import get_epoch, tick_epoch
from file_helper import generate_file, get_file_hash from file_helper import generate_file, get_file_hash
from python_keywords.container import create_container from python_keywords.container import create_container
from python_keywords.frostfs_verbs import put_object_to_random_node
from python_keywords.http_gate import ( from python_keywords.http_gate import (
attr_into_header, attr_into_header,
get_object_and_verify_hashes, get_object_and_verify_hashes,
@ -17,7 +18,6 @@ from python_keywords.http_gate import (
upload_via_http_gate, upload_via_http_gate,
upload_via_http_gate_curl, upload_via_http_gate_curl,
) )
from python_keywords.neofs_verbs import put_object_to_random_node
from utility import wait_for_gc_pass_on_storage_nodes from utility import wait_for_gc_pass_on_storage_nodes
from wellknown_acl import PUBLIC_ACL from wellknown_acl import PUBLIC_ACL
@ -28,10 +28,11 @@ OBJECT_NOT_FOUND_ERROR = "not found"
@allure.link( @allure.link(
"https://github.com/nspcc-dev/neofs-http-gw#neofs-http-gateway", name="neofs-http-gateway" "https://github.com/TrueCloudLab/frostfs-http-gw#frostfs-http-gateway",
name="frostfs-http-gateway",
) )
@allure.link("https://github.com/nspcc-dev/neofs-http-gw#uploading", name="uploading") @allure.link("https://github.com/TrueCloudLab/frostfs-http-gw#uploading", name="uploading")
@allure.link("https://github.com/nspcc-dev/neofs-http-gw#downloading", name="downloading") @allure.link("https://github.com/TrueCloudLab/frostfs-http-gw#downloading", name="downloading")
@pytest.mark.sanity @pytest.mark.sanity
@pytest.mark.http_gate @pytest.mark.http_gate
class TestHttpGate(ClusterTestBase): class TestHttpGate(ClusterTestBase):
@ -50,9 +51,9 @@ class TestHttpGate(ClusterTestBase):
Steps: Steps:
1. Create simple and large objects. 1. Create simple and large objects.
2. Put objects using gRPC (neofs-cli). 2. Put objects using gRPC (frostfs-cli).
3. Download objects using HTTP gate (https://github.com/nspcc-dev/neofs-http-gw#downloading). 3. Download objects using HTTP gate (https://github.com/TrueCloudLab/frostfs-http-gw#downloading).
4. Get objects using gRPC (neofs-cli). 4. Get objects using gRPC (frostfs-cli).
5. Compare hashes for got objects. 5. Compare hashes for got objects.
6. Compare hashes for got and original objects. 6. Compare hashes for got and original objects.
@ -97,8 +98,8 @@ class TestHttpGate(ClusterTestBase):
endpoint=self.cluster.default_http_gate_endpoint, endpoint=self.cluster.default_http_gate_endpoint,
) )
@allure.link("https://github.com/nspcc-dev/neofs-http-gw#uploading", name="uploading") @allure.link("https://github.com/TrueCloudLab/frostfs-http-gw#uploading", name="uploading")
@allure.link("https://github.com/nspcc-dev/neofs-http-gw#downloading", name="downloading") @allure.link("https://github.com/TrueCloudLab/frostfs-http-gw#downloading", name="downloading")
@allure.title("Test Put over HTTP, Get over HTTP") @allure.title("Test Put over HTTP, Get over HTTP")
@pytest.mark.smoke @pytest.mark.smoke
def test_put_http_get_http(self, complex_object_size, simple_object_size): def test_put_http_get_http(self, complex_object_size, simple_object_size):
@ -107,8 +108,8 @@ class TestHttpGate(ClusterTestBase):
Steps: Steps:
1. Create simple and large objects. 1. Create simple and large objects.
2. Upload objects using HTTP (https://github.com/nspcc-dev/neofs-http-gw#uploading). 2. Upload objects using HTTP (https://github.com/TrueCloudLab/frostfs-http-gw#uploading).
3. Download objects using HTTP gate (https://github.com/nspcc-dev/neofs-http-gw#downloading). 3. Download objects using HTTP gate (https://github.com/TrueCloudLab/frostfs-http-gw#downloading).
4. Compare hashes for got and original objects. 4. Compare hashes for got and original objects.
Expected result: Expected result:
@ -145,7 +146,8 @@ class TestHttpGate(ClusterTestBase):
) )
@allure.link( @allure.link(
"https://github.com/nspcc-dev/neofs-http-gw#by-attributes", name="download by attributes" "https://github.com/TrueCloudLab/frostfs-http-gw#by-attributes",
name="download by attributes",
) )
@allure.title("Test Put over HTTP, Get over HTTP with headers") @allure.title("Test Put over HTTP, Get over HTTP with headers")
@pytest.mark.parametrize( @pytest.mark.parametrize(
@ -164,7 +166,7 @@ class TestHttpGate(ClusterTestBase):
Steps: Steps:
1. Create simple and large objects. 1. Create simple and large objects.
2. Upload objects using HTTP with particular attributes in the header. 2. Upload objects using HTTP with particular attributes in the header.
3. Download objects by attributes using HTTP gate (https://github.com/nspcc-dev/neofs-http-gw#by-attributes). 3. Download objects by attributes using HTTP gate (https://github.com/TrueCloudLab/frostfs-http-gw#by-attributes).
4. Compare hashes for got and original objects. 4. Compare hashes for got and original objects.
Expected result: Expected result:
@ -215,7 +217,7 @@ class TestHttpGate(ClusterTestBase):
epochs = (curr_epoch, curr_epoch + 1, curr_epoch + 2, curr_epoch + 100) epochs = (curr_epoch, curr_epoch + 1, curr_epoch + 2, curr_epoch + 100)
for epoch in epochs: for epoch in epochs:
headers = {"X-Attribute-Neofs-Expiration-Epoch": str(epoch)} headers = {"X-Attribute-Frostfs-Expiration-Epoch": str(epoch)}
with allure.step("Put objects using HTTP with attribute Expiration-Epoch"): with allure.step("Put objects using HTTP with attribute Expiration-Epoch"):
oids.append( oids.append(

View file

@ -19,7 +19,7 @@ from http_gate import (
upload_via_http_gate_curl, upload_via_http_gate_curl,
) )
from pytest import FixtureRequest from pytest import FixtureRequest
from python_keywords.neofs_verbs import delete_object from python_keywords.frostfs_verbs import delete_object
from wellknown_acl import PUBLIC_ACL from wellknown_acl import PUBLIC_ACL
from helpers.storage_object_info import StorageObjectInfo from helpers.storage_object_info import StorageObjectInfo

View file

@ -10,7 +10,7 @@ from http_gate import (
get_object_by_attr_and_verify_hashes, get_object_by_attr_and_verify_hashes,
try_to_get_object_via_passed_request_and_expect_error, try_to_get_object_via_passed_request_and_expect_error,
) )
from python_keywords.neofs_verbs import put_object_to_random_node from python_keywords.frostfs_verbs import put_object_to_random_node
from wellknown_acl import PUBLIC_ACL from wellknown_acl import PUBLIC_ACL
from steps.cluster_test_base import ClusterTestBase from steps.cluster_test_base import ClusterTestBase
@ -40,8 +40,8 @@ class Test_http_object(ClusterTestBase):
Steps: Steps:
1. Create object; 1. Create object;
2. Put objects using gRPC (neofs-cli) with attributes [--attributes chapter1=peace,chapter2=war]; 2. Put objects using gRPC (frostfs-cli) with attributes [--attributes chapter1=peace,chapter2=war];
3. Download object using HTTP gate (https://github.com/nspcc-dev/neofs-http-gw#downloading); 3. Download object using HTTP gate (https://github.com/TrueCloudLab/frostfs-http-gw#downloading);
4. Compare hashes between original and downloaded object; 4. Compare hashes between original and downloaded object;
5. [Negative] Try to the get object with specified attributes and `get` request: [get/$CID/chapter1/peace]; 5. [Negative] Try to the get object with specified attributes and `get` request: [get/$CID/chapter1/peace];
6. Download the object with specified attributes and `get_by_attribute` request: [get_by_attribute/$CID/chapter1/peace]; 6. Download the object with specified attributes and `get_by_attribute` request: [get_by_attribute/$CID/chapter1/peace];

View file

@ -35,7 +35,7 @@ class Test_http_streaming(ClusterTestBase):
Steps: Steps:
1. Create big object; 1. Create big object;
2. Put object using curl with pipe (streaming); 2. Put object using curl with pipe (streaming);
3. Download object using HTTP gate (https://github.com/nspcc-dev/neofs-http-gw#downloading); 3. Download object using HTTP gate (https://github.com/TrueCloudLab/frostfs-http-gw#downloading);
4. Compare hashes between original and downloaded object; 4. Compare hashes between original and downloaded object;
Expected result: Expected result:

View file

@ -15,20 +15,24 @@ from http_gate import (
try_to_get_object_and_expect_error, try_to_get_object_and_expect_error,
upload_via_http_gate_curl, upload_via_http_gate_curl,
) )
from python_keywords.neofs_verbs import get_netmap_netinfo, get_object_from_random_node, head_object from python_keywords.frostfs_verbs import (
get_netmap_netinfo,
get_object_from_random_node,
head_object,
)
from wellknown_acl import PUBLIC_ACL from wellknown_acl import PUBLIC_ACL
from steps.cluster_test_base import ClusterTestBase from steps.cluster_test_base import ClusterTestBase
logger = logging.getLogger("NeoLogger") logger = logging.getLogger("NeoLogger")
EXPIRATION_TIMESTAMP_HEADER = "__NEOFS__EXPIRATION_TIMESTAMP" EXPIRATION_TIMESTAMP_HEADER = "__FROSRFS__EXPIRATION_TIMESTAMP"
EXPIRATION_EPOCH_HEADER = "__NEOFS__EXPIRATION_EPOCH" EXPIRATION_EPOCH_HEADER = "__FROSRFS__EXPIRATION_EPOCH"
EXPIRATION_DURATION_HEADER = "__NEOFS__EXPIRATION_DURATION" EXPIRATION_DURATION_HEADER = "__FROSRFS__EXPIRATION_DURATION"
EXPIRATION_EXPIRATION_RFC = "__NEOFS__EXPIRATION_RFC3339" EXPIRATION_EXPIRATION_RFC = "__FROSRFS__EXPIRATION_RFC3339"
NEOFS_EXPIRATION_EPOCH = "Neofs-Expiration-Epoch" FROSRFS_EXPIRATION_EPOCH = "Frostfs-Expiration-Epoch"
NEOFS_EXPIRATION_DURATION = "Neofs-Expiration-Duration" FROSRFS_EXPIRATION_DURATION = "Frostfs-Expiration-Duration"
NEOFS_EXPIRATION_TIMESTAMP = "Neofs-Expiration-Timestamp" FROSRFS_EXPIRATION_TIMESTAMP = "Frostfs-Expiration-Timestamp"
NEOFS_EXIPRATION_RFC3339 = "Neofs-Expiration-RFC3339" FROSRFS_EXIPRATION_RFC3339 = "Frostfs-Expiration-RFC3339"
@pytest.mark.sanity @pytest.mark.sanity
@ -94,7 +98,7 @@ class Test_http_system_header(ClusterTestBase):
f"Validate that only {EXPIRATION_EPOCH_HEADER} exists in header and other headers are abesent" f"Validate that only {EXPIRATION_EPOCH_HEADER} exists in header and other headers are abesent"
) )
def validation_for_http_header_attr(self, head_info: dict, expected_epoch: int) -> None: def validation_for_http_header_attr(self, head_info: dict, expected_epoch: int) -> None:
# check that __NEOFS__EXPIRATION_EPOCH attribute has corresponding epoch # check that __FROSTFS__EXPIRATION_EPOCH attribute has corresponding epoch
assert self.check_key_value_presented_header( assert self.check_key_value_presented_header(
head_info, {EXPIRATION_EPOCH_HEADER: str(expected_epoch)} head_info, {EXPIRATION_EPOCH_HEADER: str(expected_epoch)}
), f'Expected to find {EXPIRATION_EPOCH_HEADER}: {expected_epoch} in: {head_info["header"]["attributes"]}' ), f'Expected to find {EXPIRATION_EPOCH_HEADER}: {expected_epoch} in: {head_info["header"]["attributes"]}'
@ -140,7 +144,7 @@ class Test_http_system_header(ClusterTestBase):
@allure.title("[negative] attempt to put object with expired epoch") @allure.title("[negative] attempt to put object with expired epoch")
def test_unable_put_expired_epoch(self, user_container: str, simple_object_size: int): def test_unable_put_expired_epoch(self, user_container: str, simple_object_size: int):
headers = attr_into_str_header_curl( headers = attr_into_str_header_curl(
{"Neofs-Expiration-Epoch": str(get_epoch(self.shell, self.cluster) - 1)} {"Frostfs-Expiration-Epoch": str(get_epoch(self.shell, self.cluster) - 1)}
) )
file_path = generate_file(simple_object_size) file_path = generate_file(simple_object_size)
with allure.step( with allure.step(
@ -154,12 +158,12 @@ class Test_http_system_header(ClusterTestBase):
error_pattern="object has expired", error_pattern="object has expired",
) )
@allure.title("[negative] attempt to put object with negative Neofs-Expiration-Duration") @allure.title("[negative] attempt to put object with negative Frostfs-Expiration-Duration")
def test_unable_put_negative_duration(self, user_container: str, simple_object_size: int): def test_unable_put_negative_duration(self, user_container: str, simple_object_size: int):
headers = attr_into_str_header_curl({"Neofs-Expiration-Duration": "-1h"}) headers = attr_into_str_header_curl({"Frostfs-Expiration-Duration": "-1h"})
file_path = generate_file(simple_object_size) file_path = generate_file(simple_object_size)
with allure.step( with allure.step(
"Put object using HTTP with attribute Neofs-Expiration-Duration where duration is negative" "Put object using HTTP with attribute Frostfs-Expiration-Duration where duration is negative"
): ):
upload_via_http_gate_curl( upload_via_http_gate_curl(
cid=user_container, cid=user_container,
@ -170,13 +174,13 @@ class Test_http_system_header(ClusterTestBase):
) )
@allure.title( @allure.title(
"[negative] attempt to put object with Neofs-Expiration-Timestamp value in the past" "[negative] attempt to put object with Frostfs-Expiration-Timestamp value in the past"
) )
def test_unable_put_expired_timestamp(self, user_container: str, simple_object_size: int): def test_unable_put_expired_timestamp(self, user_container: str, simple_object_size: int):
headers = attr_into_str_header_curl({"Neofs-Expiration-Timestamp": "1635075727"}) headers = attr_into_str_header_curl({"Frostfs-Expiration-Timestamp": "1635075727"})
file_path = generate_file(simple_object_size) file_path = generate_file(simple_object_size)
with allure.step( with allure.step(
"Put object using HTTP with attribute Neofs-Expiration-Timestamp where duration is in the past" "Put object using HTTP with attribute Frostfs-Expiration-Timestamp where duration is in the past"
): ):
upload_via_http_gate_curl( upload_via_http_gate_curl(
cid=user_container, cid=user_container,
@ -187,10 +191,10 @@ class Test_http_system_header(ClusterTestBase):
) )
@allure.title( @allure.title(
"[negative] Put object using HTTP with attribute Neofs-Expiration-RFC3339 where duration is in the past" "[negative] Put object using HTTP with attribute Frostfs-Expiration-RFC3339 where duration is in the past"
) )
def test_unable_put_expired_rfc(self, user_container: str, simple_object_size: int): def test_unable_put_expired_rfc(self, user_container: str, simple_object_size: int):
headers = attr_into_str_header_curl({"Neofs-Expiration-RFC3339": "2021-11-22T09:55:49Z"}) headers = attr_into_str_header_curl({"Frostfs-Expiration-RFC3339": "2021-11-22T09:55:49Z"})
file_path = generate_file(simple_object_size) file_path = generate_file(simple_object_size)
upload_via_http_gate_curl( upload_via_http_gate_curl(
cid=user_container, cid=user_container,
@ -215,7 +219,7 @@ class Test_http_system_header(ClusterTestBase):
logger.info( logger.info(
f"epoch duration={epoch_duration}, current_epoch= {get_epoch(self.shell, self.cluster)} expected_epoch {expected_epoch}" f"epoch duration={epoch_duration}, current_epoch= {get_epoch(self.shell, self.cluster)} expected_epoch {expected_epoch}"
) )
attributes = {NEOFS_EXPIRATION_EPOCH: expected_epoch, NEOFS_EXPIRATION_DURATION: "1m"} attributes = {FROSTFS_EXPIRATION_EPOCH: expected_epoch, FROSTFS_EXPIRATION_DURATION: "1m"}
file_path = generate_file(object_size) file_path = generate_file(object_size)
with allure.step( with allure.step(
f"Put objects using HTTP with attributes and head command should display {EXPIRATION_EPOCH_HEADER}: {expected_epoch} attr" f"Put objects using HTTP with attributes and head command should display {EXPIRATION_EPOCH_HEADER}: {expected_epoch} attr"
@ -263,10 +267,10 @@ class Test_http_system_header(ClusterTestBase):
f"epoch duration={epoch_duration}, current_epoch= {get_epoch(self.shell, self.cluster)} expected_epoch {expected_epoch}" f"epoch duration={epoch_duration}, current_epoch= {get_epoch(self.shell, self.cluster)} expected_epoch {expected_epoch}"
) )
attributes = { attributes = {
NEOFS_EXPIRATION_DURATION: self.epoch_count_into_mins( FROSTFS_EXPIRATION_DURATION: self.epoch_count_into_mins(
epoch_duration=epoch_duration, epoch=2 epoch_duration=epoch_duration, epoch=2
), ),
NEOFS_EXPIRATION_TIMESTAMP: self.epoch_count_into_timestamp( FROSTFS_EXPIRATION_TIMESTAMP: self.epoch_count_into_timestamp(
epoch_duration=epoch_duration, epoch=1 epoch_duration=epoch_duration, epoch=1
), ),
} }
@ -317,10 +321,10 @@ class Test_http_system_header(ClusterTestBase):
f"epoch duration={epoch_duration}, current_epoch= {get_epoch(self.shell, self.cluster)} expected_epoch {expected_epoch}" f"epoch duration={epoch_duration}, current_epoch= {get_epoch(self.shell, self.cluster)} expected_epoch {expected_epoch}"
) )
attributes = { attributes = {
NEOFS_EXPIRATION_TIMESTAMP: self.epoch_count_into_timestamp( FROSTFS_EXPIRATION_TIMESTAMP: self.epoch_count_into_timestamp(
epoch_duration=epoch_duration, epoch=2 epoch_duration=epoch_duration, epoch=2
), ),
NEOFS_EXIPRATION_RFC3339: self.epoch_count_into_timestamp( FROSTFS_EXIPRATION_RFC3339: self.epoch_count_into_timestamp(
epoch_duration=epoch_duration, epoch=1, rfc3339=True epoch_duration=epoch_duration, epoch=1, rfc3339=True
), ),
} }
@ -369,7 +373,7 @@ class Test_http_system_header(ClusterTestBase):
f"epoch duration={epoch_duration}, current_epoch= {get_epoch(self.shell, self.cluster)} expected_epoch {expected_epoch}" f"epoch duration={epoch_duration}, current_epoch= {get_epoch(self.shell, self.cluster)} expected_epoch {expected_epoch}"
) )
attributes = { attributes = {
NEOFS_EXIPRATION_RFC3339: self.epoch_count_into_timestamp( FROSTFS_EXIPRATION_RFC3339: self.epoch_count_into_timestamp(
epoch_duration=epoch_duration, epoch=2, rfc3339=True epoch_duration=epoch_duration, epoch=2, rfc3339=True
) )
} }

View file

@ -33,7 +33,9 @@ def pytest_generate_tests(metafunc):
metafunc.parametrize("s3_client", ["aws cli", "boto3"], indirect=True) metafunc.parametrize("s3_client", ["aws cli", "boto3"], indirect=True)
@allure.link("https://github.com/nspcc-dev/neofs-s3-gw#neofs-s3-gateway", name="neofs-s3-gateway") @allure.link(
"https://github.com/TrueCloudLab/frostfs-s3-gw#frostfs-s3-gw", name="frostfs-s3-gateway"
)
@pytest.mark.sanity @pytest.mark.sanity
@pytest.mark.s3_gate @pytest.mark.s3_gate
@pytest.mark.s3_gate_base @pytest.mark.s3_gate_base

View file

@ -10,7 +10,7 @@ from aws_cli_client import AwsCliClient
from common import ASSETS_DIR, FREE_STORAGE, WALLET_PASS from common import ASSETS_DIR, FREE_STORAGE, WALLET_PASS
from data_formatters import get_wallet_public_key from data_formatters import get_wallet_public_key
from file_helper import concat_files, generate_file, generate_file_with_content, get_file_hash from file_helper import concat_files, generate_file, generate_file_with_content, get_file_hash
from neofs_testlib.utils.wallet import init_wallet from frostfs_testlib.utils.wallet import init_wallet
from python_keywords.payment_neogo import deposit_gas, transfer_gas from python_keywords.payment_neogo import deposit_gas, transfer_gas
from s3_helper import ( from s3_helper import (
assert_object_lock_mode, assert_object_lock_mode,

View file

@ -8,7 +8,7 @@ import requests
from binary_version_helper import get_remote_binaries_versions from binary_version_helper import get_remote_binaries_versions
from common import BIN_VERSIONS_FILE from common import BIN_VERSIONS_FILE
from env_properties import read_env_properties, save_env_properties from env_properties import read_env_properties, save_env_properties
from neofs_testlib.hosting import Hosting from frostfs_testlib.hosting import Hosting
logger = logging.getLogger("NeoLogger") logger = logging.getLogger("NeoLogger")

View file

@ -5,10 +5,10 @@ import pytest
from cluster_test_base import ClusterTestBase from cluster_test_base import ClusterTestBase
from common import WALLET_PASS from common import WALLET_PASS
from file_helper import generate_file from file_helper import generate_file
from frostfs_testlib.utils.wallet import get_last_address_from_wallet
from grpc_responses import SESSION_NOT_FOUND from grpc_responses import SESSION_NOT_FOUND
from neofs_testlib.utils.wallet import get_last_address_from_wallet
from python_keywords.container import create_container from python_keywords.container import create_container
from python_keywords.neofs_verbs import delete_object, put_object, put_object_to_random_node from python_keywords.frostfs_verbs import delete_object, put_object, put_object_to_random_node
from steps.session_token import create_session_token from steps.session_token import create_session_token

View file

@ -6,16 +6,16 @@ from cluster import Cluster
from cluster_test_base import ClusterTestBase from cluster_test_base import ClusterTestBase
from epoch import ensure_fresh_epoch from epoch import ensure_fresh_epoch
from file_helper import generate_file from file_helper import generate_file
from frostfs_testlib.shell import Shell
from grpc_responses import ( from grpc_responses import (
EXPIRED_SESSION_TOKEN, EXPIRED_SESSION_TOKEN,
MALFORMED_REQUEST, MALFORMED_REQUEST,
OBJECT_ACCESS_DENIED, OBJECT_ACCESS_DENIED,
OBJECT_NOT_FOUND, OBJECT_NOT_FOUND,
) )
from neofs_testlib.shell import Shell
from pytest import FixtureRequest from pytest import FixtureRequest
from python_keywords.container import create_container from python_keywords.container import create_container
from python_keywords.neofs_verbs import ( from python_keywords.frostfs_verbs import (
delete_object, delete_object,
get_object, get_object,
get_object_from_random_node, get_object_from_random_node,

View file

@ -1,7 +1,7 @@
import allure import allure
import pytest import pytest
from file_helper import generate_file from file_helper import generate_file
from neofs_testlib.shell import Shell from frostfs_testlib.shell import Shell
from python_keywords.acl import ( from python_keywords.acl import (
EACLAccess, EACLAccess,
EACLOperation, EACLOperation,

View file

@ -10,9 +10,9 @@ import yaml
from cluster import Cluster, StorageNode from cluster import Cluster, StorageNode
from common import WALLET_CONFIG from common import WALLET_CONFIG
from configobj import ConfigObj from configobj import ConfigObj
from neofs_testlib.cli import NeofsCli from frostfs_testlib.cli import FrostfsCli
SHARD_PREFIX = "NEOFS_STORAGE_SHARD_" SHARD_PREFIX = "FROSTFS_STORAGE_SHARD_"
BLOBSTOR_PREFIX = "_BLOBSTOR_" BLOBSTOR_PREFIX = "_BLOBSTOR_"
@ -134,9 +134,9 @@ class TestControlShard:
wallet_password = node.get_wallet_password() wallet_password = node.get_wallet_password()
control_endpoint = node.get_control_endpoint() control_endpoint = node.get_control_endpoint()
cli_config = node.host.get_cli_config("neofs-cli") cli_config = node.host.get_cli_config("frostfs-cli")
cli = NeofsCli(node.host.get_shell(), cli_config.exec_path, WALLET_CONFIG) cli = FrostfsCli(node.host.get_shell(), cli_config.exec_path, WALLET_CONFIG)
result = cli.shards.list( result = cli.shards.list(
endpoint=control_endpoint, endpoint=control_endpoint,
wallet=wallet_path, wallet=wallet_path,

View file

@ -30,7 +30,7 @@ mmh3==3.0.0
multidict==6.0.2 multidict==6.0.2
mypy==0.950 mypy==0.950
mypy-extensions==0.4.3 mypy-extensions==0.4.3
neofs-testlib==1.1.1 frostfs-testlib==1.2.0
netaddr==0.8.0 netaddr==0.8.0
packaging==21.3 packaging==21.3
paramiko==2.10.3 paramiko==2.10.3

View file

@ -10,14 +10,14 @@ from typing import Any, Dict, List, Optional, Union
import allure import allure
import base58 import base58
from common import ASSETS_DIR, NEOFS_CLI_EXEC, WALLET_CONFIG from common import ASSETS_DIR, FROSTFS_CLI_EXEC, WALLET_CONFIG
from data_formatters import get_wallet_public_key from data_formatters import get_wallet_public_key
from neofs_testlib.cli import NeofsCli from frostfs_testlib.cli import FrostfsCli
from neofs_testlib.shell import Shell from frostfs_testlib.shell import Shell
logger = logging.getLogger("NeoLogger") logger = logging.getLogger("NeoLogger")
EACL_LIFETIME = 100500 EACL_LIFETIME = 100500
NEOFS_CONTRACT_CACHE_TIMEOUT = 30 FROSTFS_CONTRACT_CACHE_TIMEOUT = 30
class EACLOperation(Enum): class EACLOperation(Enum):
@ -44,7 +44,7 @@ class EACLRole(Enum):
class EACLHeaderType(Enum): class EACLHeaderType(Enum):
REQUEST = "req" # Filter request headers REQUEST = "req" # Filter request headers
OBJECT = "obj" # Filter object headers OBJECT = "obj" # Filter object headers
SERVICE = "SERVICE" # Filter service headers. These are not processed by NeoFS nodes and exist for service use only SERVICE = "SERVICE" # Filter service headers. These are not processed by FrostFS nodes and exist for service use only
class EACLMatchType(Enum): class EACLMatchType(Enum):
@ -117,7 +117,7 @@ class EACLRule:
@allure.title("Get extended ACL") @allure.title("Get extended ACL")
def get_eacl(wallet_path: str, cid: str, shell: Shell, endpoint: str) -> Optional[str]: def get_eacl(wallet_path: str, cid: str, shell: Shell, endpoint: str) -> Optional[str]:
cli = NeofsCli(shell, NEOFS_CLI_EXEC, WALLET_CONFIG) cli = FrostfsCli(shell, FROSTFS_CLI_EXEC, WALLET_CONFIG)
try: try:
result = cli.container.get_eacl(wallet=wallet_path, rpc_endpoint=endpoint, cid=cid) result = cli.container.get_eacl(wallet=wallet_path, rpc_endpoint=endpoint, cid=cid)
except RuntimeError as exc: except RuntimeError as exc:
@ -138,7 +138,7 @@ def set_eacl(
endpoint: str, endpoint: str,
session_token: Optional[str] = None, session_token: Optional[str] = None,
) -> None: ) -> None:
cli = NeofsCli(shell, NEOFS_CLI_EXEC, WALLET_CONFIG) cli = FrostfsCli(shell, FROSTFS_CLI_EXEC, WALLET_CONFIG)
cli.container.set_eacl( cli.container.set_eacl(
wallet=wallet_path, wallet=wallet_path,
rpc_endpoint=endpoint, rpc_endpoint=endpoint,
@ -156,7 +156,7 @@ def _encode_cid_for_eacl(cid: str) -> str:
def create_eacl(cid: str, rules_list: List[EACLRule], shell: Shell) -> str: def create_eacl(cid: str, rules_list: List[EACLRule], shell: Shell) -> str:
table_file_path = os.path.join(os.getcwd(), ASSETS_DIR, f"eacl_table_{str(uuid.uuid4())}.json") table_file_path = os.path.join(os.getcwd(), ASSETS_DIR, f"eacl_table_{str(uuid.uuid4())}.json")
cli = NeofsCli(shell, NEOFS_CLI_EXEC, WALLET_CONFIG) cli = FrostfsCli(shell, FROSTFS_CLI_EXEC, WALLET_CONFIG)
cli.acl.extended_create(cid=cid, out=table_file_path, rule=rules_list) cli.acl.extended_create(cid=cid, out=table_file_path, rule=rules_list)
with open(table_file_path, "r") as file: with open(table_file_path, "r") as file:
@ -257,15 +257,17 @@ def eacl_rules(access: str, verbs: list, user: str) -> list[str]:
def sign_bearer( def sign_bearer(
shell: Shell, wallet_path: str, eacl_rules_file_from: str, eacl_rules_file_to: str, json: bool shell: Shell, wallet_path: str, eacl_rules_file_from: str, eacl_rules_file_to: str, json: bool
) -> None: ) -> None:
neofscli = NeofsCli(shell=shell, neofs_cli_exec_path=NEOFS_CLI_EXEC, config_file=WALLET_CONFIG) frostfscli = FrostfsCli(
neofscli.util.sign_bearer_token( shell=shell, frostfs_cli_exec_path=FROSTFS_CLI_EXEC, config_file=WALLET_CONFIG
)
frostfscli.util.sign_bearer_token(
wallet=wallet_path, from_file=eacl_rules_file_from, to_file=eacl_rules_file_to, json=json wallet=wallet_path, from_file=eacl_rules_file_from, to_file=eacl_rules_file_to, json=json
) )
@allure.title("Wait for eACL cache expired") @allure.title("Wait for eACL cache expired")
def wait_for_cache_expired(): def wait_for_cache_expired():
sleep(NEOFS_CONTRACT_CACHE_TIMEOUT) sleep(FROSTFS_CONTRACT_CACHE_TIMEOUT)
return return

View file

@ -1,7 +1,7 @@
#!/usr/bin/python3.9 #!/usr/bin/python3.9
""" """
Helper functions to use with `neofs-cli`, `neo-go` and other CLIs. Helper functions to use with `frostfs-cli`, `neo-go` and other CLIs.
""" """
import json import json
import logging import logging

View file

@ -14,11 +14,11 @@ import logging
from typing import Optional, Tuple from typing import Optional, Tuple
import allure import allure
import neofs_verbs import frostfs_verbs
from cluster import Cluster, StorageNode from cluster import Cluster, StorageNode
from common import WALLET_CONFIG from common import WALLET_CONFIG
from neofs_testlib.shell import Shell from frostfs_testlib.shell import Shell
from neofs_verbs import head_object from frostfs_verbs import head_object
from storage_object import StorageObjectInfo from storage_object import StorageObjectInfo
logger = logging.getLogger("NeoLogger") logger = logging.getLogger("NeoLogger")
@ -122,7 +122,7 @@ def get_link_object(
shell: executor for cli command shell: executor for cli command
nodes: list of nodes to do search on nodes: list of nodes to do search on
bearer (optional, str): path to Bearer token file bearer (optional, str): path to Bearer token file
wallet_config (optional, str): path to the neofs-cli config file wallet_config (optional, str): path to the frostfs-cli config file
is_direct: send request directly to the node or not; this flag is_direct: send request directly to the node or not; this flag
turns into `--ttl 1` key turns into `--ttl 1` key
Returns: Returns:
@ -133,7 +133,7 @@ def get_link_object(
for node in nodes: for node in nodes:
endpoint = node.get_rpc_endpoint() endpoint = node.get_rpc_endpoint()
try: try:
resp = neofs_verbs.head_object( resp = frostfs_verbs.head_object(
wallet, wallet,
cid, cid,
oid, oid,
@ -172,7 +172,7 @@ def get_last_object(
for node in nodes: for node in nodes:
endpoint = node.get_rpc_endpoint() endpoint = node.get_rpc_endpoint()
try: try:
resp = neofs_verbs.head_object( resp = frostfs_verbs.head_object(
wallet, cid, oid, shell=shell, endpoint=endpoint, is_raw=True, is_direct=True wallet, cid, oid, shell=shell, endpoint=endpoint, is_raw=True, is_direct=True
) )
if resp["lastPart"]: if resp["lastPart"]:

View file

@ -1,7 +1,7 @@
#!/usr/bin/python3.9 #!/usr/bin/python3.9
""" """
This module contains keywords that utilize `neofs-cli container` commands. This module contains keywords that utilize `frostfs-cli container` commands.
""" """
import json import json
@ -11,9 +11,9 @@ from typing import Optional, Union
import allure import allure
import json_transformers import json_transformers
from common import NEOFS_CLI_EXEC, WALLET_CONFIG from common import FROSTFS_CLI_EXEC, WALLET_CONFIG
from neofs_testlib.cli import NeofsCli from frostfs_testlib.cli import FrostfsCli
from neofs_testlib.shell import Shell from frostfs_testlib.shell import Shell
logger = logging.getLogger("NeoLogger") logger = logging.getLogger("NeoLogger")
@ -38,7 +38,7 @@ def create_container(
wait_for_creation: bool = True, wait_for_creation: bool = True,
) -> str: ) -> str:
""" """
A wrapper for `neofs-cli container create` call. A wrapper for `frostfs-cli container create` call.
Args: Args:
wallet (str): a wallet on whose behalf a container is created wallet (str): a wallet on whose behalf a container is created
@ -52,7 +52,7 @@ def create_container(
the session token; this parameter makes sense the session token; this parameter makes sense
when paired with `session_token` when paired with `session_token`
shell: executor for cli command shell: executor for cli command
endpoint: NeoFS endpoint to send request to, appends to `--rpc-endpoint` key endpoint: FrostFS endpoint to send request to, appends to `--rpc-endpoint` key
options (optional, dict): any other options to pass to the call options (optional, dict): any other options to pass to the call
name (optional, str): container name attribute name (optional, str): container name attribute
await_mode (bool): block execution until container is persisted await_mode (bool): block execution until container is persisted
@ -62,7 +62,7 @@ def create_container(
(str): CID of the created container (str): CID of the created container
""" """
cli = NeofsCli(shell, NEOFS_CLI_EXEC, WALLET_CONFIG) cli = FrostfsCli(shell, FROSTFS_CLI_EXEC, WALLET_CONFIG)
result = cli.container.create( result = cli.container.create(
rpc_endpoint=endpoint, rpc_endpoint=endpoint,
wallet=session_wallet if session_wallet else wallet, wallet=session_wallet if session_wallet else wallet,
@ -117,16 +117,16 @@ def wait_for_container_deletion(
@allure.step("List Containers") @allure.step("List Containers")
def list_containers(wallet: str, shell: Shell, endpoint: str) -> list[str]: def list_containers(wallet: str, shell: Shell, endpoint: str) -> list[str]:
""" """
A wrapper for `neofs-cli container list` call. It returns all the A wrapper for `frostfs-cli container list` call. It returns all the
available containers for the given wallet. available containers for the given wallet.
Args: Args:
wallet (str): a wallet on whose behalf we list the containers wallet (str): a wallet on whose behalf we list the containers
shell: executor for cli command shell: executor for cli command
endpoint: NeoFS endpoint to send request to, appends to `--rpc-endpoint` key endpoint: FrostFS endpoint to send request to, appends to `--rpc-endpoint` key
Returns: Returns:
(list): list of containers (list): list of containers
""" """
cli = NeofsCli(shell, NEOFS_CLI_EXEC, WALLET_CONFIG) cli = FrostfsCli(shell, FROSTFS_CLI_EXEC, WALLET_CONFIG)
result = cli.container.list(rpc_endpoint=endpoint, wallet=wallet) result = cli.container.list(rpc_endpoint=endpoint, wallet=wallet)
logger.info(f"Containers: \n{result}") logger.info(f"Containers: \n{result}")
return result.stdout.split() return result.stdout.split()
@ -141,19 +141,19 @@ def get_container(
json_mode: bool = True, json_mode: bool = True,
) -> Union[dict, str]: ) -> Union[dict, str]:
""" """
A wrapper for `neofs-cli container get` call. It extracts container's A wrapper for `frostfs-cli container get` call. It extracts container's
attributes and rearranges them into a more compact view. attributes and rearranges them into a more compact view.
Args: Args:
wallet (str): path to a wallet on whose behalf we get the container wallet (str): path to a wallet on whose behalf we get the container
cid (str): ID of the container to get cid (str): ID of the container to get
shell: executor for cli command shell: executor for cli command
endpoint: NeoFS endpoint to send request to, appends to `--rpc-endpoint` key endpoint: FrostFS endpoint to send request to, appends to `--rpc-endpoint` key
json_mode (bool): return container in JSON format json_mode (bool): return container in JSON format
Returns: Returns:
(dict, str): dict of container attributes (dict, str): dict of container attributes
""" """
cli = NeofsCli(shell, NEOFS_CLI_EXEC, WALLET_CONFIG) cli = FrostfsCli(shell, FROSTFS_CLI_EXEC, WALLET_CONFIG)
result = cli.container.get(rpc_endpoint=endpoint, wallet=wallet, cid=cid, json_mode=json_mode) result = cli.container.get(rpc_endpoint=endpoint, wallet=wallet, cid=cid, json_mode=json_mode)
if not json_mode: if not json_mode:
@ -170,7 +170,7 @@ def get_container(
@allure.step("Delete Container") @allure.step("Delete Container")
# TODO: make the error message about a non-found container more user-friendly # TODO: make the error message about a non-found container more user-friendly
# https://github.com/nspcc-dev/neofs-contract/issues/121 # https://github.com/nspcc-dev/frostfs-contract/issues/121
def delete_container( def delete_container(
wallet: str, wallet: str,
cid: str, cid: str,
@ -181,18 +181,18 @@ def delete_container(
await_mode: bool = False, await_mode: bool = False,
) -> None: ) -> None:
""" """
A wrapper for `neofs-cli container delete` call. A wrapper for `frostfs-cli container delete` call.
Args: Args:
wallet (str): path to a wallet on whose behalf we delete the container wallet (str): path to a wallet on whose behalf we delete the container
cid (str): ID of the container to delete cid (str): ID of the container to delete
shell: executor for cli command shell: executor for cli command
endpoint: NeoFS endpoint to send request to, appends to `--rpc-endpoint` key endpoint: FrostFS endpoint to send request to, appends to `--rpc-endpoint` key
force (bool): do not check whether container contains locks and remove immediately force (bool): do not check whether container contains locks and remove immediately
session_token: a path to session token file session_token: a path to session token file
This function doesn't return anything. This function doesn't return anything.
""" """
cli = NeofsCli(shell, NEOFS_CLI_EXEC, WALLET_CONFIG) cli = FrostfsCli(shell, FROSTFS_CLI_EXEC, WALLET_CONFIG)
cli.container.delete( cli.container.delete(
wallet=wallet, wallet=wallet,
cid=cid, cid=cid,

View file

@ -2,7 +2,7 @@ from typing import List, Optional
from acl import EACLOperation from acl import EACLOperation
from cluster import Cluster from cluster import Cluster
from neofs_testlib.shell import Shell from frostfs_testlib.shell import Shell
from python_keywords.object_access import ( from python_keywords.object_access import (
can_delete_object, can_delete_object,
can_get_head_object, can_get_head_object,

View file

@ -8,7 +8,7 @@ from neo3.wallet import wallet
def dict_to_attrs(attrs: dict) -> str: def dict_to_attrs(attrs: dict) -> str:
""" """
This function takes a dictionary of object's attributes and converts them This function takes a dictionary of object's attributes and converts them
into string. The string is passed to `--attributes` key of neofs-cli. into string. The string is passed to `--attributes` key of frostfs-cli.
Args: Args:
attrs (dict): object attributes in {"a": "b", "c": "d"} format. attrs (dict): object attributes in {"a": "b", "c": "d"} format.

View file

@ -5,15 +5,15 @@ from typing import Optional
import allure import allure
from cluster import Cluster, StorageNode from cluster import Cluster, StorageNode
from common import ( from common import (
FROSTFS_ADM_CONFIG_PATH,
FROSTFS_ADM_EXEC,
FROSTFS_CLI_EXEC,
MAINNET_BLOCK_TIME, MAINNET_BLOCK_TIME,
NEOFS_ADM_CONFIG_PATH,
NEOFS_ADM_EXEC,
NEOFS_CLI_EXEC,
NEOGO_EXECUTABLE, NEOGO_EXECUTABLE,
) )
from neofs_testlib.cli import NeofsAdm, NeofsCli, NeoGo from frostfs_testlib.cli import FrostfsAdm, FrostfsCli, NeoGo
from neofs_testlib.shell import Shell from frostfs_testlib.shell import Shell
from neofs_testlib.utils.wallet import get_last_address_from_wallet from frostfs_testlib.utils.wallet import get_last_address_from_wallet
from payment_neogo import get_contract_hash from payment_neogo import get_contract_hash
from test_control import wait_for_success from test_control import wait_for_success
from utility import parse_time from utility import parse_time
@ -53,7 +53,7 @@ def get_epoch(shell: Shell, cluster: Cluster, alive_node: Optional[StorageNode]
wallet_path = alive_node.get_wallet_path() wallet_path = alive_node.get_wallet_path()
wallet_config = alive_node.get_wallet_config_path() wallet_config = alive_node.get_wallet_config_path()
cli = NeofsCli(shell=shell, neofs_cli_exec_path=NEOFS_CLI_EXEC, config_file=wallet_config) cli = FrostfsCli(shell=shell, frostfs_cli_exec_path=FROSTFS_CLI_EXEC, config_file=wallet_config)
epoch = cli.netmap.epoch(endpoint, wallet_path) epoch = cli.netmap.epoch(endpoint, wallet_path)
return int(epoch.stdout) return int(epoch.stdout)
@ -62,7 +62,7 @@ def get_epoch(shell: Shell, cluster: Cluster, alive_node: Optional[StorageNode]
@allure.step("Tick Epoch") @allure.step("Tick Epoch")
def tick_epoch(shell: Shell, cluster: Cluster, alive_node: Optional[StorageNode] = None): def tick_epoch(shell: Shell, cluster: Cluster, alive_node: Optional[StorageNode] = None):
""" """
Tick epoch using neofs-adm or NeoGo if neofs-adm is not available (DevEnv) Tick epoch using frostfs-adm or NeoGo if frostfs-adm is not available (DevEnv)
Args: Args:
shell: local shell to make queries about current epoch. Remote shell will be used to tick new one shell: local shell to make queries about current epoch. Remote shell will be used to tick new one
cluster: cluster instance under test cluster: cluster instance under test
@ -72,14 +72,14 @@ def tick_epoch(shell: Shell, cluster: Cluster, alive_node: Optional[StorageNode]
alive_node = alive_node if alive_node else cluster.storage_nodes[0] alive_node = alive_node if alive_node else cluster.storage_nodes[0]
remote_shell = alive_node.host.get_shell() remote_shell = alive_node.host.get_shell()
if NEOFS_ADM_EXEC and NEOFS_ADM_CONFIG_PATH: if FROSTFS_ADM_EXEC and FROSTFS_ADM_CONFIG_PATH:
# If neofs-adm is available, then we tick epoch with it (to be consistent with UAT tests) # If frostfs-adm is available, then we tick epoch with it (to be consistent with UAT tests)
neofsadm = NeofsAdm( frostfsadm = FrostfsAdm(
shell=remote_shell, shell=remote_shell,
neofs_adm_exec_path=NEOFS_ADM_EXEC, frostfs_adm_exec_path=FROSTFS_ADM_EXEC,
config_file=NEOFS_ADM_CONFIG_PATH, config_file=FROSTFS_ADM_CONFIG_PATH,
) )
neofsadm.morph.force_new_epoch() frostfsadm.morph.force_new_epoch()
return return
# Otherwise we tick epoch using transaction # Otherwise we tick epoch using transaction
@ -99,7 +99,7 @@ def tick_epoch(shell: Shell, cluster: Cluster, alive_node: Optional[StorageNode]
neogo.contract.invokefunction( neogo.contract.invokefunction(
wallet=ir_wallet_path, wallet=ir_wallet_path,
wallet_password=ir_wallet_pass, wallet_password=ir_wallet_pass,
scripthash=get_contract_hash(morph_chain, "netmap.neofs", shell=shell), scripthash=get_contract_hash(morph_chain, "netmap.frostfs", shell=shell),
method="newEpoch", method="newEpoch",
arguments=f"int:{cur_epoch + 1}", arguments=f"int:{cur_epoch + 1}",
multisig_hash=f"{ir_address}:Global", multisig_hash=f"{ir_address}:Global",

View file

@ -3,7 +3,7 @@ from time import sleep
import allure import allure
from cluster import Cluster, StorageNode from cluster import Cluster, StorageNode
from neofs_testlib.shell import Shell from frostfs_testlib.shell import Shell
from python_keywords.node_management import storage_node_healthcheck from python_keywords.node_management import storage_node_healthcheck
from storage_policy import get_nodes_with_object from storage_policy import get_nodes_with_object

View file

@ -8,9 +8,9 @@ from typing import Any, Optional
import allure import allure
import json_transformers import json_transformers
from cluster import Cluster from cluster import Cluster
from common import ASSETS_DIR, NEOFS_CLI_EXEC, WALLET_CONFIG from common import ASSETS_DIR, FROSTFS_CLI_EXEC, WALLET_CONFIG
from neofs_testlib.cli import NeofsCli from frostfs_testlib.cli import FrostfsCli
from neofs_testlib.shell import Shell from frostfs_testlib.shell import Shell
logger = logging.getLogger("NeoLogger") logger = logging.getLogger("NeoLogger")
@ -30,7 +30,7 @@ def get_object_from_random_node(
session: Optional[str] = None, session: Optional[str] = None,
) -> str: ) -> str:
""" """
GET from NeoFS random storage node GET from FrostFS random storage node
Args: Args:
wallet: wallet on whose behalf GET is done wallet: wallet on whose behalf GET is done
@ -39,7 +39,7 @@ def get_object_from_random_node(
shell: executor for cli command shell: executor for cli command
bearer (optional, str): path to Bearer Token file, appends to `--bearer` key bearer (optional, str): path to Bearer Token file, appends to `--bearer` key
write_object (optional, str): path to downloaded file, appends to `--file` key write_object (optional, str): path to downloaded file, appends to `--file` key
endpoint: NeoFS endpoint to send request to, appends to `--rpc-endpoint` key endpoint: FrostFS endpoint to send request to, appends to `--rpc-endpoint` key
wallet_config(optional, str): path to the wallet config wallet_config(optional, str): path to the wallet config
no_progress(optional, bool): do not show progress bar no_progress(optional, bool): do not show progress bar
xhdr (optional, dict): Request X-Headers in form of Key=Value xhdr (optional, dict): Request X-Headers in form of Key=Value
@ -78,7 +78,7 @@ def get_object(
session: Optional[str] = None, session: Optional[str] = None,
) -> str: ) -> str:
""" """
GET from NeoFS. GET from FrostFS.
Args: Args:
wallet (str): wallet on whose behalf GET is done wallet (str): wallet on whose behalf GET is done
@ -87,7 +87,7 @@ def get_object(
shell: executor for cli command shell: executor for cli command
bearer: path to Bearer Token file, appends to `--bearer` key bearer: path to Bearer Token file, appends to `--bearer` key
write_object: path to downloaded file, appends to `--file` key write_object: path to downloaded file, appends to `--file` key
endpoint: NeoFS endpoint to send request to, appends to `--rpc-endpoint` key endpoint: FrostFS endpoint to send request to, appends to `--rpc-endpoint` key
wallet_config(optional, str): path to the wallet config wallet_config(optional, str): path to the wallet config
no_progress(optional, bool): do not show progress bar no_progress(optional, bool): do not show progress bar
xhdr (optional, dict): Request X-Headers in form of Key=Value xhdr (optional, dict): Request X-Headers in form of Key=Value
@ -100,7 +100,7 @@ def get_object(
write_object = str(uuid.uuid4()) write_object = str(uuid.uuid4())
file_path = os.path.join(ASSETS_DIR, write_object) file_path = os.path.join(ASSETS_DIR, write_object)
cli = NeofsCli(shell, NEOFS_CLI_EXEC, wallet_config or WALLET_CONFIG) cli = FrostfsCli(shell, FROSTFS_CLI_EXEC, wallet_config or WALLET_CONFIG)
cli.object.get( cli.object.get(
rpc_endpoint=endpoint, rpc_endpoint=endpoint,
wallet=wallet, wallet=wallet,
@ -140,14 +140,14 @@ def get_range_hash(
bearer: path to Bearer Token file, appends to `--bearer` key bearer: path to Bearer Token file, appends to `--bearer` key
range_cut: Range to take hash from in the form offset1:length1,..., range_cut: Range to take hash from in the form offset1:length1,...,
value to pass to the `--range` parameter value to pass to the `--range` parameter
endpoint: NeoFS endpoint to send request to, appends to `--rpc-endpoint` key endpoint: FrostFS endpoint to send request to, appends to `--rpc-endpoint` key
wallet_config: path to the wallet config wallet_config: path to the wallet config
xhdr: Request X-Headers in form of Key=Values xhdr: Request X-Headers in form of Key=Values
session: Filepath to a JSON- or binary-encoded token of the object RANGEHASH session. session: Filepath to a JSON- or binary-encoded token of the object RANGEHASH session.
Returns: Returns:
None None
""" """
cli = NeofsCli(shell, NEOFS_CLI_EXEC, wallet_config or WALLET_CONFIG) cli = FrostfsCli(shell, FROSTFS_CLI_EXEC, wallet_config or WALLET_CONFIG)
result = cli.object.hash( result = cli.object.hash(
rpc_endpoint=endpoint, rpc_endpoint=endpoint,
wallet=wallet, wallet=wallet,
@ -241,7 +241,7 @@ def put_object(
shell: executor for cli command shell: executor for cli command
bearer: path to Bearer Token file, appends to `--bearer` key bearer: path to Bearer Token file, appends to `--bearer` key
attributes: User attributes in form of Key1=Value1,Key2=Value2 attributes: User attributes in form of Key1=Value1,Key2=Value2
endpoint: NeoFS endpoint to send request to, appends to `--rpc-endpoint` key endpoint: FrostFS endpoint to send request to, appends to `--rpc-endpoint` key
wallet_config: path to the wallet config wallet_config: path to the wallet config
no_progress: do not show progress bar no_progress: do not show progress bar
expire_at: Last epoch in the life of the object expire_at: Last epoch in the life of the object
@ -251,7 +251,7 @@ def put_object(
(str): ID of uploaded Object (str): ID of uploaded Object
""" """
cli = NeofsCli(shell, NEOFS_CLI_EXEC, wallet_config or WALLET_CONFIG) cli = FrostfsCli(shell, FROSTFS_CLI_EXEC, wallet_config or WALLET_CONFIG)
result = cli.object.put( result = cli.object.put(
rpc_endpoint=endpoint, rpc_endpoint=endpoint,
wallet=wallet, wallet=wallet,
@ -292,7 +292,7 @@ def delete_object(
oid: ID of Object we are going to delete oid: ID of Object we are going to delete
shell: executor for cli command shell: executor for cli command
bearer: path to Bearer Token file, appends to `--bearer` key bearer: path to Bearer Token file, appends to `--bearer` key
endpoint: NeoFS endpoint to send request to, appends to `--rpc-endpoint` key endpoint: FrostFS endpoint to send request to, appends to `--rpc-endpoint` key
wallet_config: path to the wallet config wallet_config: path to the wallet config
xhdr: Request X-Headers in form of Key=Value xhdr: Request X-Headers in form of Key=Value
session: path to a JSON-encoded container session token session: path to a JSON-encoded container session token
@ -300,7 +300,7 @@ def delete_object(
(str): Tombstone ID (str): Tombstone ID
""" """
cli = NeofsCli(shell, NEOFS_CLI_EXEC, wallet_config or WALLET_CONFIG) cli = FrostfsCli(shell, FROSTFS_CLI_EXEC, wallet_config or WALLET_CONFIG)
result = cli.object.delete( result = cli.object.delete(
rpc_endpoint=endpoint, rpc_endpoint=endpoint,
wallet=wallet, wallet=wallet,
@ -338,7 +338,7 @@ def get_range(
oid: ID of Object we are going to request oid: ID of Object we are going to request
range_cut: range to take data from in the form offset:length range_cut: range to take data from in the form offset:length
shell: executor for cli command shell: executor for cli command
endpoint: NeoFS endpoint to send request to, appends to `--rpc-endpoint` key endpoint: FrostFS endpoint to send request to, appends to `--rpc-endpoint` key
bearer: path to Bearer Token file, appends to `--bearer` key bearer: path to Bearer Token file, appends to `--bearer` key
wallet_config: path to the wallet config wallet_config: path to the wallet config
xhdr: Request X-Headers in form of Key=Value xhdr: Request X-Headers in form of Key=Value
@ -348,7 +348,7 @@ def get_range(
""" """
range_file_path = os.path.join(ASSETS_DIR, str(uuid.uuid4())) range_file_path = os.path.join(ASSETS_DIR, str(uuid.uuid4()))
cli = NeofsCli(shell, NEOFS_CLI_EXEC, wallet_config or WALLET_CONFIG) cli = FrostfsCli(shell, FROSTFS_CLI_EXEC, wallet_config or WALLET_CONFIG)
cli.object.range( cli.object.range(
rpc_endpoint=endpoint, rpc_endpoint=endpoint,
wallet=wallet, wallet=wallet,
@ -393,7 +393,7 @@ def lock_object(
lifetime: Lock lifetime. lifetime: Lock lifetime.
expire_at: Lock expiration epoch. expire_at: Lock expiration epoch.
shell: executor for cli command shell: executor for cli command
endpoint: NeoFS endpoint to send request to, appends to `--rpc-endpoint` key endpoint: FrostFS endpoint to send request to, appends to `--rpc-endpoint` key
session: Path to a JSON-encoded container session token. session: Path to a JSON-encoded container session token.
ttl: TTL value in request meta header (default 2). ttl: TTL value in request meta header (default 2).
wallet: WIF (NEP-2) string or path to the wallet or binary key. wallet: WIF (NEP-2) string or path to the wallet or binary key.
@ -403,7 +403,7 @@ def lock_object(
Lock object ID Lock object ID
""" """
cli = NeofsCli(shell, NEOFS_CLI_EXEC, wallet_config or WALLET_CONFIG) cli = FrostfsCli(shell, FROSTFS_CLI_EXEC, wallet_config or WALLET_CONFIG)
result = cli.object.lock( result = cli.object.lock(
rpc_endpoint=endpoint, rpc_endpoint=endpoint,
lifetime=lifetime, lifetime=lifetime,
@ -447,7 +447,7 @@ def search_object(
cid: ID of Container where we get the Object from cid: ID of Container where we get the Object from
shell: executor for cli command shell: executor for cli command
bearer: path to Bearer Token file, appends to `--bearer` key bearer: path to Bearer Token file, appends to `--bearer` key
endpoint: NeoFS endpoint to send request to, appends to `--rpc-endpoint` key endpoint: FrostFS endpoint to send request to, appends to `--rpc-endpoint` key
filters: key=value pairs to filter Objects filters: key=value pairs to filter Objects
expected_objects_list: a list of ObjectIDs to compare found Objects with expected_objects_list: a list of ObjectIDs to compare found Objects with
wallet_config: path to the wallet config wallet_config: path to the wallet config
@ -460,7 +460,7 @@ def search_object(
list of found ObjectIDs list of found ObjectIDs
""" """
cli = NeofsCli(shell, NEOFS_CLI_EXEC, wallet_config or WALLET_CONFIG) cli = FrostfsCli(shell, FROSTFS_CLI_EXEC, wallet_config or WALLET_CONFIG)
result = cli.object.search( result = cli.object.search(
rpc_endpoint=endpoint, rpc_endpoint=endpoint,
wallet=wallet, wallet=wallet,
@ -508,7 +508,7 @@ def get_netmap_netinfo(
Args: Args:
wallet (str): wallet on whose behalf request is done wallet (str): wallet on whose behalf request is done
shell: executor for cli command shell: executor for cli command
endpoint (optional, str): NeoFS endpoint to send request to, appends to `--rpc-endpoint` key endpoint (optional, str): FrostFS endpoint to send request to, appends to `--rpc-endpoint` key
address: Address of wallet account address: Address of wallet account
ttl: TTL value in request meta header (default 2) ttl: TTL value in request meta header (default 2)
wallet: Path to the wallet or binary key wallet: Path to the wallet or binary key
@ -518,7 +518,7 @@ def get_netmap_netinfo(
(dict): dict of parsed command output (dict): dict of parsed command output
""" """
cli = NeofsCli(shell, NEOFS_CLI_EXEC, wallet_config or WALLET_CONFIG) cli = FrostfsCli(shell, FROSTFS_CLI_EXEC, wallet_config or WALLET_CONFIG)
output = cli.netmap.netinfo( output = cli.netmap.netinfo(
wallet=wallet, wallet=wallet,
rpc_endpoint=endpoint, rpc_endpoint=endpoint,
@ -565,7 +565,7 @@ def head_object(
oid (str): ObjectID to HEAD oid (str): ObjectID to HEAD
shell: executor for cli command shell: executor for cli command
bearer (optional, str): path to Bearer Token file, appends to `--bearer` key bearer (optional, str): path to Bearer Token file, appends to `--bearer` key
endpoint(optional, str): NeoFS endpoint to send request to endpoint(optional, str): FrostFS endpoint to send request to
json_output(optional, bool): return response in JSON format or not; this flag json_output(optional, bool): return response in JSON format or not; this flag
turns into `--json` key turns into `--json` key
is_raw(optional, bool): send "raw" request or not; this flag is_raw(optional, bool): send "raw" request or not; this flag
@ -582,7 +582,7 @@ def head_object(
(str): HEAD response as a plain text (str): HEAD response as a plain text
""" """
cli = NeofsCli(shell, NEOFS_CLI_EXEC, wallet_config or WALLET_CONFIG) cli = FrostfsCli(shell, FROSTFS_CLI_EXEC, wallet_config or WALLET_CONFIG)
result = cli.object.head( result = cli.object.head(
rpc_endpoint=endpoint, rpc_endpoint=endpoint,
wallet=wallet, wallet=wallet,

View file

@ -16,8 +16,8 @@ from cli_helpers import _cmd_run
from cluster import StorageNode from cluster import StorageNode
from common import SIMPLE_OBJECT_SIZE from common import SIMPLE_OBJECT_SIZE
from file_helper import get_file_hash from file_helper import get_file_hash
from neofs_testlib.shell import Shell from frostfs_testlib.shell import Shell
from python_keywords.neofs_verbs import get_object from python_keywords.frostfs_verbs import get_object
from python_keywords.storage_policy import get_nodes_without_object from python_keywords.storage_policy import get_nodes_without_object
logger = logging.getLogger("NeoLogger") logger = logging.getLogger("NeoLogger")

View file

@ -1,5 +1,5 @@
""" """
When doing requests to NeoFS, we get JSON output as an automatically decoded When doing requests to FrostFS, we get JSON output as an automatically decoded
structure from protobuf. Some fields are decoded with boilerplates and binary structure from protobuf. Some fields are decoded with boilerplates and binary
values are Base64-encoded. values are Base64-encoded.

View file

@ -7,10 +7,10 @@ from typing import Optional
import allure import allure
from cluster import Cluster, StorageNode from cluster import Cluster, StorageNode
from common import MORPH_BLOCK_TIME, NEOFS_CLI_EXEC from common import FROSTFS_CLI_EXEC, MORPH_BLOCK_TIME
from epoch import tick_epoch from epoch import tick_epoch
from neofs_testlib.cli import NeofsCli from frostfs_testlib.cli import FrostfsCli
from neofs_testlib.shell import Shell from frostfs_testlib.shell import Shell
from utility import parse_time from utility import parse_time
logger = logging.getLogger("NeoLogger") logger = logging.getLogger("NeoLogger")
@ -107,7 +107,7 @@ def get_netmap_snapshot(node: StorageNode, shell: Shell) -> str:
storage_wallet_config = node.get_wallet_config_path() storage_wallet_config = node.get_wallet_config_path()
storage_wallet_path = node.get_wallet_path() storage_wallet_path = node.get_wallet_path()
cli = NeofsCli(shell, NEOFS_CLI_EXEC, config_file=storage_wallet_config) cli = FrostfsCli(shell, FROSTFS_CLI_EXEC, config_file=storage_wallet_config)
return cli.netmap.snapshot( return cli.netmap.snapshot(
rpc_endpoint=node.get_rpc_endpoint(), rpc_endpoint=node.get_rpc_endpoint(),
wallet=storage_wallet_path, wallet=storage_wallet_path,
@ -187,7 +187,7 @@ def include_node_to_network_map(
storage_node_set_status(node_to_include, status="online") storage_node_set_status(node_to_include, status="online")
# Per suggestion of @fyrchik we need to wait for 2 blocks after we set status and after tick epoch. # Per suggestion of @fyrchik we need to wait for 2 blocks after we set status and after tick epoch.
# First sleep can be omitted after https://github.com/nspcc-dev/neofs-node/issues/1790 complete. # First sleep can be omitted after https://github.com/nspcc-dev/frostfs-node/issues/1790 complete.
time.sleep(parse_time(MORPH_BLOCK_TIME) * 2) time.sleep(parse_time(MORPH_BLOCK_TIME) * 2)
tick_epoch(shell, cluster) tick_epoch(shell, cluster)
@ -235,10 +235,10 @@ def _run_control_command(node: StorageNode, command: str) -> None:
wallet_config = f'password: "{wallet_password}"' wallet_config = f'password: "{wallet_password}"'
shell.exec(f"echo '{wallet_config}' > {wallet_config_path}") shell.exec(f"echo '{wallet_config}' > {wallet_config_path}")
cli_config = host.get_cli_config("neofs-cli") cli_config = host.get_cli_config("frostfs-cli")
# TODO: implement cli.control # TODO: implement cli.control
# cli = NeofsCli(shell, cli_config.exec_path, wallet_config_path) # cli = frostfsCli(shell, cli_config.exec_path, wallet_config_path)
result = shell.exec( result = shell.exec(
f"{cli_config.exec_path} {command} --endpoint {control_endpoint} " f"{cli_config.exec_path} {command} --endpoint {control_endpoint} "
f"--wallet {wallet_path} --config {wallet_config_path}" f"--wallet {wallet_path} --config {wallet_config_path}"

View file

@ -3,9 +3,9 @@ from typing import Optional
import allure import allure
from cluster import Cluster from cluster import Cluster
from file_helper import get_file_hash from file_helper import get_file_hash
from frostfs_testlib.shell import Shell
from grpc_responses import OBJECT_ACCESS_DENIED, error_matches_status from grpc_responses import OBJECT_ACCESS_DENIED, error_matches_status
from neofs_testlib.shell import Shell from python_keywords.frostfs_verbs import (
from python_keywords.neofs_verbs import (
delete_object, delete_object,
get_object_from_random_node, get_object_from_random_node,
get_range, get_range,

View file

@ -7,13 +7,13 @@ from typing import Optional
import allure import allure
from cluster import MainChain, MorphChain from cluster import MainChain, MorphChain
from common import GAS_HASH, MAINNET_BLOCK_TIME, NEOFS_CONTRACT, NEOGO_EXECUTABLE from common import FROSTFS_CONTRACT, GAS_HASH, MAINNET_BLOCK_TIME, NEOGO_EXECUTABLE
from frostfs_testlib.cli import NeoGo
from frostfs_testlib.shell import Shell
from frostfs_testlib.utils.converters import contract_hash_to_address
from frostfs_testlib.utils.wallet import get_last_address_from_wallet
from neo3.wallet import utils as neo3_utils from neo3.wallet import utils as neo3_utils
from neo3.wallet import wallet as neo3_wallet from neo3.wallet import wallet as neo3_wallet
from neofs_testlib.cli import NeoGo
from neofs_testlib.shell import Shell
from neofs_testlib.utils.converters import contract_hash_to_address
from neofs_testlib.utils.wallet import get_last_address_from_wallet
from utility import parse_time from utility import parse_time
logger = logging.getLogger("NeoLogger") logger = logging.getLogger("NeoLogger")
@ -51,7 +51,7 @@ def withdraw_mainnet_gas(shell: Shell, main_chain: MainChain, wlt: str, amount:
wallet=wlt, wallet=wlt,
address=address, address=address,
rpc_endpoint=main_chain.get_endpoint(), rpc_endpoint=main_chain.get_endpoint(),
scripthash=NEOFS_CONTRACT, scripthash=FROSTFS_CONTRACT,
method="withdraw", method="withdraw",
arguments=f"{scripthash} int:{amount}", arguments=f"{scripthash} int:{amount}",
multisig_hash=f"{scripthash}:Global", multisig_hash=f"{scripthash}:Global",
@ -88,10 +88,10 @@ def transaction_accepted(main_chain: MainChain, tx_id: str):
return False return False
@allure.step("Get NeoFS Balance") @allure.step("Get FrostFS Balance")
def get_balance(shell: Shell, morph_chain: MorphChain, wallet_path: str, wallet_password: str = ""): def get_balance(shell: Shell, morph_chain: MorphChain, wallet_path: str, wallet_password: str = ""):
""" """
This function returns NeoFS balance for given wallet. This function returns FrostFS balance for given wallet.
""" """
with open(wallet_path) as wallet_file: with open(wallet_path) as wallet_file:
wallet = neo3_wallet.Wallet.from_json(json.load(wallet_file), password=wallet_password) wallet = neo3_wallet.Wallet.from_json(json.load(wallet_file), password=wallet_password)
@ -99,7 +99,7 @@ def get_balance(shell: Shell, morph_chain: MorphChain, wallet_path: str, wallet_
payload = [{"type": "Hash160", "value": str(acc.script_hash)}] payload = [{"type": "Hash160", "value": str(acc.script_hash)}]
try: try:
resp = morph_chain.rpc_client.invoke_function( resp = morph_chain.rpc_client.invoke_function(
get_contract_hash(morph_chain, "balance.neofs", shell=shell), "balanceOf", payload get_contract_hash(morph_chain, "balance.frostfs", shell=shell), "balanceOf", payload
) )
logger.info(f"Got response \n{resp}") logger.info(f"Got response \n{resp}")
value = int(resp["stack"][0]["value"]) value = int(resp["stack"][0]["value"])
@ -166,7 +166,7 @@ def transfer_gas(
time.sleep(parse_time(MAINNET_BLOCK_TIME)) time.sleep(parse_time(MAINNET_BLOCK_TIME))
@allure.step("NeoFS Deposit") @allure.step("FrostFS Deposit")
def deposit_gas( def deposit_gas(
shell: Shell, shell: Shell,
main_chain: MainChain, main_chain: MainChain,
@ -175,11 +175,11 @@ def deposit_gas(
wallet_from_password: str, wallet_from_password: str,
): ):
""" """
Transferring GAS from given wallet to NeoFS contract address. Transferring GAS from given wallet to FrostFS contract address.
""" """
# get NeoFS contract address # get FrostFS contract address
deposit_addr = contract_hash_to_address(NEOFS_CONTRACT) deposit_addr = contract_hash_to_address(FROSTFS_CONTRACT)
logger.info(f"NeoFS contract address: {deposit_addr}") logger.info(f"FrostFS contract address: {deposit_addr}")
address_from = get_last_address_from_wallet( address_from = get_last_address_from_wallet(
wallet_path=wallet_from_path, wallet_password=wallet_from_password wallet_path=wallet_from_path, wallet_password=wallet_from_password
) )

View file

@ -1,17 +1,17 @@
""" """
This module contains keywords for work with Storage Groups. This module contains keywords for work with Storage Groups.
It contains wrappers for `neofs-cli storagegroup` verbs. It contains wrappers for `frostfs-cli storagegroup` verbs.
""" """
import logging import logging
from typing import Optional from typing import Optional
import allure import allure
from cluster import Cluster from cluster import Cluster
from common import NEOFS_CLI_EXEC, WALLET_CONFIG from common import FROSTFS_CLI_EXEC, WALLET_CONFIG
from complex_object_actions import get_link_object from complex_object_actions import get_link_object
from neofs_testlib.cli import NeofsCli from frostfs_testlib.cli import FrostfsCli
from neofs_testlib.shell import Shell from frostfs_testlib.shell import Shell
from neofs_verbs import head_object from frostfs_verbs import head_object
logger = logging.getLogger("NeoLogger") logger = logging.getLogger("NeoLogger")
@ -28,8 +28,8 @@ def put_storagegroup(
lifetime: int = 10, lifetime: int = 10,
) -> str: ) -> str:
""" """
Wrapper for `neofs-cli storagegroup put`. Before the SG is created, Wrapper for `frostfs-cli storagegroup put`. Before the SG is created,
neofs-cli performs HEAD on `objects`, so this verb must be allowed frostfs-cli performs HEAD on `objects`, so this verb must be allowed
for `wallet` in `cid`. for `wallet` in `cid`.
Args: Args:
shell: Shell instance. shell: Shell instance.
@ -38,12 +38,14 @@ def put_storagegroup(
lifetime: Storage group lifetime in epochs. lifetime: Storage group lifetime in epochs.
objects: List of Object IDs to include into the SG. objects: List of Object IDs to include into the SG.
bearer: Path to Bearer token file. bearer: Path to Bearer token file.
wallet_config: Path to neofs-cli config file. wallet_config: Path to frostfs-cli config file.
Returns: Returns:
Object ID of created Storage Group. Object ID of created Storage Group.
""" """
neofscli = NeofsCli(shell=shell, neofs_cli_exec_path=NEOFS_CLI_EXEC, config_file=wallet_config) frostfscli = FrostfsCli(
result = neofscli.storagegroup.put( shell=shell, frostfs_cli_exec_path=FROSTFS_CLI_EXEC, config_file=wallet_config
)
result = frostfscli.storagegroup.put(
wallet=wallet, wallet=wallet,
cid=cid, cid=cid,
lifetime=lifetime, lifetime=lifetime,
@ -65,19 +67,21 @@ def list_storagegroup(
wallet_config: str = WALLET_CONFIG, wallet_config: str = WALLET_CONFIG,
) -> list: ) -> list:
""" """
Wrapper for `neofs-cli storagegroup list`. This operation Wrapper for `frostfs-cli storagegroup list`. This operation
requires SEARCH allowed for `wallet` in `cid`. requires SEARCH allowed for `wallet` in `cid`.
Args: Args:
shell: Shell instance. shell: Shell instance.
wallet: Path to wallet on whose behalf the SGs are listed in the container wallet: Path to wallet on whose behalf the SGs are listed in the container
cid: ID of Container to list. cid: ID of Container to list.
bearer: Path to Bearer token file. bearer: Path to Bearer token file.
wallet_config: Path to neofs-cli config file. wallet_config: Path to frostfs-cli config file.
Returns: Returns:
Object IDs of found Storage Groups. Object IDs of found Storage Groups.
""" """
neofscli = NeofsCli(shell=shell, neofs_cli_exec_path=NEOFS_CLI_EXEC, config_file=wallet_config) frostfscli = FrostfsCli(
result = neofscli.storagegroup.list( shell=shell, frostfs_cli_exec_path=FROSTFS_CLI_EXEC, config_file=wallet_config
)
result = frostfscli.storagegroup.list(
wallet=wallet, wallet=wallet,
cid=cid, cid=cid,
bearer=bearer, bearer=bearer,
@ -99,19 +103,21 @@ def get_storagegroup(
wallet_config: str = WALLET_CONFIG, wallet_config: str = WALLET_CONFIG,
) -> dict: ) -> dict:
""" """
Wrapper for `neofs-cli storagegroup get`. Wrapper for `frostfs-cli storagegroup get`.
Args: Args:
shell: Shell instance. shell: Shell instance.
wallet: Path to wallet on whose behalf the SG is got. wallet: Path to wallet on whose behalf the SG is got.
cid: ID of Container where SG is stored. cid: ID of Container where SG is stored.
gid: ID of the Storage Group. gid: ID of the Storage Group.
bearer: Path to Bearer token file. bearer: Path to Bearer token file.
wallet_config: Path to neofs-cli config file. wallet_config: Path to frostfs-cli config file.
Returns: Returns:
Detailed information on the Storage Group. Detailed information on the Storage Group.
""" """
neofscli = NeofsCli(shell=shell, neofs_cli_exec_path=NEOFS_CLI_EXEC, config_file=wallet_config) frostfscli = FrostfsCli(
result = neofscli.storagegroup.get( shell=shell, frostfs_cli_exec_path=FROSTFS_CLI_EXEC, config_file=wallet_config
)
result = frostfscli.storagegroup.get(
wallet=wallet, wallet=wallet,
cid=cid, cid=cid,
bearer=bearer, bearer=bearer,
@ -120,7 +126,7 @@ def get_storagegroup(
) )
# TODO: temporary solution for parsing output. Needs to be replaced with # TODO: temporary solution for parsing output. Needs to be replaced with
# JSON parsing when https://github.com/nspcc-dev/neofs-node/issues/1355 # JSON parsing when https://github.com/nspcc-dev/frostfs-node/issues/1355
# is done. # is done.
strings = result.stdout.strip().split("\n") strings = result.stdout.strip().split("\n")
# first three strings go to `data`; # first three strings go to `data`;
@ -148,19 +154,21 @@ def delete_storagegroup(
wallet_config: str = WALLET_CONFIG, wallet_config: str = WALLET_CONFIG,
) -> str: ) -> str:
""" """
Wrapper for `neofs-cli storagegroup delete`. Wrapper for `frostfs-cli storagegroup delete`.
Args: Args:
shell: Shell instance. shell: Shell instance.
wallet: Path to wallet on whose behalf the SG is deleted. wallet: Path to wallet on whose behalf the SG is deleted.
cid: ID of Container where SG is stored. cid: ID of Container where SG is stored.
gid: ID of the Storage Group. gid: ID of the Storage Group.
bearer: Path to Bearer token file. bearer: Path to Bearer token file.
wallet_config: Path to neofs-cli config file. wallet_config: Path to frostfs-cli config file.
Returns: Returns:
Tombstone ID of the deleted Storage Group. Tombstone ID of the deleted Storage Group.
""" """
neofscli = NeofsCli(shell=shell, neofs_cli_exec_path=NEOFS_CLI_EXEC, config_file=wallet_config) frostfscli = FrostfsCli(
result = neofscli.storagegroup.delete( shell=shell, frostfs_cli_exec_path=FROSTFS_CLI_EXEC, config_file=wallet_config
)
result = frostfscli.storagegroup.delete(
wallet=wallet, wallet=wallet,
cid=cid, cid=cid,
bearer=bearer, bearer=bearer,

View file

@ -10,10 +10,10 @@ from typing import List
import allure import allure
import complex_object_actions import complex_object_actions
import neofs_verbs import frostfs_verbs
from cluster import StorageNode from cluster import StorageNode
from frostfs_testlib.shell import Shell
from grpc_responses import OBJECT_NOT_FOUND, error_matches_status from grpc_responses import OBJECT_NOT_FOUND, error_matches_status
from neofs_testlib.shell import Shell
logger = logging.getLogger("NeoLogger") logger = logging.getLogger("NeoLogger")
@ -66,7 +66,7 @@ def get_simple_object_copies(
copies = 0 copies = 0
for node in nodes: for node in nodes:
try: try:
response = neofs_verbs.head_object( response = frostfs_verbs.head_object(
wallet, cid, oid, shell=shell, endpoint=node.get_rpc_endpoint(), is_direct=True wallet, cid, oid, shell=shell, endpoint=node.get_rpc_endpoint(), is_direct=True
) )
if response: if response:
@ -123,7 +123,7 @@ def get_nodes_with_object(
wallet = node.get_wallet_path() wallet = node.get_wallet_path()
wallet_config = node.get_wallet_config_path() wallet_config = node.get_wallet_config_path()
try: try:
res = neofs_verbs.head_object( res = frostfs_verbs.head_object(
wallet, wallet,
cid, cid,
oid, oid,
@ -160,7 +160,7 @@ def get_nodes_without_object(
nodes_list = [] nodes_list = []
for node in nodes: for node in nodes:
try: try:
res = neofs_verbs.head_object( res = frostfs_verbs.head_object(
wallet, cid, oid, shell=shell, endpoint=node.get_rpc_endpoint(), is_direct=True wallet, cid, oid, shell=shell, endpoint=node.get_rpc_endpoint(), is_direct=True
) )
if res is None: if res is None:

View file

@ -2,9 +2,9 @@ import json
import logging import logging
import allure import allure
from frostfs_testlib.shell import Shell
from frostfs_verbs import head_object
from neo3.wallet import wallet from neo3.wallet import wallet
from neofs_testlib.shell import Shell
from neofs_verbs import head_object
logger = logging.getLogger("NeoLogger") logger = logging.getLogger("NeoLogger")

View file

@ -11,7 +11,7 @@ COMPLEX_OBJECT_TAIL_SIZE = os.getenv("COMPLEX_OBJECT_TAIL_SIZE", "1000")
MAINNET_BLOCK_TIME = os.getenv("MAINNET_BLOCK_TIME", "1s") MAINNET_BLOCK_TIME = os.getenv("MAINNET_BLOCK_TIME", "1s")
MAINNET_TIMEOUT = os.getenv("MAINNET_TIMEOUT", "1min") MAINNET_TIMEOUT = os.getenv("MAINNET_TIMEOUT", "1min")
MORPH_BLOCK_TIME = os.getenv("MORPH_BLOCK_TIME", "1s") MORPH_BLOCK_TIME = os.getenv("MORPH_BLOCK_TIME", "1s")
NEOFS_CONTRACT_CACHE_TIMEOUT = os.getenv("NEOFS_CONTRACT_CACHE_TIMEOUT", "30s") FROSTFS_CONTRACT_CACHE_TIMEOUT = os.getenv("FROSTFS_CONTRACT_CACHE_TIMEOUT", "30s")
# Time interval that allows a GC pass on storage node (this includes GC sleep interval # Time interval that allows a GC pass on storage node (this includes GC sleep interval
# of 1min plus 15 seconds for GC pass itself) # of 1min plus 15 seconds for GC pass itself)
@ -19,10 +19,10 @@ STORAGE_GC_TIME = os.getenv("STORAGE_GC_TIME", "75s")
GAS_HASH = os.getenv("GAS_HASH", "0xd2a4cff31913016155e38e474a2c06d08be276cf") GAS_HASH = os.getenv("GAS_HASH", "0xd2a4cff31913016155e38e474a2c06d08be276cf")
NEOFS_CONTRACT = os.getenv("NEOFS_IR_CONTRACTS_NEOFS") FROSTFS_CONTRACT = os.getenv("FROSTFS_IR_CONTRACTS_FROSTFS")
ASSETS_DIR = os.getenv("ASSETS_DIR", "TemporaryDir") ASSETS_DIR = os.getenv("ASSETS_DIR", "TemporaryDir")
DEVENV_PATH = os.getenv("DEVENV_PATH", os.path.join("..", "neofs-dev-env")) DEVENV_PATH = os.getenv("DEVENV_PATH", os.path.join("..", "frostfs-dev-env"))
# Password of wallet owned by user on behalf of whom we are running tests # Password of wallet owned by user on behalf of whom we are running tests
WALLET_PASS = os.getenv("WALLET_PASS", "") WALLET_PASS = os.getenv("WALLET_PASS", "")
@ -30,12 +30,12 @@ WALLET_PASS = os.getenv("WALLET_PASS", "")
# Paths to CLI executables on machine that runs tests # Paths to CLI executables on machine that runs tests
NEOGO_EXECUTABLE = os.getenv("NEOGO_EXECUTABLE", "neo-go") NEOGO_EXECUTABLE = os.getenv("NEOGO_EXECUTABLE", "neo-go")
NEOFS_CLI_EXEC = os.getenv("NEOFS_CLI_EXEC", "neofs-cli") FROSTFS_CLI_EXEC = os.getenv("FROSTFS_CLI_EXEC", "frostfs-cli")
NEOFS_AUTHMATE_EXEC = os.getenv("NEOFS_AUTHMATE_EXEC", "neofs-authmate") FROSTFS_AUTHMATE_EXEC = os.getenv("FROSTFS_AUTHMATE_EXEC", "frostfs-authmate")
NEOFS_ADM_EXEC = os.getenv("NEOFS_ADM_EXEC", "neofs-adm") FROSTFS_ADM_EXEC = os.getenv("FROSTFS_ADM_EXEC", "frostfs-adm")
# Config for neofs-adm utility. Optional if tests are running against devenv # Config for frostfs-adm utility. Optional if tests are running against devenv
NEOFS_ADM_CONFIG_PATH = os.getenv("NEOFS_ADM_CONFIG_PATH") FROSTFS_ADM_CONFIG_PATH = os.getenv("FROSTFS_ADM_CONFIG_PATH")
FREE_STORAGE = os.getenv("FREE_STORAGE", "false").lower() == "true" FREE_STORAGE = os.getenv("FREE_STORAGE", "false").lower() == "true"
BIN_VERSIONS_FILE = os.getenv("BIN_VERSIONS_FILE") BIN_VERSIONS_FILE = os.getenv("BIN_VERSIONS_FILE")

View file

@ -1,6 +1,6 @@
# DevEnv variables # DevEnv variables
export NEOFS_MORPH_DISABLE_CACHE=true export NEOFS_MORPH_DISABLE_CACHE=true
export DEVENV_PATH="${DEVENV_PATH:-${VIRTUAL_ENV}/../../neofs-dev-env}" export DEVENV_PATH="${DEVENV_PATH:-${VIRTUAL_ENV}/../../frostfs-dev-env}"
pushd $DEVENV_PATH > /dev/null pushd $DEVENV_PATH > /dev/null
export `make env` export `make env`
popd > /dev/null popd > /dev/null