From 241d3d0585f1383cdcbf329c9aa6054ef8570077 Mon Sep 17 00:00:00 2001 From: Dmitriy Zayakin Date: Tue, 16 Jan 2024 08:14:49 +0300 Subject: [PATCH] [#184] Small fix using function search container Signed-off-by: Dmitriy Zayakin --- .../services/s3_gate/test_s3_policy.py | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/pytest_tests/testsuites/services/s3_gate/test_s3_policy.py b/pytest_tests/testsuites/services/s3_gate/test_s3_policy.py index 0c1e11e2..ed618afe 100644 --- a/pytest_tests/testsuites/services/s3_gate/test_s3_policy.py +++ b/pytest_tests/testsuites/services/s3_gate/test_s3_policy.py @@ -51,12 +51,10 @@ class TestS3GatePolicy(ClusterTestBase): assert bucket_loc_2 == "rep-3" with reporter.step("Check object policy"): - cid_1 = search_container_by_name( - default_wallet, - bucket_1, - shell=self.shell, - endpoint=self.cluster.default_rpc_endpoint, - ) + for cluster_node in self.cluster.cluster_nodes: + cid_1 = search_container_by_name(name=bucket_1, node=cluster_node) + if cid_1: + break copies_1 = get_simple_object_copies( wallet=default_wallet, cid=cid_1, @@ -65,12 +63,10 @@ class TestS3GatePolicy(ClusterTestBase): nodes=self.cluster.storage_nodes, ) assert copies_1 == 1 - cid_2 = search_container_by_name( - default_wallet, - bucket_2, - shell=self.shell, - endpoint=self.cluster.default_rpc_endpoint, - ) + for cluster_node in self.cluster.cluster_nodes: + cid_2 = search_container_by_name(name=bucket_1, node=cluster_node) + if cid_2: + break copies_2 = get_simple_object_copies( wallet=default_wallet, cid=cid_2,