Skip to content

Commit

Permalink
Run postgres in tox on port 3309
Browse files Browse the repository at this point in the history
This lets us run the dev server at the same time as running tox.
  • Loading branch information
jonathansick committed Jul 6, 2021
1 parent 14d99c3 commit 71ecee5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ healthcheck_start_period = 1
[docker:test-postgres]
image = postgres:11
ports =
3308:3308/tcp
3309:3309/tcp
# Environment variables are passed to the container. They are only
# available to that container, and not to the testenv, other
# containers, or as replacements in other parts of tox.ini
environment =
POSTGRES_PASSWORD=password
POSTGRES_USER=user
POSTGRES_DB=keepertest
PGPORT=3308
PGPORT=3309
# The healthcheck ensures that tox-docker won't run tests until the
# container is up and the command finishes with exit code 0 (success)
healthcheck_cmd = PGPASSWORD=$POSTGRES_PASSWORD psql \
Expand Down Expand Up @@ -65,7 +65,7 @@ description = Run pytest with Postgres DB.
docker =
test-postgres
setenv =
LTD_KEEPER_TEST_DB_URL=postgresql+psycopg2://user:password@localhost:3308/keepertest
LTD_KEEPER_TEST_DB_URL=postgresql+psycopg2://user:password@localhost:3309/keepertest

[testenv:mysql]
description = Run pytest with MySQL DB.
Expand Down

0 comments on commit 71ecee5

Please sign in to comment.