Added nearest node count calculation for choosing ec policy

Signed-off-by: Dmitry Anurin <danurin@yadro.com>
This commit is contained in:
anurindm 2024-10-23 13:58:40 +03:00 committed by Dmitry Anurin
parent 6b83a89b94
commit 75508cc70c

View file

@ -39,7 +39,8 @@ def pytest_generate_tests(metafunc: pytest.Metafunc) -> None:
100: ["EC 12.4", "EC 8.4", "EC 5.3", "EC 4.4"], 100: ["EC 12.4", "EC 8.4", "EC 5.3", "EC 4.4"],
} }
metafunc.parametrize("ec_policy, node_count", ((ec_policy, node_count) for ec_policy in ec_map[node_count])) nearest_node_count = ([4] + (list(filter(lambda x: x <= node_count, ec_map.keys()))))[-1]
metafunc.parametrize("ec_policy, node_count", ((ec_policy, node_count) for ec_policy in ec_map[nearest_node_count]))
@allure.title("Initialized remote FrostfsAdm") @allure.title("Initialized remote FrostfsAdm")