Skip to content

Commit

Permalink
Fix migrations for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
baszoetekouw committed Mar 14, 2024
1 parent e4b21b2 commit 55a5dfc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,9 @@ def use_random_db(request, worker_id):
with engine.connect() as conn:
conn.execute(sqlalchemy.text(f"CREATE DATABASE IF NOT EXISTS sbs_{worker_id}"))

# not sure why, but this is not picked up from AbstractTest.setUpClass
# and we need it in some of the migrations
os.environ["CONFIG"] = os.environ.get("CONFIG", "config/test_config.yml")

os.environ['SBS_DB_URI_OVERRIDE'] = database_uri
db_migrations(database_uri)

0 comments on commit 55a5dfc

Please sign in to comment.