Skip to content

Commit

Permalink
add test-latest to justfile
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkAndshark committed Jan 9, 2025
1 parent 7c1dc52 commit 1aed48f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,28 @@ services:
- ./tests/fixtures:/fixtures
- ./tests/fixtures/initdb-dc.sh:/docker-entrypoint-initdb.d/20_martin.sh

db-latest:
# This should match the version of postgres used in the CI workflow
image: postgis/postgis:latest
restart: unless-stopped
ports:
- '${PGPORT:-5411}:5432'
command:
- '-c'
- 'max_connections=200'
environment:
# POSTGRES_* variables are used by the postgis/postgres image
# PG_* variables are used by psql
- POSTGRES_DB=db
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- PGDATABASE=db
- PGUSER=postgres
- PGPASSWORD=postgres
volumes:
- ./tests/fixtures:/fixtures
- ./tests/fixtures/initdb-dc.sh:/docker-entrypoint-initdb.d/20_martin.sh

db-ssl:
# This should match the version of postgres used in the CI workflow
image: postgis/postgis:15-3.3
Expand Down
6 changes: 6 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ clean-test:
# Start a test database
start: (docker-up "db") docker-is-ready

# Start a test latest database
start-latest: (docker-up "db-latest") docker-is-ready

# Start an ssl-enabled test database
start-ssl: (docker-up "db-ssl") docker-is-ready

Expand Down Expand Up @@ -129,6 +132,9 @@ bench-http: (cargo-install "oha")
# Run all tests using a test database
test: start (test-cargo "--all-targets") test-doc test-int

# Run all tests using a test database
test-latest: start-latest (test-cargo "--all-targets") test-doc test-int

# Run all tests using an SSL connection to a test database. Expected output won't match.
test-ssl: start-ssl (test-cargo "--all-targets") test-doc clean-test
tests/test.sh
Expand Down

0 comments on commit 1aed48f

Please sign in to comment.