Skip to content

Commit 2ad947a

Browse files
committed
Use QJazz in tests
1 parent 98078a8 commit 2ad947a

File tree

7 files changed

+89
-88
lines changed

7 files changed

+89
-88
lines changed

.github/workflows/e2e_tests.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ jobs:
2727
- name: "LEGACY"
2828
php: "8.2"
2929
pg-postgis: "14-3"
30-
qgis-server: "3.40"
30+
qgis-server: "qgis-ltr-eager"
3131
update-projects: "FALSE"
3232
- name: "BLEEDING_EDGE"
3333
php: "8.4"
3434
pg-postgis: "17-3"
35-
qgis-server: "3.44"
35+
qgis-server: "qgis-release-eager"
3636
update-projects: "TRUE"
3737
env:
3838
CYPRESS_CI: TRUE
@@ -337,6 +337,7 @@ jobs:
337337
mkdir -p /tmp/e2e/lwc
338338
mkdir -p /tmp/e2e/docker
339339
docker logs lizmap${{ env.LZMBRANCH }}_test_qgis &> /tmp/e2e/docker/qgis-server.log | true
340+
docker logs lizmap${{ env.LZMBRANCH }}_test_qgis_rpc &> /tmp/e2e/docker/qgis-server-rpc.log | true
340341
docker logs lizmap${{ env.LZMBRANCH }}_test_php &> /tmp/e2e/docker/php.log | true
341342
docker logs lizmap${{ env.LZMBRANCH }}_test_nginx &> /tmp/e2e/docker/nginx.log | true
342343
cp -r ../lizmap/var/log /tmp/e2e/lwc/

tests/Makefile

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ 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.40
18+
LZMQGSRVVERSION ?= qgis-ltr-eager
1919
QGSRVAPIPORT ?= 8134
2020
LZMPGPORT ?= 8132
2121
LZMQGSRVPORT ?= 8131
22+
LZMQGSADMINPORT ?= 9876
2223
LZMWEBPORT ?= 8130
2324
LIZMAP_ADMIN_LOGIN ?= admin
2425
LIZMAP_ADMIN_EMAIL ?= admin@localhost.local
@@ -49,32 +50,24 @@ env:
4950
EOF
5051

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

6355
show-qgis-server-versions:
6456
@docker run -q \
6557
--rm -i \
66-
--entrypoint qgisserver \
67-
3liz/qgis-map-server:${LZMQGSRVVERSION} \
68-
--version
69-
@docker run -q \
58+
--entrypoint qjazz-config \
59+
3liz/qjazz:${LZMQGSRVVERSION} \
60+
version
61+
docker run \
7062
-u $(LIZMAP_USER_ID):$(LIZMAP_GROUP_ID) \
7163
--rm -i \
72-
-e QGSRV_SERVER_PLUGINPATH=/srv/plugins \
64+
-e QGIS_PLUGINPATH=/srv/plugins \
7365
-e QGIS_PLUGIN_MANAGER_SKIP_SOURCES_FILE=True \
7466
-v $(shell pwd)/qgis-server-plugins:/srv/plugins \
7567
-v $(shell pwd)/:/src \
68+
--workdir /srv/plugins \
7669
--entrypoint qgis-plugin-manager \
77-
3liz/qgis-map-server:${LZMQGSRVVERSION} \
70+
3liz/qjazz:${LZMQGSRVVERSION} \
7871
list
7972

8073
upgrade-projects:
@@ -85,19 +78,19 @@ upgrade-projects:
8578
-v $(shell pwd)/qgis-server-plugins:/srv/plugins \
8679
-v $(shell pwd)/qgis-projects/tests:/tmp/qgis-projects \
8780
--entrypoint /srv/plugins/upgrade_projects.py \
88-
3liz/qgis-map-server:${LZMQGSRVVERSION} \
81+
3liz/qjazz:${LZMQGSRVVERSION} \
8982

9083
up: env
91-
docker compose up -V --force-recreate -d
84+
docker compose --profile=dev up -V --force-recreate -d
9285

9386
# Alias for 'up'
9487
run: up
9588

9689
stop:
97-
docker compose stop
90+
docker compose --profile=dev stop
9891

9992
reset:
100-
docker compose down -v --remove-orphans
93+
docker compose --profile=dev down -v --remove-orphans
10194
./lizmap-ctl clean
10295

10396
# install or update base images, to be sure we have the latest images

tests/add_server_plugins.sh

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

tests/docker-compose.yml

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -76,36 +76,40 @@ services:
7676
ports:
7777
- ${LZMWEBPORT}:80
7878
depends_on:
79-
lizmap:
80-
condition: service_healthy
81-
map:
82-
container_name: "lizmap${LZMBRANCH}_test_qgis"
83-
image: 3liz/qgis-map-server:${LZMQGSRVVERSION}
79+
- lizmap
80+
# QGIS RPC backend
81+
map-rpc:
82+
container_name: "lizmap${LZMBRANCH}_test_qgis_rpc"
83+
image: 3liz/qjazz:${LZMQGSRVVERSION}
84+
command: ["qjazz-rpc", "serve", "-C", "/srv/etc/qgis-server.toml"]
8485
environment:
85-
PGSERVICEFILE: /srv/etc/pg_service.conf
86+
CONF_LOGGING__LEVEL: trace
87+
CONF_WORKER__NUM_PROCESSES: 4
88+
CONF_DISPLAY_XVFB: ON
89+
CONF_USER: ${LIZMAP_USER_ID}:${LIZMAP_GROUP_ID}
90+
QGIS_PLUGINPATH: /srv/qgis-server-plugins
8691
QGIS_SERVER_LIZMAP_REVEAL_SETTINGS: yes
87-
QGIS_SERVER_TRUST_LAYER_METADATA: yes
88-
QGIS_SERVER_FORCE_READONLY_LAYERS: yes
89-
QGSRV_API_ENABLED_LIZMAP: yes
90-
QGSRV_CACHE_ROOTDIR: /srv/projects
91-
QGSRV_CACHE_SIZE: '20'
92-
# For testing purpose, I think it's better to have a strict check of layers
93-
QGSRV_CACHE_STRICT_CHECK: yes
94-
QGSRV_LOGGING_LEVEL: DEBUG
95-
QGSRV_SERVER_PLUGINPATH: /srv/qgis-server-plugins
96-
QGSRV_MANAGEMENT_ENABLED: yes
97-
QGSRV_MANAGEMENT_INTERFACES: "0.0.0.0"
98-
QGSRV_SERVER_WORKERS: 4
99-
QGSRV_USER: ${LIZMAP_USER_ID}:${LIZMAP_GROUP_ID}
100-
ROUTER_HOST: map
92+
QGIS_PLUGIN_MANAGER_SOURCES_FILE: /srv/etc/plugin-sources.list
93+
PGSERVICEFILE: /srv/etc/pg_service.conf
10194
volumes:
10295
- { type: bind, source: ./qgis-projects, target: /srv/projects }
10396
- { type: bind, source: ./qgis-server-plugins, target: /srv/qgis-server-plugins }
104-
- { type: bind, source: ./wps-data, target: /srv/data }
10597
- { type: bind, source: ./docker-conf/pg_service.conf, target: /srv/etc/pg_service.conf }
98+
- { type: bind, source: ./docker-conf/qgis-server.toml, target: /srv/etc/qgis-server.toml }
99+
- type: bind
100+
source: ./docker-conf/unstable-plugin-sources.list
101+
target: /srv/etc/plugin-sources.list
102+
# QGIS workers frontend
103+
map:
104+
container_name: "lizmap${LZMBRANCH}_test_qgis"
105+
image: 3liz/qjazz:${LZMQGSRVVERSION}
106+
command: ["qjazz-map", "serve", "-C", "/srv/etc/qgis-server.toml"]
107+
environment:
108+
CONF_LOGGING__LEVEL: trace
109+
volumes:
110+
- { type: bind, source: ./docker-conf/qgis-server.toml, target: /srv/etc/qgis-server.toml }
106111
ports:
107-
- ${LZMQGSRVPORT}:8080
108-
- ${QGSRVAPIPORT}:19876
112+
- ${LZMQGSRVPORT}:9080
109113
webdav:
110114
container_name: lizmap${LZMBRANCH}_test_webdav
111115
image: ugeek/webdav:amd64

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
;URL to QGIS Server for OGC web services
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: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#
2+
# Worker backend configuration
3+
#
4+
5+
6+
[worker]
7+
name = "Server"
8+
9+
[worker.qgis]
10+
max_projects = 20
11+
use_default_server_handler = true
12+
13+
[worker.qgis.projects]
14+
ignore_bad_layers = false
15+
16+
[worker.qgis.projects.search_paths]
17+
'/' = "/srv/projects"
18+
19+
# Plugins allowed to install from plugin paths
20+
[worker.qgis.plugins]
21+
install = [
22+
"Lizmap server",
23+
"atlasprint",
24+
"wfsOutputExtension",
25+
]
26+
# Auto install plugins from embedded plugin manager
27+
install_mode = "auto"
28+
29+
#
30+
# HTTP Front end configuration
31+
#
32+
33+
[backends.root]
34+
title = "Root backend"
35+
host = "map-rpc"
36+
route = "/"
37+
38+
[[backends.root.api]]
39+
endpoint = "lizmap"
40+
name = "Lizmap"
41+

tests/run-docker

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ if [ "$CMD" == "reset" ]; then
1818
exit 0
1919
elif [ "$CMD" == "build" ]; then
2020
# install or update base images, to be sure we have the latest images
21-
docker compose pull
22-
# install or update plugins, to be sure we have the latest plugins
23-
make build-plugins
21+
docker compose --profile=webdav --profile=swagger pull
2422
fi
2523

26-
docker compose $CMD "$@"
24+
docker compose --profile=webdav --profile=swagger $CMD "$@"

0 commit comments

Comments
 (0)