Skip to content

Commit

Permalink
Enhancing test environment
Browse files Browse the repository at this point in the history
  • Loading branch information
rldhont committed Sep 11, 2024
1 parent dcbb6a8 commit d89aaeb
Show file tree
Hide file tree
Showing 6 changed files with 1,479 additions and 11 deletions.
22 changes: 21 additions & 1 deletion tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ env: dirs
EOF

run: stop env install-plugins
docker compose up
docker compose up -d

stop:
docker compose down || true
Expand All @@ -82,6 +82,26 @@ install-module:
docker compose exec -u ${LIZMAP_USER_ID} lizmap php /www/lizmap/install/configurator.php altiProfilAdmin
docker compose exec -u ${LIZMAP_USER_ID} lizmap php /www/lizmap/install/installer.php -v


import-lizmap-acl:
@echo "Set repositories and users rights if needed"
@echo "Set view project"
docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/console.php acl2:add __anonymous "lizmap.repositories.view" altiprofil'
docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/console.php acl2:add users "lizmap.repositories.view" altiprofil'
docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/console.php acl2:add admins "lizmap.repositories.view" altiprofil'
@echo "Display WMS links"
docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/console.php acl2:add __anonymous "lizmap.tools.displayGetCapabilitiesLinks" altiprofil'
docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/console.php acl2:add users "lizmap.tools.displayGetCapabilitiesLinks" altiprofil'
docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/console.php acl2:add admins "lizmap.tools.displayGetCapabilitiesLinks" altiprofil'
@echo "Edition"
docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/console.php acl2:add __anonymous "lizmap.tools.edition.use" altiprofil'
docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/console.php acl2:add users "lizmap.tools.edition.use" altiprofil'
docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/console.php acl2:add admins "lizmap.tools.edition.use" altiprofil'
@echo "Export layers"
docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/console.php acl2:add __anonymous "lizmap.tools.layer.export" altiprofil'
docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/console.php acl2:add users "lizmap.tools.layer.export" altiprofil'
docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/console.php acl2:add admins "lizmap.tools.layer.export" altiprofil'

install-plugins:
docker run \
-u $(LIZMAP_USER_ID):$(LIZMAP_USER_GID) \
Expand Down
14 changes: 5 additions & 9 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,13 @@ Steps:
# Clean previous versions (optional)
make clean
# Run the different services (default is Lizmap 3.6)
# Run the different services (default is Lizmap 3.7)
make run
# or for older lizmap
make run LIZMAP_VERSION_TAG=3.5
```
- If you run Lizmap 3.6+, install the altiProfil modules with
```
# Install the modules
make install-module
make import-lizmap-acl
```
- Open your browser at `http://localhost:9012`
Expand Down Expand Up @@ -48,5 +44,5 @@ psql service=lizmap-altiprofil

## Access to the lizmap container

If you want to enter into the lizmap container to execute some commands,
If you want to enter into the lizmap container to execute some commands,
execute `make shell`.
1 change: 0 additions & 1 deletion tests/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ services:
- ${LIZMAP_DIR}/var/lizmap-db:/www/lizmap/var/db
- ${LIZMAP_DIR}/www:/www/lizmap/www
- ${LIZMAP_DIR}/var/lizmap-log:/www/lizmap/var/log
- ${LIZMAP_DIR}/var/lizmap-temp:/www/temp/lizmap/
- ${LIZMAP_DIR}/etc:/srv/etc:ro
- ${PGMETADATA_MODULE_SRC}/altiProfil:/www/lizmap/lizmap-modules/altiProfil
- ${PGMETADATA_MODULE_SRC}/altiProfilAdmin:/www/lizmap/lizmap-modules/altiProfilAdmin
Expand Down
Binary file not shown.
Loading

0 comments on commit d89aaeb

Please sign in to comment.