Update check Policy: REP 1 IN SPB REP 1 IN MSK REP 3
This commit is contained in:
parent
0f5f5da9d3
commit
a2838455cc
1 changed files with 8 additions and 3 deletions
|
@ -1486,11 +1486,16 @@ class TestPolicy(ClusterTestBase):
|
||||||
with allure.step(f"Check the object appearance"):
|
with allure.step(f"Check the object appearance"):
|
||||||
netmap = parse_netmap_output(get_netmap_snapshot(node=resulting_copies[0], shell=self.shell))
|
netmap = parse_netmap_output(get_netmap_snapshot(node=resulting_copies[0], shell=self.shell))
|
||||||
netmap = self.get_netmap_param(netmap)
|
netmap = self.get_netmap_param(netmap)
|
||||||
|
list_of_location = []
|
||||||
for node in resulting_copies:
|
for node in resulting_copies:
|
||||||
node_address = node.get_rpc_endpoint().split(":")[0]
|
node_address = node.get_rpc_endpoint().split(":")[0]
|
||||||
assert expected_params["location"][0] == netmap[node_address]["location"] or (
|
list_of_location.append(netmap[node_address]["location"])
|
||||||
expected_params["location"][1] == netmap[node_address]["location"]
|
|
||||||
), f"The node is selected from the wrong location. Expected {expected_params} and got {netmap[node_address]}"
|
assert (
|
||||||
|
expected_params["location"][0] in list_of_location
|
||||||
|
and expected_params["location"][1] in list_of_location
|
||||||
|
and len(resulting_copies) > 2
|
||||||
|
), f"The node is selected from the wrong location. Expected {expected_params} and got {netmap[node_address]}"
|
||||||
|
|
||||||
self.check_for_the_uniqueness_of_the_nodes(resulting_copies)
|
self.check_for_the_uniqueness_of_the_nodes(resulting_copies)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue