[check_postgres] [commit] Add bad_fake_version() func back in.
check_postgres at bucardo.org
check_postgres at bucardo.org
Wed Apr 22 20:33:16 UTC 2009
Committed by Greg Sabino Mullane <greg at endpoint.com>
Add bad_fake_version() func back in.
---
t/CP_Testing.pm | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/t/CP_Testing.pm b/t/CP_Testing.pm
index 6ff3028..0499340 100644
--- a/t/CP_Testing.pm
+++ b/t/CP_Testing.pm
@@ -387,6 +387,28 @@ SELECT 'PostgreSQL $version on fakefunction for check_postgres.pl testing'::text
} ## end of fake version
+
+sub bad_fake_version {
+
+ my $self = shift;
+ my $version = shift || '9.9';
+ my $dbh = $self->{dbh} || die;
+ my $dbuser = $self->{testuser} || die;
+
+ $dbh->do(qq{
+CREATE OR REPLACE FUNCTION public.version()
+RETURNS TEXT
+LANGUAGE SQL
+AS \$\$
+SELECT 'Postgres $version on fakefunction for check_postgres.pl testing'::text;
+\$\$
+});
+ $dbh->do("ALTER USER $dbuser SET search_path = public, pg_catalog");
+ $dbh->commit();
+
+} ## end of bad fake version
+
+
sub reset_path {
my $self = shift;
--
1.6.0.5
More information about the Check_postgres
mailing list