Browse Source

ref: remove unnecessary test db reconfigure (#63621)

this is always the default settings

<!-- Describe your PR here. -->
anthony sottile 1 year ago
parent
commit
6d0b7f6c5d
1 changed files with 0 additions and 18 deletions
  1. 0 18
      src/sentry/testutils/pytest/sentry.py

+ 0 - 18
src/sentry/testutils/pytest/sentry.py

@@ -110,24 +110,6 @@ def pytest_configure(config: pytest.Config) -> None:
 
     integrationdocs.DOC_FOLDER = os.environ["INTEGRATION_DOC_FOLDER"]
 
-    if not settings.configured:
-        # only configure the db if its not already done
-        test_db = os.environ.get("DB", "postgres")
-        if test_db == "postgres":
-            settings.DATABASES["default"].update(
-                {
-                    "ENGINE": "sentry.db.postgres",
-                    "USER": "postgres",
-                    "NAME": "sentry",
-                    "HOST": "127.0.0.1",
-                }
-            )
-            # postgres requires running full migration all the time
-            # since it has to install stored functions which come from
-            # an actual migration.
-        else:
-            raise RuntimeError("oops, wrong database: %r" % test_db)
-
     configure_split_db()
 
     # Ensure we can test secure ssl settings