[#326] add deny morph tests ape
This commit is contained in:
parent
392408e7fe
commit
11de6a4c55
1 changed files with 10 additions and 3 deletions
|
@ -74,13 +74,20 @@ def morph_on_node(node: ClusterNode, id_chains_for_remove: list[str]):
|
||||||
frostfs_adm_exec_path=FROSTFS_ADM_EXEC,
|
frostfs_adm_exec_path=FROSTFS_ADM_EXEC,
|
||||||
config_file=FROSTFS_ADM_CONFIG_PATH,
|
config_file=FROSTFS_ADM_CONFIG_PATH,
|
||||||
)
|
)
|
||||||
|
rules = adm.morph.list_rules(endpoint=node.storage_node.get_control_endpoint(), target_name="kapusta", target_type="namespace").stdout
|
||||||
|
chain_ids = [i.split(" ")[2].strip() for i in rules.split("\n") if "Chain ID" in i]
|
||||||
|
need_wait = False
|
||||||
with reporter.step("Delete rules on {node.storage_node.id} node"):
|
with reporter.step("Delete rules on {node.storage_node.id} node"):
|
||||||
for chain_id in id_chains_for_remove:
|
for chain_id in chain_ids:
|
||||||
|
if not chain_id in id_chains_for_remove:
|
||||||
|
continue
|
||||||
adm.morph.remove_rule(
|
adm.morph.remove_rule(
|
||||||
target_type="namespace",
|
target_type="namespace",
|
||||||
target_name="root",
|
target_name="root",
|
||||||
chain_id=chain_id,
|
chain_id=chain_id,
|
||||||
)
|
)
|
||||||
|
need_wait = True
|
||||||
|
if need_wait:
|
||||||
with reporter.step("Wait for one block"):
|
with reporter.step("Wait for one block"):
|
||||||
time.sleep(datetime_utils.parse_time(MORPH_BLOCK_TIME))
|
time.sleep(datetime_utils.parse_time(MORPH_BLOCK_TIME))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue