Browse Source

test(symbolicator): Add host.docker.internal to ALLOWED_HOSTS (#16890)

Jan Michael Auer 5 years ago
parent
commit
c39b3303d6

+ 7 - 3
tests/symbolicator/test_minidump_full.py

@@ -8,6 +8,7 @@ from six import BytesIO
 
 from django.core.urlresolvers import reverse
 from django.core.files.uploadedfile import SimpleUploadedFile
+from django.test import override_settings
 
 from sentry import eventstore
 from sentry.testutils import TransactionTestCase
@@ -17,10 +18,13 @@ from sentry.lang.native.utils import STORE_CRASH_REPORTS_ALL
 from tests.symbolicator import get_fixture_path, insta_snapshot_stacktrace_data
 
 
-class SymbolicatorMinidumpIntegrationTest(TransactionTestCase):
-    # For these tests to run, write `symbolicator.enabled: true` into your
-    # `~/.sentry/config.yml` and run `sentry devservices up`
+# IMPORTANT:
+# For these tests to run, write `symbolicator.enabled: true` into your
+# `~/.sentry/config.yml` and run `sentry devservices up`
+
 
+@override_settings(ALLOWED_HOSTS=["localhost", "testserver", "host.docker.internal"])
+class SymbolicatorMinidumpIntegrationTest(TransactionTestCase):
     @pytest.fixture(autouse=True)
     def initialize(self, live_server):
         self.project.update_option("sentry:builtin_symbol_sources", [])

+ 8 - 1
tests/symbolicator/test_payload_full.py

@@ -8,6 +8,7 @@ from six import BytesIO
 
 from django.core.urlresolvers import reverse
 from django.core.files.uploadedfile import SimpleUploadedFile
+from django.test import override_settings
 
 from sentry import eventstore
 from sentry.testutils import TransactionTestCase
@@ -17,6 +18,12 @@ from sentry.utils import json
 
 from tests.symbolicator import get_fixture_path, insta_snapshot_stacktrace_data
 
+
+# IMPORTANT:
+# For these tests to run, write `symbolicator.enabled: true` into your
+# `~/.sentry/config.yml` and run `sentry devservices up`
+
+
 REAL_RESOLVING_EVENT_DATA = {
     "platform": "cocoa",
     "debug_meta": {
@@ -182,6 +189,7 @@ class ResolvingIntegrationTestBase(object):
         insta_snapshot_stacktrace_data(self, event.data)
 
 
+@override_settings(ALLOWED_HOSTS=["localhost", "testserver", "host.docker.internal"])
 class SymbolicatorResolvingIntegrationTest(ResolvingIntegrationTestBase, TransactionTestCase):
     # For these tests to run, write `symbolicator.enabled: true` into your
     # `~/.sentry/config.yml` and run `sentry devservices up`
@@ -194,6 +202,5 @@ class SymbolicatorResolvingIntegrationTest(ResolvingIntegrationTestBase, Transac
         with patch("sentry.auth.system.is_internal_ip", return_value=True), self.options(
             {"system.url-prefix": new_prefix}
         ):
-
             # Run test case:
             yield

+ 7 - 0
tests/symbolicator/test_unreal_full.py

@@ -8,6 +8,7 @@ from six import BytesIO
 
 from django.core.urlresolvers import reverse
 from django.core.files.uploadedfile import SimpleUploadedFile
+from django.test import override_settings
 
 from sentry.testutils import TransactionTestCase
 from sentry.models import EventAttachment
@@ -17,6 +18,11 @@ from sentry.lang.native.utils import STORE_CRASH_REPORTS_ALL
 from tests.symbolicator import get_fixture_path
 
 
+# IMPORTANT:
+# For these tests to run, write `symbolicator.enabled: true` into your
+# `~/.sentry/config.yml` and run `sentry devservices up`
+
+
 def get_unreal_crash_file():
     return get_fixture_path("unreal_crash")
 
@@ -25,6 +31,7 @@ def get_unreal_crash_apple_file():
     return get_fixture_path("unreal_crash_apple")
 
 
+@override_settings(ALLOWED_HOSTS=["localhost", "testserver", "host.docker.internal"])
 class SymbolicatorUnrealIntegrationTest(TransactionTestCase):
     # For these tests to run, write `symbolicator.enabled: true` into your
     # `~/.sentry/config.yml` and run `sentry devservices up`