Minor testing changes.
authorGreg Sabino Mullane <[email protected]>
Fri, 24 Apr 2009 23:27:05 +0000 (19:27 -0400)
committerGreg Sabino Mullane <[email protected]>
Fri, 24 Apr 2009 23:27:05 +0000 (19:27 -0400)
t/00_test_tester.t
t/02_database_size.t
t/02_version.t
t/99_spellcheck.t

index 9ae0c5e4fd65824d026ef0ea26f1666c02c98b28..97fdc008f6905ffa400a1169859ecd3a64a92394 100644 (file)
@@ -38,10 +38,10 @@ for my $act (sort keys %action) {
 }
 
 if ($ok) {
-       pass "There is a test for every action\n";
+       pass 'There is a test for every action';
 }
 else {
-       fail "Did not find a test for every action\n";
+       fail 'Did not find a test for every action';
 }
 
 exit;
index ee3584477498dc90f7a13c952c9c3d895c89d6b4..f13b16e36f884edf4af894df3a32e4426ba1026c 100644 (file)
@@ -5,7 +5,7 @@
 use strict;
 use warnings;
 use Data::Dumper;
-use Test::More tests => 50;
+use Test::More tests => 49;
 use lib 't','.';
 use CP_Testing;
 
@@ -55,10 +55,6 @@ $t=qq{$S fails when the warning or critical size is negative};
 like ($cp->run('-w -10'), qr{^ERROR: Invalid size}, $t);
 like ($cp->run('-c -20'), qr{^ERROR: Invalid size}, $t);
 
-## Not sure how to do this check in Windows
-$t=qq{$S with excludeuser option returns the expected result (uses user: $ENV{USER})};
-like ($cp->run("-w 10g --excludeuser $ENV{USER}"), qr{No matching entries found due to user exclusion}, $t);
-
 $t=qq{$S with includeuser option returns the expected result};
 $user = $cp->get_user();
 $dbh->{AutoCommit} = 1;
@@ -77,7 +73,7 @@ like ($cp->run('-w 1 -c 1'), qr{^POSTGRES_DATABASE_SIZE CRITICAL}, $t);
 like ($cp->run('--critical=1 --warning=0'), qr{^POSTGRES_DATABASE_SIZE CRITICAL}, $t);
 
 $t=qq{$S returns correct MRTG output when no rows found};
-like ($cp->run("--output=MRTG -w 10g --excludeuser $ENV{USER}"), qr{^-1}, $t);
+like ($cp->run("--output=MRTG -w 10g --includeuser nosuchuser"), qr{^-1}, $t);
 
 $t=qq{$S returns correct MRTG output when rows found};
 like ($cp->run('--output=MRTG -w 10g'), qr{\d+\n0\n\nDB: postgres\n}s, $t);
index f2d46a7a50252beb349c398ffc7a0db64e7e1c78..143cf9094860b80c0828698331b230bb9ce65999 100644 (file)
@@ -106,6 +106,9 @@ is ($cp->run('--output=MRTG --mrtg=7.8'), qq{1\n0\n\n7.8.12\n}, $t);
 $t=qq{$S gives correct output for MRTG output};
 is ($cp->run('--output=MRTG --mrtg=7.8.12'), qq{1\n0\n\n7.8.12\n}, $t);
 
+local $dbh->{Warn} = 0;
+$dbh->do('DROP SCHEMA cptest CASCADE');
+$dbh->do('DROP FUNCTION public.version()');
 $cp->reset_path();
 
 exit;
index b3fb60b78ad0139209d7568540c7141bfb2bf132..a66a5e0864ee332324357cae970d5472a29bbd7e 100644 (file)
@@ -133,6 +133,7 @@ __DATA__
 ## Common:
 
 arrayref
+autovac
 Backends
 backends
 bucardo