I have a Django setup with postgres.
I recently wrote some basic unit tests that exercises the db. Passes in dev.
But when I try to put python manage.py test
in azure-pipelines.yml I get something like this:
connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused
Is the server running on that host and accepting TCP/IP connections?
So, it seems in pipeline env there's not a way to have a postgres test db. So I tried to have it connect to my production db instead by changing the env vars for the pipeline. But I just get this:
Connection timed out
Is the server running on that host and accepting TCP/IP connections?
What's the proper setup in an azure-pipelines.yml so that I can successfully have Django connect to a test server and run my unit tests?