Connection error while setting up the testing flow

When trying to set up the bookbrainz-test database with the given command in the Testing section, it gives out the following error. Do you have any tips on how to fix this and run the testing suite?


Hello @Radulee ,

It looks like by default POSTGRES_HOST is set incorrectly to work with Docker in the create-test-db.sh script, as the error message tells use it fails to connect to localhost.
Thanks for reporting the issue, I will make the required changes so this works easier for the default installation we recommend.

In the meantime, you can try setting the environment variable before running the script like so:

docker-compose run --rm bookbrainz-site scripts/wait-for-postgres.sh POSTGRES_HOST=postgres POSTGRES_USER=bookbrainz scripts/create-test-db.sh

Hello, this command gives out a different error message. Any other tips?

Hello,

I’ve also got the same issue. I’ve made a change and I cannot run the tests, since it outputs the same error. Have you got any tips?

Thank you!

Hello! Sorry for the delay!
We’ve fixed the issue in the codebase, so you should now be able to 1. pull most recent changes from bookbrainz-site master branch and 2. rebuild your docker images (./develop.sh build web) and finally 3. try again and hopefully everything should be working :stuck_out_tongue:

P.S: Thanks to @kellnerd for the PR

3 Likes

3 posts were split to a new topic: Issue when running BookBrainz tests