From 5b1641eddea1acdcce2261996cdbc4df7bf035a6 Mon Sep 17 00:00:00 2001 From: Dmitriy Zayakin Date: Wed, 21 Jun 2023 14:31:42 +0300 Subject: [PATCH] Fix s3_client fixture Signed-off-by: Dmitriy Zayakin --- pytest_tests/testsuites/conftest.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pytest_tests/testsuites/conftest.py b/pytest_tests/testsuites/conftest.py index 3ac87fa..4057d5c 100644 --- a/pytest_tests/testsuites/conftest.py +++ b/pytest_tests/testsuites/conftest.py @@ -24,7 +24,7 @@ from frostfs_testlib.steps.node_management import storage_node_healthcheck from frostfs_testlib.steps.s3 import s3_helper from frostfs_testlib.storage.cluster import Cluster from frostfs_testlib.storage.controllers.cluster_state_controller import ClusterStateController -from frostfs_testlib.storage.dataclasses.wallet import WalletFactory +from frostfs_testlib.storage.dataclasses.wallet import WalletFactory, WalletInfo from frostfs_testlib.testing.cluster_test_base import ClusterTestBase from frostfs_testlib.utils import env_utils, version_utils @@ -166,12 +166,18 @@ def s3_client( request: pytest.FixtureRequest, ) -> S3ClientWrapper: s3_bearer_rules_file = f"{os.getcwd()}/pytest_tests/resources/files/s3_bearer_rules.json" + wallet = WalletInfo(path=default_wallet, password=DEFAULT_WALLET_PASS) (cid, access_key_id, secret_access_key) = s3_helper.init_s3_credentials( - default_wallet, cluster, s3_bearer_rules_file=s3_bearer_rules_file, policy=s3_policy + wallet, + client_shell, + cluster, + s3gates=[cluster_node.s3_gate for cluster_node in cluster.cluster_nodes], + s3_bearer_rules_file=s3_bearer_rules_file, + policy=s3_policy, ) containers_list = list_containers( - default_wallet, shell=client_shell, endpoint=cluster.default_rpc_endpoint + wallet.path, shell=client_shell, endpoint=cluster.default_rpc_endpoint ) assert cid in containers_list, f"Expected cid {cid} in {containers_list}"