Make node management tests to be last
Signed-off-by: Andrey Berezin <a.berezin@yadro.com>
This commit is contained in:
parent
af9c726624
commit
4eb4963f17
1 changed files with 7 additions and 0 deletions
|
@ -19,6 +19,13 @@ from python_keywords.node_management import node_healthcheck
|
||||||
|
|
||||||
logger = logging.getLogger("NeoLogger")
|
logger = logging.getLogger("NeoLogger")
|
||||||
|
|
||||||
|
def pytest_collection_modifyitems(items):
|
||||||
|
# Make network tests last based on @pytest.mark.node_mgmt
|
||||||
|
def priority(item: pytest.Item) -> int:
|
||||||
|
is_node_mgmt_test = item.get_closest_marker("node_mgmt")
|
||||||
|
return 0 if not is_node_mgmt_test else 1
|
||||||
|
|
||||||
|
items.sort(key=lambda item: priority(item))
|
||||||
|
|
||||||
@pytest.fixture(scope="session")
|
@pytest.fixture(scope="session")
|
||||||
def configure_testlib():
|
def configure_testlib():
|
||||||
|
|
Loading…
Reference in a new issue