Skip to content

Commit f102c82

Browse files
restore checks for failed or skipped tests
1 parent 4ad28b4 commit f102c82

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test_elasticsearch/test_server/test_rest_api_spec.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,7 @@ def remove_implicit_resolver(cls, tag_to_remove):
514514
branch_candidates.append("main")
515515

516516
response = None
517+
branch = "main"
517518
for branch in branch_candidates:
518519
yaml_tests_url = f"https://api.github.com/repos/elastic/elasticsearch-clients-tests/zipball/{branch}"
519520
response = http.request("GET", yaml_tests_url)
@@ -567,7 +568,7 @@ def remove_implicit_resolver(cls, tag_to_remove):
567568
for prefix in ("rest-api-spec/", "test/", "free/", "platinum/"):
568569
if pytest_test_name.startswith(prefix):
569570
pytest_test_name = pytest_test_name[len(prefix) :]
570-
pytest_param_id = "[%s]%s[%d]" % (branch, pytest_test_name, test_number)
571+
pytest_param_id = "%s[%d]" % (pytest_test_name, test_number)
571572

572573
pytest_param = {
573574
"setup": setup_steps,
@@ -580,7 +581,9 @@ def remove_implicit_resolver(cls, tag_to_remove):
580581
elif pytest_test_name in SKIPPED_TESTS or pytest_param_id in SKIPPED_TESTS:
581582
pytest_param["skip"] = True
582583

583-
YAML_TEST_SPECS.append(pytest.param(pytest_param, id=pytest_param_id))
584+
YAML_TEST_SPECS.append(
585+
pytest.param(pytest_param, id=f"[{branch}]{pytest_param_id}")
586+
)
584587

585588
except Exception as e:
586589
warnings.warn(f"Could not load REST API tests: {str(e)}")

0 commit comments

Comments
 (0)