From c8f30115cfae4b29b4d99a7bf1ae5b6804a39be6 Mon Sep 17 00:00:00 2001 From: Mateusz Bloch Date: Mon, 7 Aug 2023 13:22:20 +0200 Subject: [PATCH] trunner: run tests alphabetically JIRA CI-310 --- trunner/test_runner.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/trunner/test_runner.py b/trunner/test_runner.py index 153d9653..f698393e 100644 --- a/trunner/test_runner.py +++ b/trunner/test_runner.py @@ -104,9 +104,13 @@ def search_for_tests(self) -> List[Path]: yamls = [] if path.is_dir(): - yamls = list(path.rglob("test*.yaml")) + list(path.rglob("test*.yml")) + for p in list(path.rglob("test*.yaml")) + list(path.rglob("test*.yml")): + if ".git" not in str(p): + yamls.append(p) if not yamls: raise ValueError(f"{path} does not contain .yaml test configuration") + else: + yamls.sort() elif path.is_file(): if path.suffix != ".yaml" and path.suffix != ".yml": raise ValueError("Test configuration must be a file with .yaml or .yml extension")