Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test cases should use Postgres and not sqlite:///:memory: #557

Closed
brassy-endomorph opened this issue Sep 9, 2024 · 0 comments · Fixed by #572
Closed

Test cases should use Postgres and not sqlite:///:memory: #557

brassy-endomorph opened this issue Sep 9, 2024 · 0 comments · Fixed by #572

Comments

@brassy-endomorph
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

There is drift between the test and prod environment, and with something as complex as Postgres and remote state, we don't want that drift. Especially if we ever use any PG specific features

Describe the solution you'd like

In conftest.py we should have a fixture that gives us a fresh PG database with which to test on with scope="function". We can use PG template DBs as a fixture with scope="session" to only have to create the tables once and that use that in the fixture the provides the DB to the test cases.

Additional context

This may be a blocker for #528 and if it's not, we'd have to likely add a bunch of Python that would only ever be needed for the test cases and not the real app code, and that's some serious code smell IMO.

This is very likely a blocker for meaningfully implementing #555

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant