Ignore PGUSER env on startup.
authorGreg Sabino Mullane <greg@endpoint.com>
Mon, 4 May 2009 16:19:19 +0000 (12:19 -0400)
committerGreg Sabino Mullane <greg@endpoint.com>
Mon, 4 May 2009 16:19:19 +0000 (12:19 -0400)
t/CP_Testing.pm

index c997c43c7815b0ef86776faad3ae966905a016c1..99bd47267cc5e628b4de2882bb14ded86c4ab7f3 100644 (file)
@@ -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");