Skip to content

Commit

Permalink
Revert to a passthrough for the metrics request
Browse files Browse the repository at this point in the history
  • Loading branch information
snigdhas committed Aug 11, 2023
1 parent d16a6fa commit d71691a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 19 deletions.
17 changes: 5 additions & 12 deletions tests/relay_integration/lang/javascript/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import pytest
import responses
from django.conf import settings
from django.core.files.base import ContentFile
from django.utils import timezone

Expand Down Expand Up @@ -1308,12 +1309,8 @@ def test_no_fetch_from_http(self):
body=load_fixture("node_app.min.js.map"),
content_type="application/javascript; charset=utf-8",
)
responses.add(
method=responses.POST,
url="http://127.0.0.1:1218/tests/entities/generic_metrics_counters/insert",
body='{"ok": true}',
status=200,
content_type="application/json",
responses.add_passthru(
settings.SENTRY_SNUBA + "/tests/entities/generic_metrics_counters/insert",
)

data = {
Expand Down Expand Up @@ -1390,12 +1387,8 @@ def test_html_file_with_query_param_ending_with_js_extension(self):
"<!doctype html><html><head></head><body><script>/*legit case*/</script></body></html>"
),
)
responses.add(
method=responses.POST,
url="http://127.0.0.1:1218/tests/entities/generic_metrics_counters/insert",
body='{"ok": true}',
status=200,
content_type="application/json",
responses.add_passthru(
settings.SENTRY_SNUBA + "/tests/entities/generic_metrics_counters/insert",
)

data = {
Expand Down
11 changes: 4 additions & 7 deletions tests/sentry/notifications/test_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from urllib.parse import parse_qs

import responses
from django.conf import settings
from django.core import mail
from django.core.mail.message import EmailMultiAlternatives
from django.utils import timezone
Expand Down Expand Up @@ -106,6 +107,9 @@ def setUp(self):
status=200,
content_type="application/json",
)
responses.add_passthru(
settings.SENTRY_SNUBA + "/tests/entities/generic_metrics_counters/insert",
)
self.name = self.user.get_display_name()
self.short_id = self.group.qualified_short_id

Expand Down Expand Up @@ -440,13 +444,6 @@ def test_sends_issue_notification(self, record_analytics):
project_id=self.project.id,
)
cache_key = write_event_to_cache(event)
responses.add(
method=responses.POST,
url="http://127.0.0.1:1218/tests/entities/generic_metrics_counters/insert",
body='{"ok": true}',
status=200,
content_type="application/json",
)
with self.tasks():
post_process_group(
is_new=True,
Expand Down

0 comments on commit d71691a

Please sign in to comment.