Skip to content

Commit 3c6d8bb

Browse files
committed
GIBS-1868 Added more mod_oems tests for time validation
1 parent 0161a82 commit 3c6d8bb

File tree

2 files changed

+55
-7
lines changed

2 files changed

+55
-7
lines changed

deploy/onearth/onearth.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Name: onearth
22
Version: 1.1.2
3-
Release: 1%{?dist}
3+
Release: 5%{?dist}
44
Summary: Installation packages for OnEarth
55

66
License: ASL 2.0+

src/test/test_mod_oems.py

Lines changed: 54 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@ def test_request_wms_layer_error(self):
235235
"""
236236
11. Request erroneous layer via WMS
237237
"""
238-
ref_hash = '28b9e89643766a3b6cfe80029d349f24'
239-
req_url = 'http://localhost/onearth/test/wms/mapserv?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=&CRS=EPSG%3A4326&STYLES=&WIDTH=1536&HEIGHT=636&BBOX=-111.796875%2C-270%2C111.796875%2C270'
238+
ref_hash = '35a5f708101eb4a452d9cc3da3adb5e4'
239+
req_url = 'http://localhost/onearth/test/wms/mapserv?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=blah&CRS=EPSG%3A4326&STYLES=&WIDTH=1536&HEIGHT=636&BBOX=-111.796875%2C-270%2C111.796875%2C270'
240240
if DEBUG:
241241
print '\nTesting: Request erroneous layer via WMS'
242242
print 'URL: ' + req_url
@@ -283,7 +283,7 @@ def test_request_wms_datesnap_outofrange(self):
283283
"""
284284
15. Request multiple layers with multi-day period and snap to date that is out of range via WMS
285285
"""
286-
ref_hash = 'aec2506519aa41968742ffd1f1c261dd'
286+
ref_hash = 'bb012764b0dd6ce9c1e8e4e21f523147'
287287
req_url = 'http://localhost/onearth/test/wms/mapserv?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=snap_test_3a,snap_test_3b&CRS=EPSG%3A4326&STYLES=&WIDTH=1536&HEIGHT=636&BBOX=-111.796875%2C-270%2C111.796875%2C270&TIME=2016-04-02'
288288
if DEBUG:
289289
print '\nTesting: Request multiple layers with multi-day period and snap to date that is out of range via WMS'
@@ -307,10 +307,10 @@ def test_request_wms_baddateformat(self):
307307
"""
308308
17. Request multiple layers with bad date format via WMS
309309
"""
310-
ref_hash = '0b00480fe40d1af280ef2a5f1cfa058c'
311-
req_url = 'http://localhost/onearth/test/wms/mapserv?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=snap_test_3a,snap_test_3b&CRS=EPSG%3A4326&STYLES=&WIDTH=1536&HEIGHT=636&BBOX=-111.796875%2C-270%2C111.796875%2C270&TIME=2016-03-002'
310+
ref_hash = '15bfb2f8a156a407e746268688a1cf31'
311+
req_url = 'http://localhost/onearth/test/wms/mapserv?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=snap_test_3a,snap_test_3b&CRS=EPSG%3A4326&STYLES=&WIDTH=1536&HEIGHT=636&BBOX=-111.796875%2C-270%2C111.796875%2C270&TIME=2016-03'
312312
if DEBUG:
313-
print '\nTesting: Request multiple layers bad date format via WMS'
313+
print '\nTesting: Request multiple layers bad date format via WMS'
314314
print 'URL: ' + req_url
315315
check_result = check_tile_request(req_url, ref_hash)
316316
self.assertTrue(check_result, 'WMS multiple layers bad date format does not match what\'s expected. URL: ' + req_url)
@@ -424,6 +424,54 @@ def test_request_wfs_csv_with_time(self):
424424
check_result = check_tile_request(req_url, ref_hash)
425425
self.assertTrue(check_result, 'WMS request CSV from vector source file with time via WFS does not match what\'s expected. URL: ' + req_url)
426426

427+
def test_request_wms_baddate(self):
428+
"""
429+
26. Request multiple layers with bad date via WMS
430+
"""
431+
ref_hash = '7a381e294d85fe36d69d61a981da8147'
432+
req_url = 'http://localhost/onearth/test/wms/mapserv?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=snap_test_3a,snap_test_3b&CRS=EPSG%3A4326&STYLES=&WIDTH=1536&HEIGHT=636&BBOX=-111.796875%2C-270%2C111.796875%2C270&TIME=2016-11-31'
433+
if DEBUG:
434+
print '\nTesting: Request multiple layers bad date via WMS'
435+
print 'URL: ' + req_url
436+
check_result = check_tile_request(req_url, ref_hash)
437+
self.assertTrue(check_result, 'WMS multiple layers bad date does not match what\'s expected. URL: ' + req_url)
438+
439+
def test_request_wms_badtime(self):
440+
"""
441+
27. Request multiple layers with bad time via WMS
442+
"""
443+
ref_hash = '59c36f4da5efb41c160e64e342edef58'
444+
req_url = 'http://localhost/onearth/test/wms/mapserv?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=snap_test_3a,snap_test_3b&CRS=EPSG%3A4326&STYLES=&WIDTH=1536&HEIGHT=636&BBOX=-111.796875%2C-270%2C111.796875%2C270&TIME=2016-03-02T23:30:99Z'
445+
if DEBUG:
446+
print '\nTesting: Request multiple layers bad time via WMS'
447+
print 'URL: ' + req_url
448+
check_result = check_tile_request(req_url, ref_hash)
449+
self.assertTrue(check_result, 'WMS multiple layers bad time does not match what\'s expected. URL: ' + req_url)
450+
451+
def test_request_wms_badtimeformat(self):
452+
"""
453+
28. Request multiple layers with bad time format via WMS
454+
"""
455+
ref_hash = '15bfb2f8a156a407e746268688a1cf31'
456+
req_url = 'http://localhost/onearth/test/wms/mapserv?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=snap_test_3a,snap_test_3b&CRS=EPSG%3A4326&STYLES=&WIDTH=1536&HEIGHT=636&BBOX=-111.796875%2C-270%2C111.796875%2C270&TIME=2016-03-02T23:30:59'
457+
if DEBUG:
458+
print '\nTesting: Request multiple layers bad time format via WMS'
459+
print 'URL: ' + req_url
460+
check_result = check_tile_request(req_url, ref_hash)
461+
self.assertTrue(check_result, 'WMS multiple layers bad time format does not match what\'s expected. URL: ' + req_url)
462+
463+
def test_request_wms_no_layer_error(self):
464+
"""
465+
29. Request missing layers via WMS
466+
"""
467+
ref_hash = '28b9e89643766a3b6cfe80029d349f24'
468+
req_url = 'http://localhost/onearth/test/wms/mapserv?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=&CRS=EPSG%3A4326&STYLES=&WIDTH=1536&HEIGHT=636&BBOX=-111.796875%2C-270%2C111.796875%2C270'
469+
if DEBUG:
470+
print '\nTesting: Request missing layers via WMS'
471+
print 'URL: ' + req_url
472+
check_result = check_tile_request(req_url, ref_hash)
473+
self.assertTrue(check_result, 'Request missing layers via WMS does not match what\'s expected. URL: ' + req_url)
474+
427475
# TEARDOWN
428476

429477
@classmethod

0 commit comments

Comments
 (0)