diff --git a/pytest_tests/helpers/k6.py b/pytest_tests/helpers/k6.py index dbee703..abfad38 100644 --- a/pytest_tests/helpers/k6.py +++ b/pytest_tests/helpers/k6.py @@ -5,7 +5,6 @@ from time import sleep import allure from neofs_testlib.shell import Shell - from remote_process import RemoteProcess EXIT_RESULT_CODE = 0 diff --git a/pytest_tests/helpers/remote_process.py b/pytest_tests/helpers/remote_process.py index 35daad6..9137a27 100644 --- a/pytest_tests/helpers/remote_process.py +++ b/pytest_tests/helpers/remote_process.py @@ -41,9 +41,7 @@ class RemoteProcess: Returns: RemoteProcess instance for further examination """ - remote_process = cls( - cmd=command, process_dir=f"/tmp/proc_{uuid.uuid4()}", shell=shell - ) + remote_process = cls(cmd=command, process_dir=f"/tmp/proc_{uuid.uuid4()}", shell=shell) remote_process._create_process_dir() remote_process._generate_command_script(command) remote_process._start_process() diff --git a/pytest_tests/steps/load.py b/pytest_tests/steps/load.py index 8eaf553..ed3920c 100644 --- a/pytest_tests/steps/load.py +++ b/pytest_tests/steps/load.py @@ -3,11 +3,10 @@ from dataclasses import asdict import allure from common import STORAGE_NODE_SERVICE_NAME_REGEX +from k6 import K6, LoadParams, LoadResults from neofs_testlib.hosting import Hosting from neofs_testlib.shell import SSHShell -from k6 import K6, LoadParams, LoadResults - @allure.title("Get services endpoints") def get_services_endpoints( diff --git a/pytest_tests/testsuites/conftest.py b/pytest_tests/testsuites/conftest.py index 5d066f4..7b5362c 100644 --- a/pytest_tests/testsuites/conftest.py +++ b/pytest_tests/testsuites/conftest.py @@ -19,6 +19,7 @@ from python_keywords.node_management import node_healthcheck logger = logging.getLogger("NeoLogger") + def pytest_collection_modifyitems(items): # Make network tests last based on @pytest.mark.node_mgmt def priority(item: pytest.Item) -> int: @@ -27,6 +28,7 @@ def pytest_collection_modifyitems(items): items.sort(key=lambda item: priority(item)) + @pytest.fixture(scope="session") def configure_testlib(): get_reporter().register_handler(AllureHandler()) diff --git a/pytest_tests/testsuites/load/test_load.py b/pytest_tests/testsuites/load/test_load.py index c509e04..fae883b 100644 --- a/pytest_tests/testsuites/load/test_load.py +++ b/pytest_tests/testsuites/load/test_load.py @@ -3,14 +3,12 @@ from enum import Enum import allure import pytest from common import ( + HTTP_GATE_SERVICE_NAME_REGEX, LOAD_NODE_SSH_PRIVATE_KEY_PATH, LOAD_NODE_SSH_USER, LOAD_NODES, STORAGE_NODE_SERVICE_NAME_REGEX, - HTTP_GATE_SERVICE_NAME_REGEX, ) -from neofs_testlib.hosting import Hosting - from k6 import LoadParams from load import ( clear_cache_and_data, @@ -18,6 +16,7 @@ from load import ( multi_node_k6_run, prepare_k6_instances, ) +from neofs_testlib.hosting import Hosting class LoadTime(Enum): diff --git a/pytest_tests/testsuites/network/test_node_management.py b/pytest_tests/testsuites/network/test_node_management.py index b2ffe92..c97f327 100644 --- a/pytest_tests/testsuites/network/test_node_management.py +++ b/pytest_tests/testsuites/network/test_node_management.py @@ -349,7 +349,7 @@ def test_placement_policy_negative( @pytest.mark.node_mgmt @allure.title("NeoFS object replication on node failover") def test_replication( - prepare_wallet_and_deposit, client_shell: Shell, after_run_start_all_nodes, hosting: Hosting + prepare_wallet_and_deposit, client_shell: Shell, after_run_start_all_nodes, hosting: Hosting ): """ Test checks object replication on storage not failover and come back. diff --git a/pytest_tests/testsuites/payment/test_balance.py b/pytest_tests/testsuites/payment/test_balance.py index 3131a25..717c33e 100644 --- a/pytest_tests/testsuites/payment/test_balance.py +++ b/pytest_tests/testsuites/payment/test_balance.py @@ -5,7 +5,14 @@ import uuid import allure import pytest import yaml -from common import ASSETS_DIR, FREE_STORAGE, NEOFS_CLI_EXEC, NEOFS_ENDPOINT, WALLET_CONFIG, WALLET_PASS +from common import ( + ASSETS_DIR, + FREE_STORAGE, + NEOFS_CLI_EXEC, + NEOFS_ENDPOINT, + WALLET_CONFIG, + WALLET_PASS, +) from neofs_testlib.cli import NeofsCli from neofs_testlib.utils.wallet import get_last_address_from_wallet, init_wallet diff --git a/pytest_tests/testsuites/services/s3_gate/test_s3_object.py b/pytest_tests/testsuites/services/s3_gate/test_s3_object.py index 184b15e..8f5ef5f 100644 --- a/pytest_tests/testsuites/services/s3_gate/test_s3_object.py +++ b/pytest_tests/testsuites/services/s3_gate/test_s3_object.py @@ -8,9 +8,9 @@ import pytest from common import ASSETS_DIR, COMPLEX_OBJ_SIZE, FREE_STORAGE, SIMPLE_OBJ_SIZE, WALLET_PASS from data_formatters import get_wallet_public_key from file_helper import concat_files, generate_file, generate_file_with_content, get_file_hash +from neofs_testlib.utils.wallet import init_wallet from python_keywords.payment_neogo import deposit_gas, transfer_gas from s3_helper import assert_object_lock_mode, check_objects_in_bucket, set_bucket_versioning -from neofs_testlib.utils.wallet import init_wallet from steps import s3_gate_bucket, s3_gate_object from steps.aws_cli_client import AwsCliClient diff --git a/requirements.txt b/requirements.txt index 66dd6ee..2bcf6c2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -35,7 +35,7 @@ neo-mamba==0.10.0 neo3crypto==0.2.1 neo3vm==0.9.0 neo3vm-stubs==0.9.0 -neofs-testlib==0.3.0 +neofs-testlib==0.4.0 netaddr==0.8.0 orjson==3.6.8 packaging==21.3 diff --git a/robot/resources/lib/python_keywords/session_token.py b/robot/resources/lib/python_keywords/session_token.py index af3caff..849cf88 100644 --- a/robot/resources/lib/python_keywords/session_token.py +++ b/robot/resources/lib/python_keywords/session_token.py @@ -7,9 +7,9 @@ import uuid import allure import json_transformers from common import ASSETS_DIR, NEOFS_CLI_EXEC, NEOFS_ENDPOINT, WALLET_CONFIG +from neo3 import wallet from neofs_testlib.cli import NeofsCli from neofs_testlib.shell import Shell -from neo3 import wallet logger = logging.getLogger("NeoLogger")