}
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;
use strict;
use warnings;
use Data::Dumper;
-use Test::More tests => 50;
+use Test::More tests => 49;
use lib 't','.';
use CP_Testing;
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;
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);
$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;