[#355] Attached rule after create container for EC replication test with filter #355
1 changed files with 10 additions and 8 deletions
|
@ -609,18 +609,20 @@ class TestECReplication(ClusterTestBase):
|
||||||
assert len(container_nodes) == expected_nodes
|
assert len(container_nodes) == expected_nodes
|
||||||
|
|
||||||
@allure.title("Create container with EC policy and FILTER")
|
@allure.title("Create container with EC policy and FILTER")
|
||||||
def test_create_container_with_filter(self, grpc_client: GrpcClientWrapper, simple_object_size: ObjectSize) -> None:
|
@requires_container(PUBLIC_WITH_POLICY("EC 1.1 IN RUS SELECT 2 FROM RU AS RUS FILTER Country EQ Russia AS RU"))
|
||||||
with reporter.step("Create Container."):
|
def test_create_container_with_filter(
|
||||||
policy = "EC 1.1 IN RUS SELECT 2 FROM RU AS RUS FILTER Country EQ Russia AS RU"
|
self,
|
||||||
cid = grpc_client.container.create(self.cluster.default_rpc_endpoint, policy=policy, await_mode=True)
|
grpc_client: GrpcClientWrapper,
|
||||||
|
simple_object_size: ObjectSize,
|
||||||
|
container: str,
|
||||||
|
) -> None:
|
||||||
with reporter.step("Put object in container."):
|
with reporter.step("Put object in container."):
|
||||||
test_file = generate_file(simple_object_size.value)
|
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"):
|
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)
|
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, cid, 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_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)
|
node_parity_chunk = grpc_client.object.chunks.get_chunk_node(self.cluster, parity_chunk)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue