Skip to content

Commit

Permalink
Allow runtime-skip of backend-requiring tests in testqgspostgresconn.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
strk authored and nyalldawson committed Mar 6, 2023
1 parent cfee2c3 commit e4b2167
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/src/providers/testqgspostgresconn.cpp
Expand Up @@ -69,7 +69,6 @@ class TestQgsPostgresConn: public QObject
const char *connstring = getenv( "QGIS_PGTEST_DB" );
if ( !connstring ) connstring = "service=qgis_test";
_connection = QgsPostgresConn::connectDb( connstring, true );
assert( _connection );
}
return _connection;
}
Expand Down Expand Up @@ -162,6 +161,8 @@ class TestQgsPostgresConn: public QObject
#ifdef ENABLE_PGTEST
void supportedLayers()
{
QGSTEST_NEED_PGTEST_DB();

QgsPostgresConn *conn = getConnection();
QVERIFY( conn != 0 );
QVector<QgsPostgresLayerProperty> layers;
Expand Down Expand Up @@ -207,6 +208,8 @@ class TestQgsPostgresConn: public QObject

void connectDb()
{
QGSTEST_NEED_PGTEST_DB();

QgsPostgresConn *conn = getConnection();
QVERIFY( conn != 0 );

Expand Down

0 comments on commit e4b2167

Please sign in to comment.