Skip to content
Permalink
Browse files

Do not hard-code database connection parameters

Rely on libpq defaults instead (overridable via environment)

Fixes #14308
  • Loading branch information
Sandro Santilli
Sandro Santilli committed Feb 16, 2016
1 parent 427e5e9 commit 6365eb7ee6edcd66aaee11524aba25ce892f4152
Showing with 1 addition and 1 deletion.
  1. +1 −1 tests/src/core/testqgsvectorlayerjoinbuffer.cpp
@@ -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" );

0 comments on commit 6365eb7

Please sign in to comment.
You can’t perform that action at this time.