Skip to content

Commit c4e0470

Browse files
committed
Use QJazz in tests
1 parent 6ff6100 commit c4e0470

File tree

8 files changed

+86
-72
lines changed

8 files changed

+86
-72
lines changed

.github/workflows/e2e_tests.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ jobs:
3232
- name: "LEGACY"
3333
php: "8.1"
3434
pg-postgis: "14-3"
35-
qgis-server: "3.34"
35+
qgis-server: "qgis-ltr-eager"
3636
update-projects: "FALSE"
3737
- name: "BLEEDING_EDGE"
3838
php: "8.3"
3939
pg-postgis: "17-3"
40-
qgis-server: "3.40"
40+
qgis-server: "qgis-release-eager"
4141
update-projects: "FALSE"
4242
env:
4343
CYPRESS_CI: TRUE
@@ -285,6 +285,7 @@ jobs:
285285
mkdir -p /tmp/e2e/lwc
286286
mkdir -p /tmp/e2e/docker
287287
docker logs lizmap${{ env.LZMBRANCH }}_test_qgis &> /tmp/e2e/docker/qgis-server.log | true
288+
docker logs lizmap${{ env.LZMBRANCH }}_test_qgis_rpc &> /tmp/e2e/docker/qgis-server-rpc.log | true
288289
docker logs lizmap${{ env.LZMBRANCH }}_test_php &> /tmp/e2e/docker/php.log | true
289290
docker logs lizmap${{ env.LZMBRANCH }}_test_nginx &> /tmp/e2e/docker/nginx.log | true
290291
cp -r ../lizmap/var/log /tmp/e2e/lwc/

tests/Makefile

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ LIZMAP_GROUP_ID ?= $(shell id -g)
1515
# Note that GH Action E2E has its own version config for PHP, PG and QGIS
1616
PHP_VERSION ?= 8.2
1717
LZMPOSTGISVERSION ?= 14-3
18-
LZMQGSRVVERSION ?= 3.34
18+
LZMQGSRVVERSION ?= qgis-ltr-eager
1919
LZMPGPORT ?= 8132
2020
LZMQGSRVPORT ?= 8131
21+
LZMQGSADMINPORT ?= 9876
2122
LZMWEBPORT ?= 8130
2223
LIZMAP_ADMIN_LOGIN ?= admin
2324
LIZMAP_ADMIN_EMAIL ?= admin@localhost.local
@@ -34,6 +35,7 @@ env:
3435
LZMBRANCH=$(LZMBRANCH)
3536
LZMPGPORT=$(LZMPGPORT)
3637
LZMQGSRVPORT=$(LZMQGSRVPORT)
38+
LZMQGSADMINPORT=$(LZMQGSADMINPORT)
3739
LZMWEBPORT=$(LZMWEBPORT)
3840
LIZMAP_ADMIN_LOGIN=$(LIZMAP_ADMIN_LOGIN)
3941
LIZMAP_ADMIN_EMAIL=$(LIZMAP_ADMIN_EMAIL)
@@ -45,32 +47,24 @@ env:
4547

4648

4749
build-plugins:
48-
docker run \
49-
-u $(LIZMAP_USER_ID):$(LIZMAP_GROUP_ID) \
50-
--rm -i \
51-
-e QGSRV_SERVER_PLUGINPATH=/srv/plugins \
52-
-e QGIS_PLUGIN_MANAGER_SOURCES_FILE=/tmp/sources-plugin-manager.list \
53-
-e QGIS_PLUGIN_MANAGER_CACHE_DIR=/tmp/cache-plugin-manager \
54-
-v $(shell pwd)/qgis-server-plugins:/srv/plugins \
55-
-v $(shell pwd)/:/src \
56-
--entrypoint /src/add_server_plugins.sh \
57-
3liz/qgis-map-server:${LZMQGSRVVERSION} \
50+
echo "Plugins are auto installed at qgis worker startup"
5851

5952
show-qgis-server-versions:
6053
docker run \
6154
--rm -i \
62-
--entrypoint qgisserver \
63-
3liz/qgis-map-server:${LZMQGSRVVERSION} \
64-
--version
55+
--entrypoint qjazz-config \
56+
3liz/qjazz:${LZMQGSRVVERSION} \
57+
version
6558
docker run \
6659
-u $(LIZMAP_USER_ID):$(LIZMAP_GROUP_ID) \
6760
--rm -i \
6861
-e QGSRV_SERVER_PLUGINPATH=/srv/plugins \
6962
-e QGIS_PLUGIN_MANAGER_SKIP_SOURCES_FILE=True \
7063
-v $(shell pwd)/qgis-server-plugins:/srv/plugins \
7164
-v $(shell pwd)/:/src \
65+
--workdir /srv/plugins \
7266
--entrypoint qgis-plugin-manager \
73-
3liz/qgis-map-server:${LZMQGSRVVERSION} \
67+
3liz/qjazz:${LZMQGSRVVERSION} \
7468
list
7569

7670
upgrade-projects:
@@ -81,7 +75,7 @@ upgrade-projects:
8175
-v $(shell pwd)/qgis-server-plugins:/srv/plugins \
8276
-v $(shell pwd)/qgis-projects/tests:/tmp/qgis-projects \
8377
--entrypoint /srv/plugins/upgrade_projects.py \
84-
3liz/qgis-map-server:${LZMQGSRVVERSION} \
78+
3liz/qjazz:${LZMQGSRVVERSION} \
8579

8680
up: env
8781
docker compose up -V --force-recreate -d

tests/add_server_plugins.sh

Lines changed: 0 additions & 33 deletions
This file was deleted.

tests/docker-compose.yml

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ services:
2727
SLAPD_ORGANISATION: "Lizmap"
2828
SLAPD_DOMAIN: "tests.lizmap"
2929
volumes:
30-
- { type: bind, source: ./docker-conf/openldap/ldif, target: /customldif }
30+
- { type: bind, source: ./docker-conf/openldap/ldif, target: /customldif }
3131
lizmap:
3232
build:
3333
context: ./docker-conf/phpfpm
@@ -67,29 +67,40 @@ services:
6767
- ${LZMWEBPORT}:80
6868
depends_on:
6969
- lizmap
70-
map:
71-
container_name: "lizmap${LZMBRANCH}_test_qgis"
72-
image: 3liz/qgis-map-server:${LZMQGSRVVERSION}
70+
# QGIS RPC backend
71+
map-rpc:
72+
container_name: "lizmap${LZMBRANCH}_test_qgis_rpc"
73+
image: 3liz/qjazz:${LZMQGSRVVERSION}
74+
command: ["qjazz-rpc", "serve", "-C", "/srv/etc/qgis-server.toml"]
7375
environment:
74-
PGSERVICEFILE: /srv/etc/pg_service.conf
76+
CONF_LOGGING__LEVEL: trace
77+
CONF_WORKER__NUM_PROCESSES: 4
78+
CONF_DISPLAY_XVFB: ON
79+
CONF_USER: ${LIZMAP_USER_ID}:${LIZMAP_GROUP_ID}
80+
QGIS_PLUGINPATH: /srv/qgis-server-plugins
7581
QGIS_SERVER_LIZMAP_REVEAL_SETTINGS: yes
76-
QGSRV_API_ENABLED_LIZMAP: yes
77-
QGSRV_CACHE_ROOTDIR: /srv/projects
78-
QGSRV_CACHE_SIZE: '20'
79-
# For testing purpose, I think it's better to have a strict check of layers
80-
QGSRV_CACHE_STRICT_CHECK: yes
81-
QGSRV_LOGGING_LEVEL: DEBUG
82-
QGSRV_SERVER_PLUGINPATH: /srv/qgis-server-plugins
83-
QGSRV_SERVER_WORKERS: 4
84-
QGSRV_USER: ${LIZMAP_USER_ID}:${LIZMAP_GROUP_ID}
85-
ROUTER_HOST: map
82+
QGIS_PLUGIN_MANAGER_SOURCES_FILE: /srv/etc/plugin-sources.list
83+
PGSERVICEFILE: /srv/etc/pg_service.conf
8684
volumes:
8785
- { type: bind, source: ./qgis-projects, target: /srv/projects }
8886
- { type: bind, source: ./qgis-server-plugins, target: /srv/qgis-server-plugins }
89-
- { type: bind, source: ./wps-data, target: /srv/data }
9087
- { type: bind, source: ./docker-conf/pg_service.conf, target: /srv/etc/pg_service.conf }
88+
- { type: bind, source: ./docker-conf/qgis-server.toml, target: /srv/etc/qgis-server.toml }
89+
- type: bind
90+
source: ./docker-conf/unstable-plugin-sources.list
91+
target: /srv/etc/plugin-sources.list
92+
# QGIS workers frontend
93+
map:
94+
container_name: "lizmap${LZMBRANCH}_test_qgis"
95+
image: 3liz/qjazz:${LZMQGSRVVERSION}
96+
command: ["qjazz-map", "serve", "-C", "/srv/etc/qgis-server.toml"]
97+
environment:
98+
CONF_LOGGING__LEVEL: trace
99+
volumes:
100+
- { type: bind, source: ./docker-conf/qgis-server.toml, target: /srv/etc/qgis-server.toml }
91101
ports:
92-
- ${LZMQGSRVPORT}:8080
102+
- ${LZMQGSRVPORT}:9080
103+
- ${LZMQGSADMINPORT}:9876
93104
webdav:
94105
container_name: lizmap${LZMBRANCH}_test_webdav
95106
image: ugeek/webdav:amd64
@@ -101,6 +112,8 @@ services:
101112
- UID=${LIZMAP_USER_ID}
102113
- GID=${LIZMAP_GROUP_ID}
103114
- TZ=Europe/Rome
115+
#profiles:
116+
# - webdav
104117
volumes:
105118
pg_data:
106119
name: "lizmap${LZMBRANCH}_pg_data"

tests/docker-conf/phpfpm/lizmapConfig.ini.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
;list the different map services (servers, generic parameters, etc.)
66
[services]
77
;Wms map server
8-
wmsServerURL="http://map:8080/ows/"
8+
wmsServerURL="http://map:9080/"
99
;WMS subdomain URLs list (optional)
1010
wmsPublicUrlList=
1111
;URL to the API exposed by the Lizmap plugin for QGIS Server
12-
lizmapPluginAPIURL="http://map:8080/lizmap/"
12+
lizmapPluginAPIURL="http://map:9080/lizmap/"
1313

1414
onlyMaps=off
1515
defaultRepository=testsrepository

tests/docker-conf/qgis-server.toml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#
2+
# Worker backend configuration
3+
#
4+
5+
6+
[worker]
7+
name = "Server"
8+
9+
[worker.qgis]
10+
max_projects = 20
11+
12+
[worker.qgis.projects]
13+
ignore_bad_layers = false
14+
15+
[worker.qgis.projects.search_paths]
16+
'/' = "/srv/projects"
17+
18+
# Plugins allowed to install from plugin paths
19+
[worker.qgis.plugins]
20+
install = [
21+
"Lizmap server",
22+
"atlasprint",
23+
"wfsOutputExtension",
24+
]
25+
# Auto install plugins from embedded plugin manager
26+
install_mode = "auto"
27+
28+
#
29+
# HTTP Front end configuration
30+
#
31+
32+
[backends.root]
33+
title = "Root backend"
34+
host = "map-rpc"
35+
route = "/"
36+
37+
[[backends.root.api]]
38+
endpoint = "lizmap"
39+
name = "Lizmap api"
40+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
https://packages.3liz.org/pub/server-plugins-repository/unstable/plugins.[VERSION].xml

tests/run-docker

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ if [ "$CMD" == "reset" ]; then
1919
elif [ "$CMD" == "build" ]; then
2020
# install or update base images, to be sure we have the latest images
2121
docker compose pull
22-
# install or update plugins, to be sure we have the latest plugins
23-
make build-plugins
2422
fi
2523

2624
docker compose $CMD "$@"

0 commit comments

Comments
 (0)