From: Greg Sabino Mullane Date: Thu, 23 Apr 2009 17:44:45 +0000 (-0400) Subject: Re-apply Jeff's patch, got removed somehow. X-Git-Tag: 2.9.0~93 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=d92a81646e1c3ef6e74bb51175024e9bfeaad2e9;p=check_postgres.git Re-apply Jeff's patch, got removed somehow. --- diff --git a/t/CP_Testing.pm b/t/CP_Testing.pm index 11f1e4dd6..e3918a91c 100644 --- a/t/CP_Testing.pm +++ b/t/CP_Testing.pm @@ -152,13 +152,13 @@ sub test_database_handle { $dbhost =~ s/([^\\]) /$1\\ /g; $self->{dbname} ||= 'postgres'; my $dsn = qq{dbi:Pg:host=$dbhost;dbname=$self->{dbname}}; - my @superdsn = ($dsn, '', '', {AutoCommit=>0,RaiseError=>1,PrintError=>0}); + my $dbuser = $self->{testuser}; + my @superdsn = ($dsn, $dbuser, '', {AutoCommit=>0,RaiseError=>1,PrintError=>0}); my $dbh = DBI->connect(@superdsn); $dbh->ping() or die qq{Failed to ping!\n}; $dbh->{AutoCommit} = 1; $dbh->{RaiseError} = 0; - my $dbuser = $self->{testuser}; $dbh->do("CREATE USER $dbuser SUPERUSER"); $dbh->do("CREATE USER sixpack NOSUPERUSER CREATEDB"); $dbh->do("CREATE USER readonly NOSUPERUSER NOCREATEDB");