diff --git a/pytest_tests/helpers/container.py b/pytest_tests/helpers/container.py index 264eea8f..eba48929 100644 --- a/pytest_tests/helpers/container.py +++ b/pytest_tests/helpers/container.py @@ -8,12 +8,12 @@ import allure from frostfs_testlib.cli import FrostfsCli from frostfs_testlib.shell import Shell from frostfs_testlib.utils import json_utils -from wallet import WalletFile from pytest_tests.helpers.cluster import Cluster from pytest_tests.helpers.file_helper import generate_file, get_file_hash from pytest_tests.helpers.frostfs_verbs import put_object, put_object_to_random_node from pytest_tests.helpers.storage_object_info import StorageObjectInfo +from pytest_tests.helpers.wallet import WalletFile from pytest_tests.resources.common import FROSTFS_CLI_EXEC, WALLET_CONFIG logger = logging.getLogger("NeoLogger") diff --git a/pytest_tests/helpers/epoch.py b/pytest_tests/helpers/epoch.py index 3c04c6fa..1eed15f1 100644 --- a/pytest_tests/helpers/epoch.py +++ b/pytest_tests/helpers/epoch.py @@ -6,9 +6,9 @@ import allure from frostfs_testlib.cli import FrostfsAdm, FrostfsCli, NeoGo from frostfs_testlib.shell import Shell from frostfs_testlib.utils import datetime_utils, wallet_utils -from payment_neogo import get_contract_hash from pytest_tests.helpers.cluster import Cluster, StorageNode +from pytest_tests.helpers.payment_neogo import get_contract_hash from pytest_tests.helpers.test_control import wait_for_success from pytest_tests.resources.common import ( FROSTFS_ADM_CONFIG_PATH, diff --git a/pytest_tests/helpers/http_gate.py b/pytest_tests/helpers/http_gate.py index 226fde23..945f3a92 100644 --- a/pytest_tests/helpers/http_gate.py +++ b/pytest_tests/helpers/http_gate.py @@ -10,9 +10,9 @@ from urllib.parse import quote_plus import allure import requests -from aws_cli_client import LONG_TIMEOUT from frostfs_testlib.shell import Shell +from pytest_tests.helpers.aws_cli_client import LONG_TIMEOUT from pytest_tests.helpers.cli_helpers import _cmd_run from pytest_tests.helpers.cluster import StorageNode from pytest_tests.helpers.file_helper import get_file_hash diff --git a/pytest_tests/helpers/k6.py b/pytest_tests/helpers/k6.py index 5bb08f8b..906a1fef 100644 --- a/pytest_tests/helpers/k6.py +++ b/pytest_tests/helpers/k6.py @@ -6,7 +6,8 @@ from typing import Optional import allure from frostfs_testlib.shell import Shell -from remote_process import RemoteProcess + +from pytest_tests.helpers.remote_process import RemoteProcess EXIT_RESULT_CODE = 0 LOAD_RESULTS_PATTERNS = { diff --git a/pytest_tests/steps/s3_gate_base.py b/pytest_tests/steps/s3_gate_base.py index 72fa8239..9ab84b35 100644 --- a/pytest_tests/steps/s3_gate_base.py +++ b/pytest_tests/steps/s3_gate_base.py @@ -8,14 +8,14 @@ from typing import Any, Optional import allure import boto3 import pytest -import s3_gate_bucket -import s3_gate_object import urllib3 from botocore.config import Config from botocore.exceptions import ClientError from frostfs_testlib.shell import Shell from pytest import FixtureRequest +from pytest_tests.steps import s3_gate_bucket +from pytest_tests.steps import s3_gate_object from pytest_tests.helpers.aws_cli_client import AwsCliClient from pytest_tests.helpers.cli_helpers import _cmd_run, _configure_aws_cli, _run_with_passwd from pytest_tests.helpers.cluster import Cluster diff --git a/pytest_tests/steps/s3_gate_object.py b/pytest_tests/steps/s3_gate_object.py index e8b0c4be..3e4fe243 100644 --- a/pytest_tests/steps/s3_gate_object.py +++ b/pytest_tests/steps/s3_gate_object.py @@ -8,10 +8,10 @@ import allure import pytest import urllib3 from botocore.exceptions import ClientError -from s3_gate_bucket import S3_SYNC_WAIT_TIME from pytest_tests.helpers.aws_cli_client import AwsCliClient from pytest_tests.helpers.cli_helpers import log_command_execution +from pytest_tests.steps.s3_gate_bucket import S3_SYNC_WAIT_TIME ########################################################## # Disabling warnings on self-signed certificate which the 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 56977353..e4c51dc4 100644 --- a/pytest_tests/testsuites/services/s3_gate/test_s3_object.py +++ b/pytest_tests/testsuites/services/s3_gate/test_s3_object.py @@ -6,17 +6,10 @@ from random import choices, sample import allure import pytest -from frostfs_testlib.utils import wallet_utils - -from pytest_tests.helpers.aws_cli_client import AwsCliClient -from pytest_tests.helpers.file_helper import ( - concat_files, - generate_file, - generate_file_with_content, - get_file_hash, -) -from pytest_tests.helpers.payment_neogo import deposit_gas, transfer_gas -from pytest_tests.helpers.s3_helper import ( +from aws_cli_client import AwsCliClient +from common import ASSETS_DIR +from file_helper import concat_files, generate_file, generate_file_with_content, get_file_hash +from s3_helper import ( assert_object_lock_mode, assert_s3_acl, check_objects_in_bucket, @@ -662,37 +655,10 @@ class TestS3GateObject(TestS3GateBase): {"Key": tag_key_3, "Value": str(tag_value_3)} ], "Tags must be the same" - @pytest.fixture - def prepare_two_wallets(self, default_wallet, client_shell): - self.main_wallet = default_wallet - self.main_public_key = wallet_utils.get_wallet_public_key(self.main_wallet, WALLET_PASS) - self.other_wallet = os.path.join(os.getcwd(), ASSETS_DIR, f"{str(uuid.uuid4())}.json") - wallet_utils.init_wallet(self.other_wallet, WALLET_PASS) - self.other_public_key = wallet_utils.get_wallet_public_key(self.other_wallet, WALLET_PASS) - - if not FREE_STORAGE: - main_chain = self.cluster.main_chain_nodes[0] - deposit = 30 - transfer_gas( - shell=client_shell, - amount=deposit + 1, - main_chain=main_chain, - wallet_to_path=self.other_wallet, - wallet_to_password=WALLET_PASS, - ) - deposit_gas( - shell=client_shell, - main_chain=main_chain, - amount=deposit, - wallet_from_path=self.other_wallet, - wallet_from_password=WALLET_PASS, - ) - @allure.title("Test S3: put object with ACL") @pytest.mark.parametrize("bucket_versioning", ["ENABLED", "SUSPENDED"]) def test_s3_put_object_acl( self, - prepare_two_wallets, bucket_versioning, bucket, complex_object_size,