-
Notifications
You must be signed in to change notification settings - Fork 44
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
no password supplied in GH Action docker CI #591
Comments
Although, looking at the traceback more closely, that code does not match the code in 4.1.1, https://github.com/ClearcodeHQ/pytest-postgresql/blob/v4.1.1/src/pytest_postgresql/factories/noprocess.py. Unless Github scrubbed that line from the code display? But I can confirm that 4.1.1 is being installed in the CI during the dependency installation step.
|
the line seems to be scrubbed, how do you call pytest in github actions? What's the pytest configuration? |
Sorry for the long delay. I was away from my computer for the past week. It's the default pytest configuration and I call it straight with
|
@havok2063 see this line: It's the github action test where I do connect the tests to the running docker service with postgresql |
Ok, so I updated the pytest command in the github action to On the very first test that runs, I get a cursor/connection error with a warning like the postgres instance is not running.
Subsequent tests all fail with My database fixture for all my tests is
|
@havok2063 this fixture is supposed to create a test database for all tests in a module? Do you have tracebacks to the first error? |
@fizyk Yeah that's the idea. The first test that runs is in a module
Here is that traceback
|
Still... two years.... Could you migrate and update separately? I mean do one first, and once working, take care of the other? (ie gh actions first, update later or the other way around? But looking at traceback, the issue.... well... Janitor did connect to the database and did what it had to do, now it seems that i's peewee that can not connect 🤔 |
I can't go back to test on Travis since they removed their free tier, so I'm trying to test the package versions separately. I went back to I don't think it's specifically a These GH Action tests were run with Full traceback
|
@havok2063 sorry for the sporadic responses, do you have that as open-source? Could I take a look? |
@fizyk Yeah this particular repo in our org is. It's https://github.com/sdss/sdssdb/tree/oldtests. The branch I'm trying to get this working in is |
Hello, maybe it doesn't work with Maybe it is easy with docker-compose I haven't tried yet I will also try with inspiration from your github action https://github.com/ClearcodeHQ/pytest-postgresql/blob/main/.github/workflows/tests.yml#L82 |
What action do you want to perform
I'm trying to run some postgres tests in a docker CI github action, and I am keeping "no password sent" error. It seems fairly similar to this issue, #294, but I'm using the latest package version, 4.1, and I think that bug is fixed.
What is the correct syntax to get the docker db to accept the password? This use to work on Travis with
pytest-postgresql==2.3
but I'm trying to migrate to Github Actions and update to the latest code.When I set a debug point in the action and ssh into the container, I can manually run the DatabaseJanitor code and it works. So maybe it's this specific use of it?
What are the results
psycopg.OperationalError: connection failed: fe_sendauth: no password supplied
. Full traceback is at the bottom.Here is my Github Action service setup:
and here is my pytest fixture.
I've also tried using DatabaseJanitor as a context manager, and I've tried using
postgresql_noproc
to set the config parametersWhat are the expected results
My tests run locally successfully. It only fails when run on CI.
Traceback
The text was updated successfully, but these errors were encountered: