diff --git a/CONST_create_template/docker-compose-lib.yaml b/CONST_create_template/docker-compose-lib.yaml index f6710db74..9210b816e 100644 --- a/CONST_create_template/docker-compose-lib.yaml +++ b/CONST_create_template/docker-compose-lib.yaml @@ -82,6 +82,8 @@ services: environment: - PGOPTIONS - MAPSERVER_CONFIG_FILE=/etc/mapserver/mapserver.conf + - MAPSERVER_BASE_PATH=/mapserv_proxy + - OGCAPI_HTML_TEMPLATE_DIRECTORY=/usr/local/share/mapserver/ogcapi/templates/html-bootstrap4/ - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY - AWS_DEFAULT_REGION diff --git a/CONST_create_template/env.default b/CONST_create_template/env.default index f2032062c..afe386e55 100644 --- a/CONST_create_template/env.default +++ b/CONST_create_template/env.default @@ -1,5 +1,5 @@ # Default values for c2cgeoportal -GEOMAPFISH_VERSION=2.9.rc.10 +GEOMAPFISH_VERSION=2.9.rc.11 GEOMAPFISH_MAIN_VERSION=2.9 GEOMAPFISH_MAIN_MINOR_VERSION=2.9.0 COMPOSE_PROJECT_NAME=geomapfish diff --git a/CONST_create_template/tests/test_app.py b/CONST_create_template/tests/test_app.py index c60a3ed45..012b3baf3 100644 --- a/CONST_create_template/tests/test_app.py +++ b/CONST_create_template/tests/test_app.py @@ -17,12 +17,47 @@ ("https://front/c2c/health_check", {"checker": "check_collector"}, 2), ("https://front/admin/layertree", {}, 10), ("https://front/admin/layertree/children", {}, 10), - ("http://mapserver:8080/mapserv_proxy", {"SERVICE": "WMS", "REQUEST": "GetCapabilities"}, 60), + ( + "http://mapserver:8080/mapserv_proxy/mapserver", + {"SERVICE": "WMS", "REQUEST": "GetCapabilities"}, + 60, + ), ( "https://front/mapserv_proxy", - {"ogcserver": "source for image/png", "SERVICE": "WMS", "REQUEST": "GetCapabilities"}, + {"ogcserver": "mapserver", "SERVICE": "WMS", "REQUEST": "GetCapabilities"}, 60, ), + # ( + # "http://qgisserver:8080/mapserv_proxy/", + # {"SERVICE": "WMS", "REQUEST": "GetCapabilities", "MAP": "/etc/qgisserver/project.qgs"}, + # 60, + # ), + # ( + # "https://front/mapserv_proxy", + # {"ogcserver": "qgisserver", "SERVICE": "WMS", "REQUEST": "GetCapabilities"}, + # 60, + # ), + # OGC API - Features + # ( + # "http://mapserver:8080/mapserv_proxy/mapserver/ogcapi/collections/osm_protected/items", + # {"bbox": "6.0,46.0,7.0,47.0", "limit": "100"}, + # 60, + # ), + # ( + # "https://front/mapserv_proxy/mapserver/mapserver/ogcapi/collections/osm_open/items", + # {"bbox": "6.0,46.0,7.0,47.0", "limit": "100"}, + # 60, + # ), + # ( + # "http://qgisserver:8080/mapserv_proxy/qgisserver/wfs3/collections/points/items", + # {"map": "/etc/qgisserver/project.qgs", "bbox": "6.0,46.0,7.0,47.0", "limit": "100"}, + # 60, + # ), + # ( + # "https://front/mapserv_proxy/qgisserver/wfs3/collections/points/items", + # {"bbox": "6.0,46.0,7.0,47.0", "limit": "100"}, + # 60, + # ), ], ) def test_url(url: str, params: dict[str, str], timeout: int) -> None: diff --git a/docker-compose-lib.yaml b/docker-compose-lib.yaml index f6710db74..9210b816e 100644 --- a/docker-compose-lib.yaml +++ b/docker-compose-lib.yaml @@ -82,6 +82,8 @@ services: environment: - PGOPTIONS - MAPSERVER_CONFIG_FILE=/etc/mapserver/mapserver.conf + - MAPSERVER_BASE_PATH=/mapserv_proxy + - OGCAPI_HTML_TEMPLATE_DIRECTORY=/usr/local/share/mapserver/ogcapi/templates/html-bootstrap4/ - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY - AWS_DEFAULT_REGION diff --git a/env.default b/env.default index f2032062c..afe386e55 100644 --- a/env.default +++ b/env.default @@ -1,5 +1,5 @@ # Default values for c2cgeoportal -GEOMAPFISH_VERSION=2.9.rc.10 +GEOMAPFISH_VERSION=2.9.rc.11 GEOMAPFISH_MAIN_VERSION=2.9 GEOMAPFISH_MAIN_MINOR_VERSION=2.9.0 COMPOSE_PROJECT_NAME=geomapfish diff --git a/mapserver/mapserver.conf b/mapserver/mapserver.conf index 61302736f..26bec65e1 100644 --- a/mapserver/mapserver.conf +++ b/mapserver/mapserver.conf @@ -10,6 +10,7 @@ CONFIG # Map aliases # MAPS + MainPNG "/etc/mapserver/mapserver.map" END END diff --git a/tests/test_app.py b/tests/test_app.py index fa124e97f..24461c253 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -15,17 +15,70 @@ ("https://front/c2c/health_check", {}, 2), ("https://front/c2c/health_check", {"max_level": "1"}, 2), ("https://front/c2c/health_check", {"checker": "check_collector"}, 2), - ("http://mapserver:8080/mapserv_proxy", {"SERVICE": "WMS", "REQUEST": "GetCapabilities"}, 60), + # ("https://front/admin/layertree", {}, 10), + # ("https://front/admin/layertree/children", {}, 10), ( - "https://front/mapserv_proxy", - {"ogcserver": "Main PNG", "SERVICE": "WMS", "REQUEST": "GetCapabilities"}, + "http://mapserver:8080/mapserv_proxy/MainPNG", + {"SERVICE": "WMS", "REQUEST": "GetCapabilities"}, + 60, + ), + ( + "http://mapserver:8080/mapserv_proxy/", + {"MAP": "MainPNG", "SERVICE": "WMS", "REQUEST": "GetCapabilities"}, 60, ), + # ( + # "https://front/mapserv_proxy", + # {"ogcserver": "Main PNG", "SERVICE": "WMS", "REQUEST": "GetCapabilities"}, + # 60, + # ), + # ( + # "https://front/mapserv_proxy/Main+PNG", + # {"SERVICE": "WMS", "REQUEST": "GetCapabilities"}, + # 60, + # ), + # QGIS Server ( "https://front/mapserv_proxy", {"ogcserver": "QGIS server", "SERVICE": "WMS", "REQUEST": "GetCapabilities"}, 60, ), + # ( + # "https://front/mapserv_proxy/QGIS+server", + # {"SERVICE": "WMS", "REQUEST": "GetCapabilities"}, + # 60, + # ), + # ( + # "http://qgisserver:8080/mapserv_proxy/", + # {"SERVICE": "WMS", "REQUEST": "GetCapabilities", "MAP": "/etc/qgisserver/project.qgs"}, + # 60, + # ), + # ( + # "https://front/mapserv_proxy", + # {"ogcserver": "qgisserver", "SERVICE": "WMS", "REQUEST": "GetCapabilities"}, + # 60, + # ), + # OGC API - Features + # ( + # "http://mapserver:8080/mapserv_proxy/mapserver/ogcapi/collections/osm_protected/items", + # {"bbox": "6.0,46.0,7.0,47.0", "limit": "100"}, + # 60, + # ), + # ( + # "https://front/mapserv_proxy/mapserver/mapserver/ogcapi/collections/osm_open/items", + # {"bbox": "6.0,46.0,7.0,47.0", "limit": "100"}, + # 60, + # ), + # ( + # "http://qgisserver:8080/mapserv_proxy/qgisserver/wfs3/collections/points/items", + # {"map": "/etc/qgisserver/project.qgs", "bbox": "6.0,46.0,7.0,47.0", "limit": "100"}, + # 60, + # ), + # ( + # "https://front/mapserv_proxy/qgisserver/wfs3/collections/points/items", + # {"bbox": "6.0,46.0,7.0,47.0", "limit": "100"}, + # 60, + # ), ], ) def test_url(url: str, params: dict[str, str], timeout: int) -> None: