Skip to content

Commit 99d00e1

Browse files
authored
refactor: rename check_failing_spans_with_quarantine (#747)
Depends-On: #746
1 parent b539c6d commit 99d00e1

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

mergify_cli/ci/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ async def _process_junit_files( # noqa: PLR0913
200200
# "cicd.test.quarantined" attribute for the required spans.
201201
try:
202202
failing_tests_not_quarantined_count = (
203-
await quarantine.check_failing_spans_with_quarantine(
203+
await quarantine.check_and_update_failing_spans(
204204
api_url,
205205
token,
206206
repository,

mergify_cli/ci/quarantine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class QuarantineFailedError(Exception):
2222
)
2323

2424

25-
async def check_failing_spans_with_quarantine(
25+
async def check_and_update_failing_spans(
2626
api_url: str,
2727
token: str,
2828
repository: str,

mergify_cli/tests/ci/test_check_failing_spans.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import respx
66

77
from mergify_cli.ci.quarantine import QuarantineFailedError
8-
from mergify_cli.ci.quarantine import check_failing_spans_with_quarantine
8+
from mergify_cli.ci.quarantine import check_and_update_failing_spans
99

1010

1111
API_MERGIFY_BASE_URL = "https://api.mergify.com"
@@ -29,7 +29,7 @@ async def test_status_code_resp_not_200(
2929
]
3030

3131
with pytest.raises(QuarantineFailedError):
32-
await check_failing_spans_with_quarantine(
32+
await check_and_update_failing_spans(
3333
API_MERGIFY_BASE_URL,
3434
"token",
3535
"foo/bar",
@@ -61,7 +61,7 @@ async def test_no_failing_tests_quarantined(
6161
),
6262
]
6363

64-
failed_tests_quarantined_test_count = await check_failing_spans_with_quarantine(
64+
failed_tests_quarantined_test_count = await check_and_update_failing_spans(
6565
API_MERGIFY_BASE_URL,
6666
"token",
6767
"foo/bar",
@@ -109,7 +109,7 @@ async def test_some_failing_tests_quarantined(
109109
),
110110
]
111111

112-
failed_tests_quarantined_count = await check_failing_spans_with_quarantine(
112+
failed_tests_quarantined_count = await check_and_update_failing_spans(
113113
API_MERGIFY_BASE_URL,
114114
"token",
115115
"foo/bar",
@@ -166,7 +166,7 @@ async def test_all_failing_tests_quarantined(
166166
),
167167
]
168168

169-
failed_tests_quarantined_count = await check_failing_spans_with_quarantine(
169+
failed_tests_quarantined_count = await check_and_update_failing_spans(
170170
API_MERGIFY_BASE_URL,
171171
"token",
172172
"foo/bar",

mergify_cli/tests/ci/test_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def test_cli(env: dict[str, str], monkeypatch: pytest.MonkeyPatch) -> None:
5959
) as mocked_upload,
6060
mock.patch.object(
6161
quarantine,
62-
"check_failing_spans_with_quarantine",
62+
"check_and_update_failing_spans",
6363
return_value=0,
6464
),
6565
):
@@ -203,7 +203,7 @@ def test_upload_error(monkeypatch: pytest.MonkeyPatch) -> None:
203203
) as mocked_upload,
204204
mock.patch.object(
205205
quarantine,
206-
"check_failing_spans_with_quarantine",
206+
"check_and_update_failing_spans",
207207
return_value=0,
208208
),
209209
):

0 commit comments

Comments
 (0)