summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f278c81)
raw | patch | inline | side by side (parent: f278c81)
author | Ton Voon <tonvoon@users.sourceforge.net> | |
Thu, 3 Nov 2005 15:13:13 +0000 (15:13 +0000) | ||
committer | Ton Voon <tonvoon@users.sourceforge.net> | |
Thu, 3 Nov 2005 15:13:13 +0000 (15:13 +0000) |
would work out the actual mount point. And fixed typo in check_procs.t
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1271 f882894a-f735-0410-b71e-b25c423dba1c
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1271 f882894a-f735-0410-b71e-b25c423dba1c
plugins/t/check_disk.t | patch | blob | history | |
plugins/t/check_procs.t | patch | blob | history |
diff --git a/plugins/t/check_disk.t b/plugins/t/check_disk.t
index f2427fbe6baef16cf555fb54cdc18a67d2a17561..df6e14956c2a718bb232aa10d485adae63759dc4 100644 (file)
--- a/plugins/t/check_disk.t
+++ b/plugins/t/check_disk.t
use NPTest;
use vars qw($tests);
-BEGIN {$tests = 10; plan tests => $tests}
+BEGIN {$tests = 8; plan tests => $tests}
my $successOutput = '/^DISK OK - /';
my $failureOutput = '/^DISK CRITICAL - /';
my $mountpoint_valid = getTestParameter( "mountpoint_valid", "NP_MOUNTPOINT_VALID", "/",
"The path to a valid mountpoint" );
-my $mountpoint_invalid = getTestParameter( "mountpoint_invalid", "NP_MOUNTPOINT_INVALID", "/missing",
- "The path to a invalid (non-existent) mountpoint" );
-
my $t;
$t += checkCmd( "./check_disk 100 100 ${mountpoint_valid}", 0, $successOutput );
$t += checkCmd( "./check_disk -w 0 -c 0 ${mountpoint_valid}", 0, $successOutput );
$t += checkCmd( "./check_disk -w 1\% -c 1\% ${mountpoint_valid}", 0, $successOutput );
$t += checkCmd( "./check_disk 0 0 ${mountpoint_valid}", 2, $failureOutput );
-$t += checkCmd( "./check_disk 100 100 ${mountpoint_invalid}", 2, '/not found/' );
exit(0) if defined($Test::Harness::VERSION);
exit($tests - $t);
index 91f5c44d6d09a57ff4656b5731767bfd76bbfc87..b8c2e8a59fb67cbb9e517982d66bfb0f7eb1d9f8 100644 (file)
--- a/plugins/t/check_procs.t
+++ b/plugins/t/check_procs.t
$t += checkCmd( "./check_procs -w 0 -c 10000000", 1, '/^PROCS WARNING: [0-9]+ process(es)?$/' );
$t += checkCmd( "./check_procs -w 0 -c 0", 2, '/^PROCS CRITICAL: [0-9]+ process(es)?$/' );
$t += checkCmd( "./check_procs -w 0 -c 0 -s S", 2, '/^PROCS CRITICAL: [0-9]+ process(es)? with /' );
-$t += checkCmd( "./check_procs -w 0 -c 10000000 -p 1", 1, "/^PROCS WARNING: [0-9]+ process(es)? with PPID = 1/' );
+$t += checkCmd( "./check_procs -w 0 -c 10000000 -p 1", 1, '/^PROCS WARNING: [0-9]+ process(es)? with PPID = 1/' );
exit(0) if defined($Test::Harness::VERSION);
exit($tests - $t);