feat: provision private S3 storage and attachment schema
This commit is contained in:
@@ -9,13 +9,14 @@ from uuid import uuid4
|
||||
|
||||
import psycopg
|
||||
|
||||
from src.db import database_url
|
||||
from src.store import Store
|
||||
|
||||
|
||||
URL = os.environ.get("DATABASE_URL")
|
||||
URL = database_url() if os.environ.get("DATABASE_URL") or os.environ.get("DATABASE_URL_FILE") else None
|
||||
|
||||
|
||||
@unittest.skipUnless(URL, "set DATABASE_URL to a disposable PostgreSQL database")
|
||||
@unittest.skipUnless(URL, "set DATABASE_URL or DATABASE_URL_FILE to a disposable PostgreSQL database")
|
||||
class DatabaseTests(unittest.TestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
@@ -30,7 +31,7 @@ class DatabaseTests(unittest.TestCase):
|
||||
def test_migration_and_unique_username_race(self):
|
||||
with psycopg.connect(URL) as conn:
|
||||
versions = conn.execute("SELECT version FROM schema_migrations").fetchall()
|
||||
self.assertEqual(versions, [(1,), (2,), (3,)])
|
||||
self.assertEqual(versions, [(1,), (2,), (3,), (4,)])
|
||||
name = "u_" + uuid4().hex[:16]
|
||||
|
||||
def register(_):
|
||||
|
||||
Reference in New Issue
Block a user