From 6174330f49fc78453ec673277ee50f585717d8de Mon Sep 17 00:00:00 2001 From: Dmitriy Zayakin Date: Thu, 26 Dec 2024 10:07:03 +0300 Subject: [PATCH] [#355] Attached rule after create container for EC replication test with filter Signed-off-by: Dmitriy Zayakin --- .../replication/test_ec_replication.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/pytest_tests/testsuites/replication/test_ec_replication.py b/pytest_tests/testsuites/replication/test_ec_replication.py index 1571beb0..e990c8f0 100644 --- a/pytest_tests/testsuites/replication/test_ec_replication.py +++ b/pytest_tests/testsuites/replication/test_ec_replication.py @@ -609,18 +609,20 @@ class TestECReplication(ClusterTestBase): assert len(container_nodes) == expected_nodes @allure.title("Create container with EC policy and FILTER") - def test_create_container_with_filter(self, grpc_client: GrpcClientWrapper, simple_object_size: ObjectSize) -> None: - with reporter.step("Create Container."): - policy = "EC 1.1 IN RUS SELECT 2 FROM RU AS RUS FILTER Country EQ Russia AS RU" - cid = grpc_client.container.create(self.cluster.default_rpc_endpoint, policy=policy, await_mode=True) - + @requires_container(PUBLIC_WITH_POLICY("EC 1.1 IN RUS SELECT 2 FROM RU AS RUS FILTER Country EQ Russia AS RU")) + def test_create_container_with_filter( + self, + grpc_client: GrpcClientWrapper, + simple_object_size: ObjectSize, + container: str, + ) -> None: with reporter.step("Put object in container."): test_file = generate_file(simple_object_size.value) - oid = grpc_client.object.put(test_file, cid, self.cluster.default_rpc_endpoint) + oid = grpc_client.object.put(test_file, container, self.cluster.default_rpc_endpoint) with reporter.step("Check object is decomposed exclusively on Russian nodes"): - data_chunk = grpc_client.object.chunks.get_first_data(self.cluster.default_rpc_endpoint, cid, oid=oid) - parity_chunk = grpc_client.object.chunks.get_parity(self.cluster.default_rpc_endpoint, cid, oid=oid) + data_chunk = grpc_client.object.chunks.get_first_data(self.cluster.default_rpc_endpoint, container, oid=oid) + parity_chunk = grpc_client.object.chunks.get_parity(self.cluster.default_rpc_endpoint, container, oid=oid) node_data_chunk = grpc_client.object.chunks.get_chunk_node(self.cluster, data_chunk) node_parity_chunk = grpc_client.object.chunks.get_chunk_node(self.cluster, parity_chunk)