Skip to content

Commit

Permalink
additional wcs test params
Browse files Browse the repository at this point in the history
  • Loading branch information
blazek committed Sep 26, 2012
1 parent bb0490d commit ee593e8
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
25 changes: 24 additions & 1 deletion tests/src/providers/testqgswcspublicservers.cpp
Expand Up @@ -136,6 +136,14 @@ void TestQgsWcsPublicServers::init()
Server server( serverUrl );
server.description = serverValue.property( "description" ).toString();

QScriptValueIterator paramsIt( serverValue.property( "params" ) );
while ( paramsIt.hasNext() )
{
paramsIt.next();
QgsDebugMsg( QString( "params value: %1" ).arg( paramsIt.value().toString() ) );
server.params.insert( paramsIt.name(), paramsIt.value().toString() );
}

QScriptValue issuesValue = serverValue.property( "issues" );

QScriptValueIterator issuesIt( issuesValue );
Expand Down Expand Up @@ -267,6 +275,7 @@ void TestQgsWcsPublicServers::test( )

foreach ( QString serverUrl, serverUrls )
{
Server myServer = getServer( serverUrl );
QStringList myServerLog;
myServerLog << "server:" + serverUrl;
QString myServerDirName = serverUrl;
Expand Down Expand Up @@ -308,6 +317,11 @@ void TestQgsWcsPublicServers::test( )
myServerUri.setParam( "version", version );
}

foreach ( QString key, myServer.params.keys() )
{
myServerUri.setParam( key, myServer.params.value( key ) );
}

QgsWcsCapabilities myCapabilities;
myCapabilities.setUri( myServerUri );

Expand Down Expand Up @@ -573,7 +587,16 @@ void TestQgsWcsPublicServers::report()
Server myServer = getServer( myServerLog.value( "server" ) );
if ( !myServer.description.isEmpty() )
{
myReport += myServer.description + "<br>";
myReport += myServer.description + "<br>\n";
}
if ( myServer.params.size() > 0 )
{
myReport += "<br>Additional params: ";
foreach ( QString key, myServer.params.keys() )
{
myReport += key + "=" + myServer.params.value( key ) + " ";
}
myReport += "<br>\n";
}

QString myServerReport;
Expand Down
2 changes: 2 additions & 0 deletions tests/src/providers/testqgswcspublicservers.h
Expand Up @@ -48,6 +48,8 @@ class TestQgsWcsPublicServers: public QObject
QString url; // URL
QString description; // notes
QList<TestQgsWcsPublicServers::Issue> issues;
// additional params to be set on URI, e.g. IgnoreGetMapUrl
QMap<QString, QString> params;
};

enum OffenderType
Expand Down
4 changes: 3 additions & 1 deletion tests/src/providers/wcs-servers.json
Expand Up @@ -92,7 +92,9 @@
}, {
url: 'http://motherlode.ucar.edu:8080/thredds/wcs/fmrc/NCEP/DGEX/Alaska_12km/NCEP-DGEX-Alaska_12km_best.ncd'
}, {
url: 'http://navigator.state.or.us/ArcGIS/services/Framework/Imagery_Mosaic2009/ImageServer/WCSServer'
url: 'http://navigator.state.or.us/ArcGIS/services/Framework/Imagery_Mosaic2009/ImageServer/WCSServer',
description: "GetCapabilities gives wrong URL for all requests (server does not exists). Additional parameter IgnoreGetMapUrl must be used",
params: { 'IgnoreGetMapUrl': '1' }
}, {
url: 'http://nsidc.org/cgi-bin/atlas_north'
/*
Expand Down

0 comments on commit ee593e8

Please sign in to comment.