Skip to content
Permalink
Browse files

rename method names to be Travis agnostic

  • Loading branch information
3nids authored and nyalldawson committed Feb 8, 2021
1 parent cc99f0b commit 58621484db8490b924d4600ffda08aee7be233ee
@@ -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()
@@ -436,7 +436,7 @@ void TestQgsProcessingAlgs::packageAlg()

void TestQgsProcessingAlgs::exportToSpreadsheetXlsx()
{
if ( QgsTest::isTravis() )
if ( QgsTest::isCIRun() )
{
QSKIP( "XLSX driver not working on Travis" );
}
@@ -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" );
}
@@ -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" );
}
@@ -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" );
}
@@ -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;
@@ -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;
@@ -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 >() );
@@ -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
@@ -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 );

0 comments on commit 5862148

Please sign in to comment.