Update placement rule

This commit is contained in:
Ekaterina Chernitsyna 2023-10-18 14:57:52 +03:00
parent 6b8800760d
commit bcc61303df

View file

@ -188,7 +188,7 @@ class TestPolicy(ClusterTestBase):
"""
This test checks object's copies based on container's placement policy with SELECT and FILTER results with one node.
"""
placement_rule = "REP 1 IN MyRussianNodes REP 1 IN MyRussianNodes CBF 1 SELECT 1 FROM RussianNodes AS MyRussianNodes FILTER Country EQ Russia AS RussianNodes"
placement_rule = "REP 1 IN MyRussianNodes REP 1 IN MyRussianNodes CBF 1 SELECT 1 FROM RussianNodes AS MyRussianNodes FILTER Country EQ 'Russia' AS RussianNodes"
file_path = generate_file(simple_object_size.value)
expected_copies = 1
endpoint = self.cluster.default_rpc_endpoint
@ -231,7 +231,7 @@ class TestPolicy(ClusterTestBase):
"""
This test checks object's copies based on container's placement policy with SELECT and Complex FILTER results with one node.
"""
placement_rule = "REP 1 IN RUS REP 1 IN RUS CBF 1 SELECT 1 FROM RU AS RUS FILTER Country NE Sweden AS NotSE FILTER @NotSE AND NOT (CountryCode EQ FI) AND Country EQ Russia AS RU"
placement_rule = "REP 1 IN RUS REP 1 IN RUS CBF 1 SELECT 1 FROM RU AS RUS FILTER Country NE Sweden AS NotSE FILTER @NotSE AND NOT (CountryCode EQ FI) AND Country EQ 'Russia' AS RU"
file_path = generate_file(simple_object_size.value)
expected_copies = 1
endpoint = self.cluster.default_rpc_endpoint
@ -274,9 +274,9 @@ class TestPolicy(ClusterTestBase):
"""
This test checks object's copies based on container's placement policy with Multi SELECTs and FILTERs results with one nodes.
"""
placement_rule = "REP 1 IN RU REP 1 IN EU REP 1 IN RU CBF 1 SELECT 1 FROM RUS AS RU SELECT 1 FROM EUR AS EU FILTER Country EQ Russia AS RUS FILTER NOT @RUS AND (Country EQ Sweden OR CountryCode EQ FI) AS EUR"
placement_rule = "REP 1 IN RU REP 1 IN EU REP 1 IN RU CBF 1 SELECT 1 FROM RUS AS RU SELECT 1 FROM EUR AS EU FILTER Country EQ Russia AS RUS FILTER NOT (@RUS) AND Country EQ Sweden OR CountryCode EQ FI AS EUR"
file_path = generate_file(simple_object_size.value)
expected_copies = 3
expected_copies = 2
endpoint = self.cluster.default_rpc_endpoint
with allure.step(f"Create container with policy {placement_rule}"):
@ -317,7 +317,7 @@ class TestPolicy(ClusterTestBase):
"""
This test checks object's copies based on container's placement policy with SELECT and FILTER results with UNIQUE nodes.
"""
placement_rule = "UNIQUE REP 1 IN MyRussianNodes REP 1 IN MyRussianNodes CBF 1 SELECT 1 FROM RussianNodes AS MyRussianNodes FILTER Country EQ Russia AS RussianNodes"
placement_rule = "UNIQUE REP 1 IN MyRussianNodes REP 1 IN MyRussianNodes CBF 1 SELECT 1 FROM RussianNodes AS MyRussianNodes FILTER Country EQ 'Russia' AS RussianNodes"
file_path = generate_file(simple_object_size.value)
expected_copies = 2
endpoint = self.cluster.default_rpc_endpoint
@ -487,7 +487,7 @@ class TestPolicy(ClusterTestBase):
simple_object_size: ObjectSize,
):
"""
This test checks object's copies based on container's placement policy with SELECT and Complex FILTER results with 25% of available nodes.
110596 This test checks object's copies based on container's placement policy with SELECT and Complex FILTER results with 25% of available nodes.
"""
placement_rule = "REP 1 IN Nodes25 SELECT 1 FROM BET0AND10 AS Nodes25 FILTER Price LE 10 AS LE10 FILTER Price GT 0 AS GT0 FILTER @LE10 AND @GT0 AS BET0AND10"
file_path = generate_file(simple_object_size.value)
@ -748,7 +748,7 @@ class TestPolicy(ClusterTestBase):
"""
This test checks object's copies based on container's placement policy with Multi SELECTs and FILTERs results with 50% of available nodes.
"""
placement_rule = "REP 2 IN FH REP 1 IN SH CBF 2 SELECT 2 FROM LE55 AS FH SELECT 2 FROM GE15 AS SH FILTER UN-LOCODE EQ RU_LED OR UN-LOCODE EQ RU_MOW AS RU FILTER NOT(@RU) AS NOTRU FILTER @NOTRU AND Price GE 15 AS GE15 FILTER @RU AND Price LE 55 AS LE55"
placement_rule = "REP 2 IN FH REP 1 IN SH CBF 2 SELECT 2 FROM LE55 AS FH SELECT 2 FROM GE15 AS SH FILTER 'UN-LOCODE' EQ RU_LED OR 'UN-LOCODE' EQ RU_MOW AS RU FILTER NOT(@RU) AS NOTRU FILTER @NOTRU AND Price GE 15 AS GE15 FILTER @RU AND Price LE 55 AS LE55"
file_path = generate_file(simple_object_size.value)
expected_copies = 4
endpoint = self.cluster.default_rpc_endpoint
@ -793,7 +793,7 @@ class TestPolicy(ClusterTestBase):
"""
placement_rule = "REP 1"
file_path = generate_file(simple_object_size.value)
expected_copies = 3
expected_copies = 1
endpoint = self.cluster.default_rpc_endpoint
with allure.step(f"Create container with policy {placement_rule}"):
@ -836,7 +836,7 @@ class TestPolicy(ClusterTestBase):
"""
placement_rule = "REP 2 IN DS CBF 1 SELECT 3 IN DISTINCT Country FROM * AS DS"
file_path = generate_file(simple_object_size.value)
expected_copies = 3
expected_copies = 2
endpoint = self.cluster.default_rpc_endpoint
with allure.step(f"Create container with policy {placement_rule}"):
@ -879,7 +879,7 @@ class TestPolicy(ClusterTestBase):
"""
placement_rule = "REP 2 IN NODES75 SELECT 2 FROM LT65 AS NODES75 FILTER Price LT 65 AS LT65"
file_path = generate_file(simple_object_size.value)
expected_copies = 3
expected_copies = 2
endpoint = self.cluster.default_rpc_endpoint
with allure.step(f"Create container with policy {placement_rule}"):
@ -918,7 +918,7 @@ class TestPolicy(ClusterTestBase):
simple_object_size: ObjectSize,
):
"""
This test checks object's copies based on container's placement policy with SELECT and Complex FILTER results with 75% of available nodes.
110608 This test checks object's copies based on container's placement policy with SELECT and Complex FILTER results with 75% of available nodes.
"""
placement_rule = "REP 2 IN NODES75 SELECT 2 FROM LT65 AS NODES75 FILTER Price LT 65 AS LT65"
file_path = generate_file(simple_object_size.value)
@ -961,7 +961,7 @@ class TestPolicy(ClusterTestBase):
simple_object_size: ObjectSize,
):
"""
This test checks object's copies based on container's placement policy with Multi SELECTs and FILTERs results with 75% of available nodes.
110608 This test checks object's copies based on container's placement policy with Multi SELECTs and FILTERs results with 75% of available nodes.
"""
placement_rule = "REP 2 IN EXPNSV REP 2 IN CHEAP SELECT 3 FROM GT10 AS EXPNSV SELECT 3 FROM LT65 AS CHEAP FILTER NOT(Continent EQ America) AS NOAM FILTER @NOAM AND Price LT 65 AS LT65 FILTER @NOAM AND Price GT 10 AS GT10"
file_path = generate_file(simple_object_size.value)
@ -1051,7 +1051,7 @@ class TestPolicy(ClusterTestBase):
"""
placement_rule = "REP 1 IN All SELECT 4 FROM * AS All"
file_path = generate_file(simple_object_size.value)
expected_copies = 4
expected_copies = 1
endpoint = self.cluster.default_rpc_endpoint
with allure.step(f"Create container with policy {placement_rule}"):
@ -1094,7 +1094,7 @@ class TestPolicy(ClusterTestBase):
"""
placement_rule = "REP 1 IN All SELECT 4 FROM AllNodes AS All FILTER Price GE 0 AS AllNodes"
file_path = generate_file(simple_object_size.value)
expected_copies = 4
expected_copies = 1
endpoint = self.cluster.default_rpc_endpoint
with allure.step(f"Create container with policy {placement_rule}"):
@ -1137,7 +1137,7 @@ class TestPolicy(ClusterTestBase):
"""
placement_rule = "REP 2 IN All SELECT 4 FROM AllNodes AS All FILTER Country EQ Russia OR Country EQ Sweden OR Country EQ Finland AS AllCountries FILTER @AllCountries AND Continent EQ Europe AS AllNodes"
file_path = generate_file(simple_object_size.value)
expected_copies = 4
expected_copies = 2
endpoint = self.cluster.default_rpc_endpoint
with allure.step(f"Create container with policy {placement_rule}"):
@ -1309,7 +1309,7 @@ class TestPolicy(ClusterTestBase):
"""
This test checks object's copies based on container's placement policy with SELECT and Complex FILTER results with UNIQUE nodes.
"""
placement_rule = "UNIQUE REP 1 IN RUS REP 1 IN RUS CBF 1 SELECT 1 FROM RU AS RUS FILTER Country NE Sweden AS NotSE FILTER @NotSE AND NOT (CountryCode EQ FI) AND Country EQ Russia AS RU"
placement_rule = "UNIQUE REP 1 IN RUS REP 1 IN RUS CBF 1 SELECT 1 FROM RU AS RUS FILTER Country NE Sweden AS NotSE FILTER @NotSE AND NOT (CountryCode EQ FI) AND Country EQ 'Russia' AS RU"
file_path = generate_file(simple_object_size.value)
expected_copies = 2
endpoint = self.cluster.default_rpc_endpoint
@ -1353,7 +1353,7 @@ class TestPolicy(ClusterTestBase):
"""
This test checks object's copies based on container's placement policy with Multi SELECTs and FILTERs results with UNIQUE nodes.
"""
placement_rule = "UNIQUE REP 1 IN RU REP 1 IN EU REP 1 IN RU CBF 1 SELECT 1 FROM RUS AS RU SELECT 1 FROM EUR AS EU FILTER Country EQ Russia AS RUS FILTER NOT @RUS AND (Country EQ Sweden OR CountryCode EQ FI) AS EUR"
placement_rule = "UNIQUE REP 1 IN RU REP 1 IN EU REP 1 IN RU CBF 1 SELECT 1 FROM RUS AS RU SELECT 1 FROM EUR AS EU FILTER Country EQ Russia AS RUS FILTER NOT (@RUS) AND Country EQ Sweden OR CountryCode EQ FI AS EUR"
file_path = generate_file(simple_object_size.value)
expected_copies = 3
endpoint = self.cluster.default_rpc_endpoint