From 62779a5097e8cd97579eeeb9abffefb1f9bea1ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Silva?= Date: Wed, 23 Oct 2024 16:57:31 +0100 Subject: [PATCH] Test DATABASE_URL --- labs/config/settings.py | 1 + tests/conftest.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/labs/config/settings.py b/labs/config/settings.py index 7b20fe8..2d1c038 100644 --- a/labs/config/settings.py +++ b/labs/config/settings.py @@ -44,6 +44,7 @@ DATABASE_NAME = os.environ.get("DATABASE_NAME") DATABASE_PORT = os.environ.get("DATABASE_PORT") DATABASE_URL = f"postgresql://{DATABASE_USER}:{DATABASE_PASS}@{DATABASE_HOST}:{DATABASE_PORT}/{DATABASE_NAME}" +print(f"{DATABASE_URL=}") CELERY_BROKER_URL = os.environ.get("CELERY_BROKER_URL") CELERY_BACKEND_URL = os.environ.get("CELERY_BACKEND_URL") diff --git a/tests/conftest.py b/tests/conftest.py index bc7da3e..d560ab0 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,3 +1,4 @@ +import logging import random import pytest from labs.config import settings @@ -7,6 +8,9 @@ from labs.database.embeddings import Embedding +logger = logging.getLogger(__name__) + +logger.error(f"{settings.DATABASE_URL=}") engine = create_engine(settings.DATABASE_URL, echo=True) Session = sessionmaker(bind=engine)