Skip to content

Commit

Permalink
Do not hard-code database connection parameters
Browse files Browse the repository at this point in the history
Rely on libpq defaults instead (overridable via environment)

Fixes #14308
  • Loading branch information
Sandro Santilli committed Feb 16, 2016
1 parent 427e5e9 commit 6365eb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/src/core/testqgsvectorlayerjoinbuffer.cpp
Expand Up @@ -106,7 +106,7 @@ void TestVectorLayerJoinBuffer::initTestCase()
QString dbConn = getenv( "QGIS_PGTEST_DB" );
if ( dbConn.isEmpty() )
{
dbConn = "dbname='qgis_test' host=localhost port=5432 user='postgres' password='postgres'";
dbConn = "dbname='qgis_test'";
}
QgsVectorLayer* vlA_PG = new QgsVectorLayer( QString( "%1 sslmode=disable key='id_a' table=\"qgis_test\".\"table_a\" sql=" ).arg( dbConn ), "A_PG", "postgres" );
QgsVectorLayer* vlB_PG = new QgsVectorLayer( QString( "%1 sslmode=disable key='id_b' table=\"qgis_test\".\"table_b\" sql=" ).arg( dbConn ), "B_PG", "postgres" );
Expand Down

0 comments on commit 6365eb7

Please sign in to comment.