Skip to content

Commit 5fa3b48

Browse files
committed
#469 - quickfix existing deployments with default max_count
1 parent fc01025 commit 5fa3b48

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

GeoHealthCheck/plugins/probe/wfs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class WfsGetFeatureBbox(Probe):
8282
'type': 'string',
8383
'description': 'Maximum amount of features to select',
8484
'default': '5',
85-
'required': True,
85+
'required': False,
8686
'range': None
8787
},
8888
'bbox': {

GeoHealthCheck/probe.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,14 @@ def perform_request(self):
274274
if param_defs[param]['type'] == 'stringlist':
275275
request_parms[param] = ','.join(request_parms[param])
276276

277+
# Some new params may have been defined,
278+
# but not present in request params from DB.
279+
for param_def in param_defs:
280+
if param_def not in request_parms \
281+
and 'default' in param_defs[param_def]:
282+
request_parms[param_def] = \
283+
param_defs[param_def]['default']
284+
277285
request_string = self.REQUEST_TEMPLATE.format(**request_parms)
278286

279287
self.log('Requesting: %s url=%s' % (self.REQUEST_METHOD, url_base))

tests/data/fixtures.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,17 @@
170170
"bbox": ["180635", "455870", "180961", "456050"]
171171
}
172172
},
173+
"PDOK BAG WFS - GetFeature - default max_count": {
174+
"resource": "PDOK BAG WFS",
175+
"probe_class": "GeoHealthCheck.plugins.probe.wfs.WfsGetFeatureBbox",
176+
"parameters": {
177+
"type_name": "bag:verblijfsobject",
178+
"type_ns_prefix": "bag",
179+
"type_ns_uri": "http://bag.geonovum.nl",
180+
"srs": "EPSG:28992",
181+
"bbox": ["180635", "455870", "180961", "456050"]
182+
}
183+
},
173184
"PDOK BAG WFS - GetFeature All": {
174185
"resource": "PDOK BAG WFS",
175186
"probe_class": "GeoHealthCheck.plugins.probe.wfs.WfsGetFeatureBboxAll",
@@ -182,6 +193,17 @@
182193
"bbox": ["180635", "455870", "180961", "456050"]
183194
}
184195
},
196+
"PDOK BAG WFS - GetFeature All - default max_count": {
197+
"resource": "PDOK BAG WFS",
198+
"probe_class": "GeoHealthCheck.plugins.probe.wfs.WfsGetFeatureBboxAll",
199+
"parameters": {
200+
"type_name": "all 5 featuretypes",
201+
"type_ns_prefix": "bag",
202+
"type_ns_uri": "http://bag.geonovum.nl",
203+
"srs": "EPSG:28992",
204+
"bbox": ["180635", "455870", "180961", "456050"]
205+
}
206+
},
185207
"PDOK CSW - GetCaps": {
186208
"resource": "PDOK CSW",
187209
"probe_class": "GeoHealthCheck.plugins.probe.owsgetcaps.CswGetCaps",

0 commit comments

Comments
 (0)