Skip to content
Permalink
Browse files

Run all GeoNode tests locally, but skip ones which rely on a remote s…

…erver on Travis
  • Loading branch information
nyalldawson committed Sep 8, 2017
1 parent e803545 commit e6a8980b976ba69f644621b9795c71237196aadc
Showing with 3 additions and 8 deletions.
  1. +3 −8 tests/src/core/testqgsgeonodeconnection.cpp
@@ -65,8 +65,6 @@ class TestQgsGeoNodeConnection: public QObject

QString mKartozaGeoNodeGeoServerName;
QString mKartozaGeoNodeGeoServerURL;

bool mSkipRemoteTest;
};

// Runs before all unit tests
@@ -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;

@@ -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" );
}
@@ -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" );
}
@@ -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" );
}

0 comments on commit e6a8980

Please sign in to comment.
You can’t perform that action at this time.