Skip to content

Commit e6a8980

Browse files
committedSep 12, 2017
Run all GeoNode tests locally, but skip ones which rely on a remote server on Travis
1 parent e803545 commit e6a8980

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed
 

‎tests/src/core/testqgsgeonodeconnection.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ class TestQgsGeoNodeConnection: public QObject
6565

6666
QString mKartozaGeoNodeGeoServerName;
6767
QString mKartozaGeoNodeGeoServerURL;
68-
69-
bool mSkipRemoteTest;
7068
};
7169

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

85-
// Change it to skip remote testing
86-
mSkipRemoteTest = true;
87-
8883
// Add Demo GeoNode Connection
8984
QgsSettings settings;
9085

@@ -99,7 +94,7 @@ void TestQgsGeoNodeConnection::initTestCase()
9994
// Test the creation of geonode connection
10095
void TestQgsGeoNodeConnection::testCreation()
10196
{
102-
if ( mSkipRemoteTest )
97+
if ( QgsTest::isTravis() )
10398
{
10499
QSKIP( "Skip remote test for faster testing" );
105100
}
@@ -128,7 +123,7 @@ void TestQgsGeoNodeConnection::testCreation()
128123
// Test Layer API
129124
void TestQgsGeoNodeConnection::testLayerAPI()
130125
{
131-
if ( mSkipRemoteTest )
126+
if ( QgsTest::isTravis() )
132127
{
133128
QSKIP( "Skip remote test for faster testing" );
134129
}
@@ -143,7 +138,7 @@ void TestQgsGeoNodeConnection::testLayerAPI()
143138
// Test Style API
144139
void TestQgsGeoNodeConnection::testStyleAPI()
145140
{
146-
if ( mSkipRemoteTest )
141+
if ( QgsTest::isTravis() )
147142
{
148143
QSKIP( "Skip remote test for faster testing" );
149144
}

0 commit comments

Comments
 (0)
Please sign in to comment.