mirror of
https://github.com/geoserver/geoserver-cloud.git
synced 2025-12-08 20:16:08 +00:00
Add geodatabase for acceptance tests
This commit is contained in:
parent
32f6a9b633
commit
fe35e23d45
4
.github/workflows/build.yaml
vendored
4
.github/workflows/build.yaml
vendored
@ -51,6 +51,10 @@ jobs:
|
||||
run: (cd compose && c2cciutils-docker-logs)
|
||||
if: always()
|
||||
|
||||
- name: Cleanup acceptance tests
|
||||
run: |
|
||||
make stop-acceptance-tests
|
||||
|
||||
# - name: Remove project jars from cached repository
|
||||
# run: |
|
||||
# rm -rf ~/.m2/repository/org/geoserver
|
||||
|
||||
4
Makefile
4
Makefile
@ -94,3 +94,7 @@ acceptance-tests: build-acceptance
|
||||
(cd compose/ && TAG=$(TAG) GS_USER=$(UID):$(GID) docker compose $(COMPOSE_ACCEPTANCE_DATADIR_OPTIONS) up -d)
|
||||
sleep 30
|
||||
(cd compose/ && TAG=$(TAG) GS_USER=$(UID):$(GID) docker compose $(COMPOSE_ACCEPTANCE_DATADIR_OPTIONS) exec -T acceptance pytest . -vvv --color=yes)
|
||||
|
||||
.PHONY: stop-acceptance-tests
|
||||
stop-acceptance-tests: build-acceptance
|
||||
(cd compose/ && TAG=$(TAG) GS_USER=$(UID):$(GID) docker compose $(COMPOSE_ACCEPTANCE_DATADIR_OPTIONS) down -v)
|
||||
@ -1,7 +1,25 @@
|
||||
services:
|
||||
geodatabase:
|
||||
image: imresamu/postgis:15-3.4
|
||||
environment:
|
||||
POSTGRES_DB: geodata
|
||||
POSTGRES_USER: geodata
|
||||
POSTGRES_PASSWORD: geodata
|
||||
restart: always
|
||||
volumes:
|
||||
- ./acceptance_pg_entrypoint:/docker-entrypoint-initdb.d:ro
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U geodata"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
acceptance:
|
||||
image: acceptance:${TAG}
|
||||
user: ${GS_USER}
|
||||
depends_on:
|
||||
geodatabase:
|
||||
condition: service_healthy
|
||||
init-datadir:
|
||||
condition: service_completed_successfully
|
||||
gateway:
|
||||
|
||||
3
compose/acceptance_pg_entrypoint/001_create_schemas.sql
Executable file
3
compose/acceptance_pg_entrypoint/001_create_schemas.sql
Executable file
@ -0,0 +1,3 @@
|
||||
\c geodata
|
||||
CREATE SCHEMA IF NOT EXISTS test1;
|
||||
CREATE SCHEMA IF NOT EXISTS test2;
|
||||
Loading…
x
Reference in New Issue
Block a user