forked from TrueCloudLab/frostfs-testcases
Fix s3_client fixture
Signed-off-by: Dmitriy Zayakin <d.zayakin@yadro.com>
This commit is contained in:
parent
ead55f657f
commit
5acf19592a
1 changed files with 9 additions and 3 deletions
|
@ -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}"
|
||||
|
||||
|
|
Loading…
Reference in a new issue