Committed by Greg Sabino Mullane <[email protected]>

Subject: [DBD::Pg 2/3] Add support for new ENV var DBDPG_TEST_ALWAYS_ENV for
better testing.

---
 t/dbdpg_test_setup.pl | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/t/dbdpg_test_setup.pl b/t/dbdpg_test_setup.pl
index 2218cdc..763a4cd 100644
--- a/t/dbdpg_test_setup.pl
+++ b/t/dbdpg_test_setup.pl
@@ -787,6 +787,12 @@ sub get_test_settings {
                $testdir = "$dir/dbdpg_test_database";
        }
 
+       ## Allow forcing of ENV variables
+       if ($ENV{DBDPG_TEST_ALWAYS_ENV}) {
+               $testdsn = $ENV{DBI_DSN} || '';
+               $testuser = $ENV{DBI_USER} || '';
+       }
+
        return $testdsn, $testuser, $helpconnect, $su, $uid, $testdir, $pg_ctl, 
$initdb, $error, $version;
 
 } ## end of get_test_settings
-- 
1.8.4

Reply via email to