-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #175 from camptocamp/backport/172-to-7.4
[Backport 7.4] Fix dash in MS_MAP_PATTERN
- Loading branch information
Showing
8 changed files
with
272 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
FROM camptocamp/c2cwsgiutils:3 | ||
|
||
COPY . /acceptance_tests/ | ||
|
||
WORKDIR /acceptance_tests | ||
COPY . ./ | ||
|
||
CMD ["tail", "-f", "/dev/null"] | ||
|
||
CMD tail -f /dev/null | ||
CMD py.test -vv --color=yes --junitxml /tmp/junitxml/results.xml | ||
ENV C2C_REQUESTS_DEFAULT_TIMEOUT=10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
MAP | ||
NAME "test" | ||
|
||
EXTENT -180 -90 180 90 | ||
UNITS METERS | ||
|
||
# RESOLUTION and DEFRESOLUTION default to 96. If you | ||
# change RESOLUTION to some other value, also change | ||
# DEFRESOLUTION. See | ||
# http://mapserver.org/development/rfc/ms-rfc-55.html | ||
RESOLUTION 96 ## Also set in Openlayers especially for legends | ||
DEFRESOLUTION 96 | ||
|
||
# MAXSIZE shouldn't be less than 5000 for MF print on A3 | ||
MAXSIZE 5000 | ||
|
||
SHAPEPATH '/var/sig/c2cgeoportal' | ||
|
||
IMAGECOLOR 255 255 255 | ||
STATUS ON | ||
|
||
#FONTSET "fonts.conf" | ||
#SYMBOLSET "symbol.sym" | ||
|
||
OUTPUTFORMAT | ||
NAME jpeg | ||
DRIVER "AGG/JPEG" | ||
MIMETYPE "image/jpeg" | ||
IMAGEMODE RGB | ||
EXTENSION "jpeg" | ||
FORMATOPTION "QUALITY=75,PROGRESSIVE=TRUE" | ||
END | ||
|
||
OUTPUTFORMAT | ||
NAME png | ||
DRIVER AGG/PNG | ||
MIMETYPE "image/png" | ||
IMAGEMODE RGBA | ||
EXTENSION "png" | ||
FORMATOPTION "INTERLACE=OFF" | ||
FORMATOPTION "QUANTIZE_DITHER=OFF" | ||
FORMATOPTION "QUANTIZE_FORCE=ON" | ||
FORMATOPTION "QUANTIZE_COLORS=256" | ||
END | ||
|
||
OUTPUTFORMAT | ||
NAME "geojson" | ||
DRIVER "OGR/GEOJSON" | ||
MIMETYPE "application/json; subtype=geojson; charset=utf-8" | ||
FORMATOPTION "STORAGE=stream" | ||
FORMATOPTION "FORM=SIMPLE" | ||
END | ||
|
||
PROJECTION | ||
"init=epsg:4326" | ||
END | ||
|
||
WEB | ||
METADATA | ||
"wms_title" "test" | ||
"wms_abstract" "MapServer Docker test" | ||
#"wms_onlineresource" "http://mapserver//mapserv" | ||
"wms_srs" "EPSG:4326" | ||
"wms_encoding" "UTF-8" | ||
"wms_enable_request" "*" | ||
"wfs_enable_request" "!*" | ||
"wfs_encoding" "UTF-8" | ||
"wfs_getfeature_formatlist" "gml,geojson" | ||
END | ||
END | ||
|
||
LEGEND | ||
LABEL | ||
ENCODING "UTF-8" | ||
TYPE TRUETYPE | ||
FONT "Arial" | ||
SIZE 9 | ||
END | ||
END | ||
|
||
LAYER | ||
NAME "polygons" | ||
TYPE POLYGON | ||
TEMPLATE fooOnlyForWMSGetFeatureInfo # For GetFeatureInfo | ||
EXTENT -180 -90 180 90 | ||
CONNECTIONTYPE postgis | ||
PROCESSING "CLOSE_CONNECTION=DEFER" # For performance | ||
CONNECTION "user=www-data password=www-data dbname=test host=db" | ||
DATA "geom FROM (SELECT * FROM polygons) AS foo USING unique name USING srid=4326" | ||
METADATA | ||
"wms_title" "polygons" # For WMS | ||
"wms_srs" "EPSG:4326" # For WMS | ||
|
||
"wfs_enable_request" "*" # Enable WFS for this layer | ||
"gml_include_items" "all" # For GetFeatureInfo and WFS GetFeature (QueryBuilder) | ||
"ows_geom_type" "Polygon" # For returning geometries in GetFeatureInfo | ||
"ows_geometries" "geom" # For returning geometries in GetFeatureInfo | ||
"wfs_featureid" "name" | ||
|
||
"wms_metadataurl_href" "http://www.example.com/bar" # For metadata URL | ||
"wms_metadataurl_format" "text/html" # For metadata URL | ||
"wms_metadataurl_type" "TC211" # For metadata URL | ||
END | ||
STATUS ON | ||
PROJECTION | ||
"init=epsg:4326" | ||
END | ||
CLASS | ||
NAME "polygon" | ||
STYLE | ||
OUTLINECOLOR 255 0 0 | ||
WIDTH 2 | ||
END | ||
STYLE | ||
COLOR 255 0 0 | ||
OPACITY 40 | ||
END | ||
END | ||
END | ||
|
||
END |
121 changes: 121 additions & 0 deletions
121
acceptance_tests/config/mapserver/AZ_az-0.9/AZ_az-0.9.map
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
MAP | ||
NAME "test" | ||
|
||
EXTENT -180 -90 180 90 | ||
UNITS METERS | ||
|
||
# RESOLUTION and DEFRESOLUTION default to 96. If you | ||
# change RESOLUTION to some other value, also change | ||
# DEFRESOLUTION. See | ||
# http://mapserver.org/development/rfc/ms-rfc-55.html | ||
RESOLUTION 96 ## Also set in Openlayers especially for legends | ||
DEFRESOLUTION 96 | ||
|
||
# MAXSIZE shouldn't be less than 5000 for MF print on A3 | ||
MAXSIZE 5000 | ||
|
||
SHAPEPATH '/var/sig/c2cgeoportal' | ||
|
||
IMAGECOLOR 255 255 255 | ||
STATUS ON | ||
|
||
#FONTSET "fonts.conf" | ||
#SYMBOLSET "symbol.sym" | ||
|
||
OUTPUTFORMAT | ||
NAME jpeg | ||
DRIVER "AGG/JPEG" | ||
MIMETYPE "image/jpeg" | ||
IMAGEMODE RGB | ||
EXTENSION "jpeg" | ||
FORMATOPTION "QUALITY=75,PROGRESSIVE=TRUE" | ||
END | ||
|
||
OUTPUTFORMAT | ||
NAME png | ||
DRIVER AGG/PNG | ||
MIMETYPE "image/png" | ||
IMAGEMODE RGBA | ||
EXTENSION "png" | ||
FORMATOPTION "INTERLACE=OFF" | ||
FORMATOPTION "QUANTIZE_DITHER=OFF" | ||
FORMATOPTION "QUANTIZE_FORCE=ON" | ||
FORMATOPTION "QUANTIZE_COLORS=256" | ||
END | ||
|
||
OUTPUTFORMAT | ||
NAME "geojson" | ||
DRIVER "OGR/GEOJSON" | ||
MIMETYPE "application/json; subtype=geojson; charset=utf-8" | ||
FORMATOPTION "STORAGE=stream" | ||
FORMATOPTION "FORM=SIMPLE" | ||
END | ||
|
||
PROJECTION | ||
"init=epsg:4326" | ||
END | ||
|
||
WEB | ||
METADATA | ||
"wms_title" "test" | ||
"wms_abstract" "MapServer Docker test" | ||
#"wms_onlineresource" "http://mapserver//mapserv" | ||
"wms_srs" "EPSG:4326" | ||
"wms_encoding" "UTF-8" | ||
"wms_enable_request" "*" | ||
"wfs_enable_request" "!*" | ||
"wfs_encoding" "UTF-8" | ||
"wfs_getfeature_formatlist" "gml,geojson" | ||
END | ||
END | ||
|
||
LEGEND | ||
LABEL | ||
ENCODING "UTF-8" | ||
TYPE TRUETYPE | ||
FONT "Arial" | ||
SIZE 9 | ||
END | ||
END | ||
|
||
LAYER | ||
NAME "polygons" | ||
TYPE POLYGON | ||
TEMPLATE fooOnlyForWMSGetFeatureInfo # For GetFeatureInfo | ||
EXTENT -180 -90 180 90 | ||
CONNECTIONTYPE postgis | ||
PROCESSING "CLOSE_CONNECTION=DEFER" # For performance | ||
CONNECTION "user=www-data password=www-data dbname=test host=db" | ||
DATA "geom FROM (SELECT * FROM polygons) AS foo USING unique name USING srid=4326" | ||
METADATA | ||
"wms_title" "polygons" # For WMS | ||
"wms_srs" "EPSG:4326" # For WMS | ||
|
||
"wfs_enable_request" "*" # Enable WFS for this layer | ||
"gml_include_items" "all" # For GetFeatureInfo and WFS GetFeature (QueryBuilder) | ||
"ows_geom_type" "Polygon" # For returning geometries in GetFeatureInfo | ||
"ows_geometries" "geom" # For returning geometries in GetFeatureInfo | ||
"wfs_featureid" "name" | ||
|
||
"wms_metadataurl_href" "http://www.example.com/bar" # For metadata URL | ||
"wms_metadataurl_format" "text/html" # For metadata URL | ||
"wms_metadataurl_type" "TC211" # For metadata URL | ||
END | ||
STATUS ON | ||
PROJECTION | ||
"init=epsg:4326" | ||
END | ||
CLASS | ||
NAME "polygon" | ||
STYLE | ||
OUTLINECOLOR 255 0 0 | ||
WIDTH 2 | ||
END | ||
STYLE | ||
COLOR 255 0 0 | ||
OPACITY 40 | ||
END | ||
END | ||
END | ||
|
||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,25 @@ | ||
def test_get_capabilities(connection_map): | ||
def test_get_std_map(connection_map): | ||
ns = "{http://www.opengis.net/wms}" | ||
answer = connection_map.get_xml( | ||
"?MAP=/etc/mapserver/mapserver.map&SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.3.0" | ||
) | ||
assert [e.text for e in answer.findall("%sService/%sTitle" % (ns, ns))] == ["test"] | ||
assert [e.text for e in answer.findall(".//%sLayer/%sName" % (ns, ns))] == ["test", "polygons"] | ||
|
||
|
||
def test_get_multi_char_map(connection_map): | ||
ns = "{http://www.opengis.net/wms}" | ||
answer = connection_map.get_xml( | ||
"?MAP=/etc/mapserver/AZ_az-0.9.map&SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.3.0" | ||
) | ||
assert [e.text for e in answer.findall("%sService/%sTitle" % (ns, ns))] == ["test"] | ||
assert [e.text for e in answer.findall(".//%sLayer/%sName" % (ns, ns))] == ["test", "polygons"] | ||
|
||
|
||
def test_get_folder_map(connection_map): | ||
ns = "{http://www.opengis.net/wms}" | ||
answer = connection_map.get_xml( | ||
"?MAP=/etc/mapserver/AZ_az-0.9/AZ_az-0.9.map&SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.3.0" | ||
) | ||
assert [e.text for e in answer.findall("%sService/%sTitle" % (ns, ns))] == ["test"] | ||
assert [e.text for e in answer.findall(".//%sLayer/%sName" % (ns, ns))] == ["test", "polygons"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters