Skip to content

Commit

Permalink
chore(ci) Use non-default database
Browse files Browse the repository at this point in the history
  • Loading branch information
VVoruganti committed Sep 15, 2024
1 parent ac626c2 commit 19b7127
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: >-
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))


Expand Down

0 comments on commit 19b7127

Please sign in to comment.