From 19b7127018c33bb5fd6c0b19bf4049c0518eb69d Mon Sep 17 00:00:00 2001 From: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com> Date: Sat, 14 Sep 2024 20:45:13 -0400 Subject: [PATCH] chore(ci) Use non-default database --- .github/workflows/unittest.yml | 9 ++++----- tests/conftest.py | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index f524439..46ec4aa 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -14,10 +14,9 @@ jobs: database: image: pgvector/pgvector:pg15 env: - POSTGRES_DB: postgres - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_HOST_AUTH_METHOD: trust + POSTGRES_DB: test_db + POSTGRES_USER: testuser + POSTGRES_PASSWORD: testpwd ports: - 5432:5432 options: >- @@ -46,7 +45,7 @@ jobs: - name: Run Tests run: uv run pytest -x env: - CONNECTION_URI: postgresql+psycopg://postgres:postgres@localhost:5432/postgres + CONNECTION_URI: postgresql+psycopg://testuser:testpwd@localhost:5432/test_db USE_AUTH_SERVICE: false SENTRY_ENABLED: false OPENTELEMETRY_ENABLED: false diff --git a/tests/conftest.py b/tests/conftest.py index 2dcaad3..279a670 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -27,7 +27,7 @@ # Test database URL # TODO use environment variable CONNECTION_URI = make_url(os.getenv("CONNECTION_URI")) -TEST_DB_URL = CONNECTION_URI.set(database="postgres") +TEST_DB_URL = CONNECTION_URI.set(database="test_db") DEFAULT_DB_URL = str(CONNECTION_URI.set(database="postgres"))