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 authored and sebr72 committed Sep 3, 2024
1 parent d8edd45 commit 1a71301
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,12 @@ acceptance-tests-run: .env
.PHONY: acceptance-tests-down
acceptance-tests-down: .env
docker compose down || true
acceptance-tests-down:
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

.PHONY: dist
dist: build-builder
mkdir --parent core/build
rm -rf core/build/libs core/build/distributions
docker run --rm --user=$(shell id -u):$(shell id -g) \
--volume=$(PWD)/core/build:/src/core/build2/:rw mapfish_print_builder \
cp -r /src/core/build/libs /src/core/build/distributions /src/core/build2/

.env:
echo "USER_ID=$(shell id -u):$(shell id -g)" > $@
25 changes: 25 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,31 @@ services:
LOG_LEVEL: DEBUG
JASPER_LOG_LEVEL: DEBUG

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
user: ${USER_ID}
Expand Down

0 comments on commit 1a71301

Please sign in to comment.