[check_postgres] [commit] Ignore PGUSER env on startup.
check_postgres at bucardo.org
check_postgres at bucardo.org
Mon May 4 16:19:44 UTC 2009
Committed by Greg Sabino Mullane <greg at endpoint.com>
Ignore PGUSER env on startup.
---
t/CP_Testing.pm | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/t/CP_Testing.pm b/t/CP_Testing.pm
index c997c43..99bd472 100644
--- a/t/CP_Testing.pm
+++ b/t/CP_Testing.pm
@@ -252,6 +252,8 @@ sub test_database_handle {
};
if ($@) {
if ($@ =~ /role .+ does not exist/) {
+ ## We want the current user, not whatever this is set to:
+ delete $ENV{PGUSER};
my @tempdsn = ($dsn, '', '', {AutoCommit=>1,RaiseError=>1,PrintError=>0});
my $tempdbh = DBI->connect(@tempdsn);
$tempdbh->do("CREATE USER $dbuser SUPERUSER");
--
1.6.0.5
More information about the Check_postgres
mailing list