Skip to content

Fix CI test to actually use the Postgres database#9954

Draft
browniebroke wants to merge 7 commits intoencode:mainfrom
browniebroke:fix/database-url-ci
Draft

Fix CI test to actually use the Postgres database#9954
browniebroke wants to merge 7 commits intoencode:mainfrom
browniebroke:fix/database-url-ci

Conversation

@browniebroke
Copy link
Copy Markdown
Member

Description

After merging #9949 I realised that the setup wasn't complete and Postgres tests are in fact skipped:

SKIPPED [7] tests/test_filters.py: Requires PostgreSQL database backend

This is because we run tests with tox and it needs to be instructed to pass environment variables down with the pass_env option.

Once this was set, the tests started failing with psycopg.errors.UndefinedTable: relation "auth_user" does not exist, which I fixed by passing --no-migrations to pytest.

Then a number of tests started failing due to hardcoded IDs and ordering assumptions which were no longer true.

Note

This is still a work in progress

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 this pull request may close these issues.

1 participant