Skip to content

Commit ee593e8

Browse files
committedSep 26, 2012
additional wcs test params
1 parent bb0490d commit ee593e8

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed
 

‎tests/src/providers/testqgswcspublicservers.cpp

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,14 @@ void TestQgsWcsPublicServers::init()
136136
Server server( serverUrl );
137137
server.description = serverValue.property( "description" ).toString();
138138

139+
QScriptValueIterator paramsIt( serverValue.property( "params" ) );
140+
while ( paramsIt.hasNext() )
141+
{
142+
paramsIt.next();
143+
QgsDebugMsg( QString( "params value: %1" ).arg( paramsIt.value().toString() ) );
144+
server.params.insert( paramsIt.name(), paramsIt.value().toString() );
145+
}
146+
139147
QScriptValue issuesValue = serverValue.property( "issues" );
140148

141149
QScriptValueIterator issuesIt( issuesValue );
@@ -267,6 +275,7 @@ void TestQgsWcsPublicServers::test( )
267275

268276
foreach ( QString serverUrl, serverUrls )
269277
{
278+
Server myServer = getServer( serverUrl );
270279
QStringList myServerLog;
271280
myServerLog << "server:" + serverUrl;
272281
QString myServerDirName = serverUrl;
@@ -308,6 +317,11 @@ void TestQgsWcsPublicServers::test( )
308317
myServerUri.setParam( "version", version );
309318
}
310319

320+
foreach ( QString key, myServer.params.keys() )
321+
{
322+
myServerUri.setParam( key, myServer.params.value( key ) );
323+
}
324+
311325
QgsWcsCapabilities myCapabilities;
312326
myCapabilities.setUri( myServerUri );
313327

@@ -573,7 +587,16 @@ void TestQgsWcsPublicServers::report()
573587
Server myServer = getServer( myServerLog.value( "server" ) );
574588
if ( !myServer.description.isEmpty() )
575589
{
576-
myReport += myServer.description + "<br>";
590+
myReport += myServer.description + "<br>\n";
591+
}
592+
if ( myServer.params.size() > 0 )
593+
{
594+
myReport += "<br>Additional params: ";
595+
foreach ( QString key, myServer.params.keys() )
596+
{
597+
myReport += key + "=" + myServer.params.value( key ) + " ";
598+
}
599+
myReport += "<br>\n";
577600
}
578601

579602
QString myServerReport;

‎tests/src/providers/testqgswcspublicservers.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ class TestQgsWcsPublicServers: public QObject
4848
QString url; // URL
4949
QString description; // notes
5050
QList<TestQgsWcsPublicServers::Issue> issues;
51+
// additional params to be set on URI, e.g. IgnoreGetMapUrl
52+
QMap<QString, QString> params;
5153
};
5254

5355
enum OffenderType

‎tests/src/providers/wcs-servers.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@
9292
}, {
9393
url: 'http://motherlode.ucar.edu:8080/thredds/wcs/fmrc/NCEP/DGEX/Alaska_12km/NCEP-DGEX-Alaska_12km_best.ncd'
9494
}, {
95-
url: 'http://navigator.state.or.us/ArcGIS/services/Framework/Imagery_Mosaic2009/ImageServer/WCSServer'
95+
url: 'http://navigator.state.or.us/ArcGIS/services/Framework/Imagery_Mosaic2009/ImageServer/WCSServer',
96+
description: "GetCapabilities gives wrong URL for all requests (server does not exists). Additional parameter IgnoreGetMapUrl must be used",
97+
params: { 'IgnoreGetMapUrl': '1' }
9698
}, {
9799
url: 'http://nsidc.org/cgi-bin/atlas_north'
98100
/*

0 commit comments

Comments
 (0)
Please sign in to comment.