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

Commit de1fba7

Browse files
authored
Merge pull request #149 from codecov/dana/fix-tests
fix failing tests
2 parents e76d9b9 + 8159230 commit de1fba7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

codecov_cli/services/empty_upload/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,5 @@ def empty_upload_logic(commit_sha, slug, token, git_service):
1515
headers = get_token_header_or_fail(token)
1616
url = f"https://api.codecov.io/upload/{git_service}/{encoded_slug}/commits/{commit_sha}/empty-upload"
1717
sending_result = send_post_request(url=url, headers=headers)
18-
if sending_result.status_code < 300 and sending_result.text:
19-
logger.info(sending_result.text)
2018
log_warnings_and_errors_if_any(sending_result, "Empty Upload")
2119
return sending_result

tests/services/empty_upload/test_empty_upload.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def test_empty_upload_with_warnings(mocker):
2727
)
2828
out_bytes = parse_outstreams_into_log_lines(outstreams[0].getvalue())
2929
assert out_bytes == [
30+
("info", "Process Empty Upload complete"),
3031
("info", "Empty Upload process had 1 warning"),
3132
("warning", "Warning 1: somewarningmessage"),
3233
]
@@ -59,7 +60,10 @@ def test_empty_upload_with_error(mocker):
5960

6061
print(outstreams)
6162
out_bytes = parse_outstreams_into_log_lines(outstreams[0].getvalue())
62-
assert out_bytes == [("error", "Empty Upload failed: Permission denied")]
63+
assert out_bytes == [
64+
("info", "Process Empty Upload complete"),
65+
("error", "Empty Upload failed: Permission denied"),
66+
]
6367
assert res == mock_send_commit_data.return_value
6468
mock_send_commit_data.assert_called_once()
6569

0 commit comments

Comments
 (0)