mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Fix postgres unit tests to use prepare_database
This commit is contained in:
parent
bb6264be0b
commit
336eeea3ff
@ -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():
|
||||
|
Loading…
Reference in New Issue
Block a user