Skip to content

Commit

Permalink
Run all GeoNode tests locally, but skip ones which rely on a remote s…
Browse files Browse the repository at this point in the history
…erver on Travis
  • Loading branch information
nyalldawson committed Sep 12, 2017
1 parent e803545 commit e6a8980
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions tests/src/core/testqgsgeonodeconnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ class TestQgsGeoNodeConnection: public QObject

QString mKartozaGeoNodeGeoServerName;
QString mKartozaGeoNodeGeoServerURL;

bool mSkipRemoteTest;
};

// Runs before all unit tests
Expand All @@ -82,9 +80,6 @@ void TestQgsGeoNodeConnection::initTestCase()
mKartozaGeoNodeGeoServerName = QStringLiteral( "Staging Kartoza GeoNode GeoServer" );
mKartozaGeoNodeGeoServerURL = QStringLiteral( "http://staginggs.geonode.kartoza.com" );

// Change it to skip remote testing
mSkipRemoteTest = true;

// Add Demo GeoNode Connection
QgsSettings settings;

Expand All @@ -99,7 +94,7 @@ void TestQgsGeoNodeConnection::initTestCase()
// Test the creation of geonode connection
void TestQgsGeoNodeConnection::testCreation()
{
if ( mSkipRemoteTest )
if ( QgsTest::isTravis() )
{
QSKIP( "Skip remote test for faster testing" );
}
Expand Down Expand Up @@ -128,7 +123,7 @@ void TestQgsGeoNodeConnection::testCreation()
// Test Layer API
void TestQgsGeoNodeConnection::testLayerAPI()
{
if ( mSkipRemoteTest )
if ( QgsTest::isTravis() )
{
QSKIP( "Skip remote test for faster testing" );
}
Expand All @@ -143,7 +138,7 @@ void TestQgsGeoNodeConnection::testLayerAPI()
// Test Style API
void TestQgsGeoNodeConnection::testStyleAPI()
{
if ( mSkipRemoteTest )
if ( QgsTest::isTravis() )
{
QSKIP( "Skip remote test for faster testing" );
}
Expand Down

0 comments on commit e6a8980

Please sign in to comment.