You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The question/request: instructions for running the tests from a cold start. Better yet, a script to set up a database server for running the tests.
Here's the story that led to me filing this issue.
To check my development environment, I wanted to run the unit tests. make test was a familiar way to do so. First, that failed since I didn't have my virtualenv activated. Then, the tests failed since I didn't have postgres running. That wasn't unexpected I fired up a server using docker run -p 5432:5432 -d postgres:12-alpine. That command failed since docker.io/library/postgres expects explicit authentication configuration. I set POSTGRES_HOST_AUTH_METHOD=trust, and found out the tests expect the postgres server to have a user with the same username as the current user running the tests.
I couldn't find docs on running the tests, so I copied the ./.circleci/config.yml and ran
Now tests/test_migra.py::test_singleschema is failing with psycopg2.errors.UndefinedObject: role "postgres" does not exist, and I'm still lost. Hence the issue.
The text was updated successfully, but these errors were encountered:
Hello, thanks for filing this and apols for the slow reply.
The tests could definitely be a lot more configurable/easier - with my own configuration, I just have postgres running locally (and mariadb for schemainspect).
With the user/auth, the tests are expecting to have passwordless access (if you can't do psql $CONNECTIONSTRING and get access without a password prompt, the tests won't work). Try setting the user/database to postgres perhaps?
The question/request: instructions for running the tests from a cold start. Better yet, a script to set up a database server for running the tests.
Here's the story that led to me filing this issue.
To check my development environment, I wanted to run the unit tests.
make test
was a familiar way to do so. First, that failed since I didn't have my virtualenv activated. Then, the tests failed since I didn't have postgres running. That wasn't unexpected I fired up a server usingdocker run -p 5432:5432 -d postgres:12-alpine
. That command failed since docker.io/library/postgres expects explicit authentication configuration. I setPOSTGRES_HOST_AUTH_METHOD=trust
, and found out the tests expect the postgres server to have a user with the same username as the current user running the tests.I couldn't find docs on running the tests, so I copied the
./.circleci/config.yml
and ranNow
tests/test_migra.py::test_singleschema
is failing withpsycopg2.errors.UndefinedObject: role "postgres" does not exist
, and I'm still lost. Hence the issue.The text was updated successfully, but these errors were encountered: