Skip to content

Commit

Permalink
fix: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasrockhu-codecov committed Oct 23, 2024
1 parent d3f95f9 commit 7069d08
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions tests/helpers/test_upload_sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def mocked_legacy_upload_endpoint(mocked_responses):
encoded_slug = encode_slug(named_upload_data["slug"])
resp = responses.Response(
responses.POST,
f"https://api.codecov.io/upload/github/{encoded_slug}/commits/{random_sha}/reports/{named_upload_data['report_code']}/uploads",
f"https://ingest.codecov.io/upload/github/{encoded_slug}/commits/{random_sha}/reports/{named_upload_data['report_code']}/uploads",
status=200,
json={
"raw_upload_location": "https://puturl.com",
Expand All @@ -84,7 +84,7 @@ def mocked_legacy_upload_endpoint(mocked_responses):
def mocked_test_results_endpoint(mocked_responses):
resp = responses.Response(
responses.POST,
f"https://api.codecov.io/upload/test_results/v1",
f"https://ingest.codecov.io/upload/test_results/v1",
status=200,
json={
"raw_upload_location": "https://puturl.com",
Expand Down Expand Up @@ -187,7 +187,7 @@ def test_upload_sender_post_called_with_right_parameters(
assert response.get("url") == "https://app.codecov.io/commit-url"
assert (
post_req_made.url
== f"https://api.codecov.io/upload/github/{encoded_slug}/commits/{random_sha}/reports/{named_upload_data['report_code']}/uploads"
== f"https://ingest.codecov.io/upload/github/{encoded_slug}/commits/{random_sha}/reports/{named_upload_data['report_code']}/uploads"
)
assert (
post_req_made.headers.items() >= headers.items()
Expand Down Expand Up @@ -217,7 +217,7 @@ def test_upload_sender_post_called_with_right_parameters_test_results(
post_req_made = mocked_responses.calls[0].request
response = json.loads(mocked_responses.calls[0].response.text)
assert response.get("raw_upload_location") == "https://puturl.com"
assert post_req_made.url == "https://api.codecov.io/upload/test_results/v1"
assert post_req_made.url == "https://ingest.codecov.io/upload/test_results/v1"
assert (
post_req_made.headers.items() >= headers.items()
) # test dict is a subset of the other
Expand Down Expand Up @@ -254,7 +254,7 @@ def test_upload_sender_post_called_with_right_parameters_tokenless(
assert response.get("url") == "https://app.codecov.io/commit-url"
assert (
post_req_made.url
== f"https://api.codecov.io/upload/github/{encoded_slug}/commits/{random_sha}/reports/{named_upload_data['report_code']}/uploads"
== f"https://ingest.codecov.io/upload/github/{encoded_slug}/commits/{random_sha}/reports/{named_upload_data['report_code']}/uploads"
)
assert (
post_req_made.headers.items() >= headers.items()
Expand Down
2 changes: 1 addition & 1 deletion tests/services/commit/test_commit_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def test_commit_sender_with_forked_repo(mocker):
None,
)
mocked_response.assert_called_with(
url="https://api.codecov.io/upload/github/codecov::::codecov-cli/commits",
url="https://ingest.codecov.io/upload/github/codecov::::codecov-cli/commits",
data={
"branch": "user_forked_repo/codecov-cli:branch",
"cli_args": None,
Expand Down

0 comments on commit 7069d08

Please sign in to comment.