Skip to content

Commit be36c5d

Browse files
committed
Use QJazz in tests
1 parent 0f05fbd commit be36c5d

File tree

7 files changed

+87
-83
lines changed

7 files changed

+87
-83
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-3.40"
3131
update-projects: "FALSE"
3232
- name: "BLEEDING_EDGE"
3333
php: "8.4"
3434
pg-postgis: "17-3"
35-
qgis-server: "3.42"
35+
qgis-server: "qgis-3.44"
3636
update-projects: "TRUE"
3737
env:
3838
CYPRESS_CI: TRUE
@@ -309,6 +309,7 @@ jobs:
309309
mkdir -p /tmp/e2e/lwc
310310
mkdir -p /tmp/e2e/docker
311311
docker logs lizmap${{ env.LZMBRANCH }}_test_qgis &> /tmp/e2e/docker/qgis-server.log | true
312+
docker logs lizmap${{ env.LZMBRANCH }}_test_qgis_rpc &> /tmp/e2e/docker/qgis-server-rpc.log | true
312313
docker logs lizmap${{ env.LZMBRANCH }}_test_php &> /tmp/e2e/docker/php.log | true
313314
docker logs lizmap${{ env.LZMBRANCH }}_test_nginx &> /tmp/e2e/docker/nginx.log | true
314315
cp -r ../lizmap/var/log /tmp/e2e/lwc/

tests/Makefile

Lines changed: 13 additions & 20 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 ?= [email protected]
@@ -49,32 +50,24 @@ env:
4950
EOF
5051

5152
build-plugins:
52-
docker run \
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 \
6557
--rm -i \
66-
--entrypoint qgisserver \
67-
3liz/qgis-map-server:${LZMQGSRVVERSION} \
68-
--version
58+
--entrypoint qjazz-config \
59+
3liz/qjazz:${LZMQGSRVVERSION} \
60+
version
6961
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: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -67,32 +67,39 @@ 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_MANAGEMENT_ENABLED: yes
84-
QGSRV_MANAGEMENT_INTERFACES: "0.0.0.0"
85-
QGSRV_SERVER_WORKERS: 4
86-
QGSRV_USER: ${LIZMAP_USER_ID}:${LIZMAP_GROUP_ID}
87-
ROUTER_HOST: map
82+
QGIS_PLUGIN_MANAGER_SOURCES_FILE: /srv/etc/plugin-sources.list
83+
PGSERVICEFILE: /srv/etc/pg_service.conf
8884
volumes:
8985
- { type: bind, source: ./qgis-projects, target: /srv/projects }
9086
- { type: bind, source: ./qgis-server-plugins, target: /srv/qgis-server-plugins }
91-
- { type: bind, source: ./wps-data, target: /srv/data }
9287
- { 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 }
93101
ports:
94-
- ${LZMQGSRVPORT}:8080
95-
- ${QGSRVAPIPORT}:19876
102+
- ${LZMQGSRVPORT}:9080
96103
webdav:
97104
container_name: lizmap${LZMBRANCH}_test_webdav
98105
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)