summary refs log tree commit diff
path: root/tests/utils.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-10-23 12:03:03 +0100
committerGitHub <noreply@github.com>2019-10-23 12:03:03 +0100
commit7b6d99fa5aed2d8e0f71e75b12b26ade24701963 (patch)
treec96bca83c8dba442c63c52e8e18bae29a1eb8ce8 /tests/utils.py
parentMerge pull request #5726 from matrix-org/uhoreg/e2e_cross-signing2-part2 (diff)
parentMerge branch 'develop' of github.com:matrix-org/synapse into erikj/refactor_s... (diff)
downloadsynapse-7b6d99fa5aed2d8e0f71e75b12b26ade24701963.tar.xz
Merge pull request #6231 from matrix-org/erikj/refactor_stores
Refactor storage layer to support multiple databases
Diffstat (limited to 'tests/utils.py')
-rw-r--r--tests/utils.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/tests/utils.py b/tests/utils.py
index 46ef2959f2..0a64f75d04 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -38,11 +38,7 @@ from synapse.logging.context import LoggingContext
 from synapse.server import HomeServer
 from synapse.storage import DataStore
 from synapse.storage.engines import PostgresEngine, create_engine
-from synapse.storage.prepare_database import (
-    _get_or_create_schema_state,
-    _setup_new_database,
-    prepare_database,
-)
+from synapse.storage.prepare_database import prepare_database
 from synapse.util.ratelimitutils import FederationRateLimiter
 
 # set this to True to run the tests against postgres instead of sqlite.
@@ -88,11 +84,7 @@ def setupdb():
             host=POSTGRES_HOST,
             password=POSTGRES_PASSWORD,
         )
-        cur = db_conn.cursor()
-        _get_or_create_schema_state(cur, db_engine)
-        _setup_new_database(cur, db_engine)
-        db_conn.commit()
-        cur.close()
+        prepare_database(db_conn, db_engine, None)
         db_conn.close()
 
         def _cleanup():