Skip to content

Commit

Permalink
fix: failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
gablooge committed Apr 8, 2024
1 parent c655126 commit 927d438
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: Uselevers Backend

on: [push]

env:
USELEVERS_DB_USER: ${{ secrets.USELEVERS_DB_USER }}
USELEVERS_DB_NAME: ${{ secrets.USELEVERS_DB_NAME }}
USELEVERS_DB_PASSWORD: ${{ secrets.USELEVERS_DB_PASSWORD }}

jobs:
tests:
runs-on: ubuntu-latest
Expand Down
5 changes: 1 addition & 4 deletions uselevers/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# import os
from collections.abc import Generator
from urllib.parse import ParseResult, urlparse

Expand All @@ -25,9 +24,7 @@ def random_database_uri(original: str) -> ParseResult:
@pytest.fixture(scope="session")
def alembic_engine() -> Generator[Engine, None, None]:
# Configure a random database URI
sqlalchemy_new_uri = urlparse(str(settings.SQLALCHEMY_DATABASE_URI))
# if os.getenv("GITHUB_ACTIONS") != "true":
# sqlalchemy_new_uri = random_database_uri(str(settings.SQLALCHEMY_DATABASE_URI))
sqlalchemy_new_uri = random_database_uri(str(settings.SQLALCHEMY_DATABASE_URI))
sqlalchemy_database = sqlalchemy_new_uri.path.replace("/", "")

# Create an engine to connect to the default URL
Expand Down

0 comments on commit 927d438

Please sign in to comment.