summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Sabino Mullane2011-07-04 21:59:24 +0000
committerGreg Sabino Mullane2011-07-04 21:59:24 +0000
commitd8b32795fc8107c2b880b0a93e6cfce1144d4eaf (patch)
tree554d70828a71493e5fc07c9a82e1ecc4c654994e
parentf64d44f49ac06411a136db1177edbbdd71538495 (diff)
Various testing fixes.
-rwxr-xr-xcheck_postgres.pl2
-rw-r--r--t/02_last_analyze.t2
-rw-r--r--t/02_last_vacuum.t4
-rw-r--r--t/CP_Testing.pm2
4 files changed, 5 insertions, 5 deletions
diff --git a/check_postgres.pl b/check_postgres.pl
index 740f635d9..36f04d1aa 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -2336,7 +2336,7 @@ sub run_command {
$db->{ok} = 1;
## Unfortunately, psql outputs "(No rows)" even with -t and -x
- $db->{slurp} = '' if index($db->{slurp},'(')==0;
+ $db->{slurp} = '' if ! defined $db->{slurp} or index($db->{slurp},'(')==0;
## Allow an empty query (no matching rows) if requested
if ($arg->{emptyok} and $db->{slurp} =~ /^\s*$/o) {
diff --git a/t/02_last_analyze.t b/t/02_last_analyze.t
index 62a3e8e95..a3c06f5ef 100644
--- a/t/02_last_analyze.t
+++ b/t/02_last_analyze.t
@@ -64,7 +64,7 @@ $dbh->commit();
$t = qq{$S correctly finds no matching tables};
like ($cp->run("-w 0 --include=$testtbl"),
- qr{No matching tables found due to exclusion}, $t);
+ qr{ever been analyzed}, $t);
$t = qq{$S sees a recent ANALYZE};
$dbh->do(q{SET default_statistics_target = 1000});
diff --git a/t/02_last_vacuum.t b/t/02_last_vacuum.t
index 9266e35ff..d5d8ab431 100644
--- a/t/02_last_vacuum.t
+++ b/t/02_last_vacuum.t
@@ -77,11 +77,11 @@ like ($cp->run("-w 0 --exclude=~.* --include=$testtbl"),
$t = qq{$S returns correct MRTG information (OK case)};
like ($cp->run("--output=mrtg -w 0 --exclude=~.* --include=$testtbl"),
- qr{\d+\n0\n\n\n}, $t);
+ qr{\d+\n0\n\n}, $t);
$t = qq{$S returns correct MRTG information (fail case)};
like ($cp->run('--output=mrtg -w 0 --exclude=~.* --include=no_such_table'),
- qr{0\n0\n\n\n}, $t);
+ qr{0\n0\n\n}, $t);
}
diff --git a/t/CP_Testing.pm b/t/CP_Testing.pm
index 25a5942fe..7ef1b1152 100644
--- a/t/CP_Testing.pm
+++ b/t/CP_Testing.pm
@@ -444,7 +444,7 @@ sub run {
}
if ($double) {
- $com .= qq{ --dbhost2="$dbhost" --dbname2=ardala --dbuser2=$dbuser};
+ $com .= qq{ --dbhost="$dbhost" --dbname=ardala --dbuser=$dbuser};
}
$extra and $com .= " $extra";