From: Greg Sabino Mullane Date: Thu, 23 Apr 2009 17:52:37 +0000 (-0400) Subject: Remove all tables, so other test tables don't interfere. X-Git-Tag: 2.9.0~92 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=2726603903fcde5a7f07f6a4604a26732e0a1e66;p=check_postgres.git Remove all tables, so other test tables don't interfere. --- diff --git a/t/02_relation_size.t b/t/02_relation_size.t index f1e28ce80..acc3c101e 100644 --- a/t/02_relation_size.t +++ b/t/02_relation_size.t @@ -52,9 +52,14 @@ like ($cp->run(q{-w 1 --perflimit 2}), $t = qq{$S detects no matching tables due to unknown user}; like ($cp->run(q{-w 1 --includeuser foo}), qr{$label OK:.*No matching entries found due to user exclusion/inclusion options}, $t); +## We need to remove all tables to make this work correctly local $dbh->{Warn} = 0; -$dbh->do("DROP TABLE IF EXISTS $testtbl"); +my @info = $dbh->tables('','public','','TABLE'); +for my $tab (@info) { + $dbh->do("DROP TABLE $tab CASCADE"); +} $dbh->do(qq{CREATE TABLE $testtbl (a integer)}); + $dbh->commit; $t = qq{$S detects matching tables using 'testuser'};