Skip to content

Commit

Permalink
rename method names to be Travis agnostic
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids authored and nyalldawson committed Feb 8, 2021
1 parent cc99f0b commit 5862148
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/test/qgstest.h
Expand Up @@ -79,10 +79,10 @@
namespace QgsTest
{

//! Returns TRUE if test is running on Travis infrastructure
bool isTravis()
//! Returns TRUE if test is running on a CI infrastructure
bool isCIRun()
{
return qgetenv( "TRAVIS" ) == QStringLiteral( "true" );
return qgetenv( "QGIS_CONTINUOUS_INTEGRATION_RUN" ) == QStringLiteral( "true" );
}

bool runFlakyTests()
Expand Down
2 changes: 1 addition & 1 deletion tests/src/analysis/testqgsprocessingalgs.cpp
Expand Up @@ -436,7 +436,7 @@ void TestQgsProcessingAlgs::packageAlg()

void TestQgsProcessingAlgs::exportToSpreadsheetXlsx()
{
if ( QgsTest::isTravis() )
if ( QgsTest::isCIRun() )
{
QSKIP( "XLSX driver not working on Travis" );
}
Expand Down
6 changes: 3 additions & 3 deletions tests/src/core/testqgsgeonodeconnection.cpp
Expand Up @@ -95,7 +95,7 @@ void TestQgsGeoNodeConnection::initTestCase()
// Test the creation of geonode connection
void TestQgsGeoNodeConnection::testCreation()
{
if ( QgsTest::isTravis() )
if ( QgsTest::isCIRun() )
{
QSKIP( "Skip remote test for faster testing" );
}
Expand Down Expand Up @@ -124,7 +124,7 @@ void TestQgsGeoNodeConnection::testCreation()
// Test Layer API
void TestQgsGeoNodeConnection::testLayerAPI()
{
if ( QgsTest::isTravis() )
if ( QgsTest::isCIRun() )
{
QSKIP( "Skip remote test for faster testing" );
}
Expand All @@ -139,7 +139,7 @@ void TestQgsGeoNodeConnection::testLayerAPI()
// Test Style API
void TestQgsGeoNodeConnection::testStyleAPI()
{
if ( QgsTest::isTravis() )
if ( QgsTest::isCIRun() )
{
QSKIP( "Skip remote test for faster testing" );
}
Expand Down
10 changes: 5 additions & 5 deletions tests/src/core/testqgsnetworkaccessmanager.cpp
Expand Up @@ -461,7 +461,7 @@ void TestQgsNetworkAccessManager::fetchEncodedContent()

void TestQgsNetworkAccessManager::fetchPost()
{
if ( QgsTest::isTravis() )
if ( QgsTest::isCIRun() )
QSKIP( "This test is disabled on Travis CI environment" );

QObject context;
Expand Down Expand Up @@ -554,7 +554,7 @@ void TestQgsNetworkAccessManager::fetchPost()

void TestQgsNetworkAccessManager::fetchBadSsl()
{
if ( QgsTest::isTravis() )
if ( QgsTest::isCIRun() )
QSKIP( "This test is disabled on Travis CI environment" );

QObject context;
Expand Down Expand Up @@ -653,7 +653,7 @@ void TestQgsNetworkAccessManager::fetchBadSsl()

void TestQgsNetworkAccessManager::testSslErrorHandler()
{
if ( QgsTest::isTravis() )
if ( QgsTest::isCIRun() )
QSKIP( "This test is disabled on Travis CI environment" );

QgsNetworkAccessManager::instance()->setSslErrorHandler( qgis::make_unique< TestSslErrorHandler >() );
Expand Down Expand Up @@ -756,7 +756,7 @@ void TestQgsNetworkAccessManager::testSslErrorHandler()

void TestQgsNetworkAccessManager::testAuthRequestHandler()
{
if ( QgsTest::isTravis() )
if ( QgsTest::isCIRun() )
QSKIP( "This test is disabled on Travis CI environment" );

// initially this request should fail -- we aren't providing the username and password required
Expand Down Expand Up @@ -963,7 +963,7 @@ void TestQgsNetworkAccessManager::testAuthRequestHandler()

void TestQgsNetworkAccessManager::fetchTimeout()
{
if ( QgsTest::isTravis() )
if ( QgsTest::isCIRun() )
QSKIP( "This test is disabled on Travis CI environment" );

QgsNetworkAccessManager::setTimeout( 2000 );
Expand Down

0 comments on commit 5862148

Please sign in to comment.