Skip to content

Commit

Permalink
Add cluster mode in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Aug 7, 2024
1 parent 4ab4391 commit b8306a9
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ build:

.PHONY: acceptance-tests-up
acceptance-tests-up:
docker-compose down --remove-orphan
docker compose down

mkdir /tmp/geoserver-data || true
docker run --rm --volume=/tmp/geoserver-data:/mnt/geoserver_datadir camptocamp/geoserver:2.17 \
Expand All @@ -24,17 +24,17 @@ acceptance-tests-up:
cp -r examples/geoserver-data/* /tmp/geoserver-data/
cp -r core/src/test/resources/map-data/* /tmp/geoserver-data/www/

docker-compose up -d
docker compose up -d

.PHONY: acceptance-tests-run
acceptance-tests-run:
docker-compose exec -T tests gradle :examples:integrationTest
docker compose exec -T tests gradle :examples:integrationTest
ci/check-fonts
ci/validate-container

.PHONY: acceptance-tests-down
acceptance-tests-down:
docker-compose down || true
docker compose down || true
docker run --rm --volume=/tmp/geoserver-data:/mnt/geoserver_datadir camptocamp/geoserver \
bash -c 'rm -rf /mnt/geoserver_datadir/*'
rmdir /tmp/geoserver-data
25 changes: 25 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,31 @@ services:
JASPER_LOG_LEVEL: DEBUG
CATALINA_OUT: /dev/stdout

db:
image: camptocamp/postgres:14-postgis-3
environment:
- POSTGRES_PASSWORD=pgpass
- POSTGRES_DB=print
- POSTGRES_USER=print

printclusternode1: &printclusternode
image: mapfish_print_tester
volumes:
- ./examples/src/test/resources/examples:/usr/local/tomcat/webapps/ROOT/print-apps
ports:
- 8081:8080
environment:
PRINT_YAML_MAX_ALIASES: 200
LOG_LEVEL: DEBUG
JASPER_LOG_LEVEL: DEBUG
CATALINA_OUT: /dev/stdout
CATALINA_OPTS: -Ddb.host=db -Ddb.port=5432 -Ddb.username=print -Ddb.password=pgpass -Ddb.name=print -Ddb.schema=public

printclusternode2:
<<: *printclusternode
ports:
- 8082:8080

tests:
image: mapfish_print_builder
command: sleep infinity
Expand Down

0 comments on commit b8306a9

Please sign in to comment.