Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.

Commit 1478514

Browse files
Revert "feat: disable search means don't search for explicitly mentioned file…" (#480)
This reverts commit 8810ef7.
1 parent 8810ef7 commit 1478514

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

codecov_cli/helpers/folder_searcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def search_files(
3737
filename_exclude_regex: typing.Optional[typing.Pattern] = None,
3838
multipart_include_regex: typing.Optional[typing.Pattern] = None,
3939
multipart_exclude_regex: typing.Optional[typing.Pattern] = None,
40-
search_for_directories: bool = False,
40+
search_for_directories: bool = False
4141
) -> typing.Generator[pathlib.Path, None, None]:
4242
""" "
4343
Searches for files or directories in a given folder

codecov_cli/services/upload/file_finder.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -226,17 +226,8 @@ def find_files(self) -> typing.List[UploadCollectionResultFile]:
226226
return list(set(result_files + user_result_files))
227227

228228
def get_user_specified_files(self, regex_patterns_to_exclude):
229-
if self.disable_search:
230-
result = []
231-
for file in self.explicitly_listed_files:
232-
filepath = Path(file)
233-
if filepath.exists():
234-
result.append(filepath)
235-
return result
236-
237229
user_filenames_to_include = []
238230
files_excluded_but_user_includes = []
239-
240231
for file in self.explicitly_listed_files:
241232
user_filenames_to_include.append(file.name)
242233
if regex_patterns_to_exclude.match(file.name):

tests/commands/test_process_test_results.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import logging
12
import os
23

34
from click.testing import CliRunner
@@ -10,6 +11,7 @@ def test_process_test_results(
1011
mocker,
1112
tmpdir,
1213
):
14+
1315
tmp_file = tmpdir.mkdir("folder").join("summary.txt")
1416

1517
mocker.patch.dict(
@@ -42,6 +44,7 @@ def test_process_test_results(
4244

4345
assert result.exit_code == 0
4446

47+
4548
mocked_post.assert_called_with(
4649
url="https://api.github.com/repos/fake/repo/issues/pull/comments",
4750
data={
@@ -55,6 +58,7 @@ def test_process_test_results(
5558
)
5659

5760

61+
5862
def test_process_test_results_non_existent_file(mocker, tmpdir):
5963
tmp_file = tmpdir.mkdir("folder").join("summary.txt")
6064

@@ -89,7 +93,7 @@ def test_process_test_results_non_existent_file(mocker, tmpdir):
8993
assert result.exit_code == 1
9094
expected_logs = [
9195
"ci service found",
92-
"No JUnit XML files were found",
96+
'Some files were not found',
9397
]
9498
for log in expected_logs:
9599
assert log in result.output
@@ -178,6 +182,7 @@ def test_process_test_results_missing_ref(mocker, tmpdir):
178182
assert log in result.output
179183

180184

185+
181186
def test_process_test_results_missing_step_summary(mocker, tmpdir):
182187
tmp_file = tmpdir.mkdir("folder").join("summary.txt")
183188

@@ -216,4 +221,4 @@ def test_process_test_results_missing_step_summary(mocker, tmpdir):
216221
"Error: Error getting step summary file path from environment. Can't find GITHUB_STEP_SUMMARY environment variable.",
217222
]
218223
for log in expected_logs:
219-
assert log in result.output
224+
assert log in result.output

0 commit comments

Comments
 (0)