Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Suggest using docker when testing against postgres #12765

Merged
merged 6 commits into from
May 17, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Example error message for duplicate postgreses
  • Loading branch information
David Robertson committed May 17, 2022
commit dac2fb80a6056cbfeaf45fcda144d96aea3a70e7
10 changes: 9 additions & 1 deletion docs/development/contributing_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,15 @@ terminal:
docker run --rm -e POSTGRES_PASSWORD=mysecretpassword -e POSTGRES_USER=postgres -e POSTGRES_DB=postgress -p 5432:5432 postgres:14
```

Then in a second terminal, invoke `trial`:
If you see an error like

```
docker: Error response from daemon: driver failed programming external connectivity on endpoint nice_ride (b57bbe2e251b70015518d00c9981e8cb8346b5c785250341a6c53e3c899875f1): Error starting userland proxy: listen tcp4 0.0.0.0:5432: bind: address already in use.
```

then something is already bound to port 5432. You're probably already running postgres locally.

Once you have a postgresThen in a second terminal, invoke `trial`:

```shell
SYNAPSE_POSTGRES=1 SYNAPSE_POSTGRES_HOST=127.0.0.1 SYNAPSE_POSTGRES_USER=postgres SYNAPSE_POSTGRES_PASSWORD=mysecretpassword poetry run trial tests
Expand Down