-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix dash in MS_MAP_PATTERN #172
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,6 @@ | ||
FROM camptocamp/c2cwsgiutils:5 | ||
|
||
COPY . /acceptance_tests/ | ||
|
||
WORKDIR /acceptance_tests | ||
COPY . ./ | ||
|
||
CMD tail -f /dev/null | ||
CMD py.test -vv --color=yes --junitxml /tmp/junitxml/results.xml | ||
CMD ["tail", "-f", "/dev/null"] | ||
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
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"] |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why no more py.test ? It's done elsewhere ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, this file was not used I just do some cleaning then this file is used again :-)