diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2005-11-03 15:13:13 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2005-11-03 15:13:13 +0000 |
commit | 595b2571a417fd2216071e80979fbe20e5cf1d4f (patch) | |
tree | 3202cbfb46415984abfa3b701fc495e6bd96b0cf /plugins | |
parent | f278c817e584ac7ccd3bdfee3daefdbc483398b7 (diff) | |
download | monitoring-plugins-595b2571a417fd2216071e80979fbe20e5cf1d4f.tar.gz |
Invalid mount point doesn't make sense because most df implementations
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
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/t/check_disk.t | 6 | ||||
-rw-r--r-- | plugins/t/check_procs.t | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/plugins/t/check_disk.t b/plugins/t/check_disk.t index f2427fbe..df6e1495 100644 --- a/plugins/t/check_disk.t +++ b/plugins/t/check_disk.t | |||
@@ -10,7 +10,7 @@ use Test; | |||
10 | use NPTest; | 10 | use NPTest; |
11 | 11 | ||
12 | use vars qw($tests); | 12 | use vars qw($tests); |
13 | BEGIN {$tests = 10; plan tests => $tests} | 13 | BEGIN {$tests = 8; plan tests => $tests} |
14 | 14 | ||
15 | my $successOutput = '/^DISK OK - /'; | 15 | my $successOutput = '/^DISK OK - /'; |
16 | my $failureOutput = '/^DISK CRITICAL - /'; | 16 | my $failureOutput = '/^DISK CRITICAL - /'; |
@@ -18,16 +18,12 @@ my $failureOutput = '/^DISK CRITICAL - /'; | |||
18 | my $mountpoint_valid = getTestParameter( "mountpoint_valid", "NP_MOUNTPOINT_VALID", "/", | 18 | my $mountpoint_valid = getTestParameter( "mountpoint_valid", "NP_MOUNTPOINT_VALID", "/", |
19 | "The path to a valid mountpoint" ); | 19 | "The path to a valid mountpoint" ); |
20 | 20 | ||
21 | my $mountpoint_invalid = getTestParameter( "mountpoint_invalid", "NP_MOUNTPOINT_INVALID", "/missing", | ||
22 | "The path to a invalid (non-existent) mountpoint" ); | ||
23 | |||
24 | my $t; | 21 | my $t; |
25 | 22 | ||
26 | $t += checkCmd( "./check_disk 100 100 ${mountpoint_valid}", 0, $successOutput ); | 23 | $t += checkCmd( "./check_disk 100 100 ${mountpoint_valid}", 0, $successOutput ); |
27 | $t += checkCmd( "./check_disk -w 0 -c 0 ${mountpoint_valid}", 0, $successOutput ); | 24 | $t += checkCmd( "./check_disk -w 0 -c 0 ${mountpoint_valid}", 0, $successOutput ); |
28 | $t += checkCmd( "./check_disk -w 1\% -c 1\% ${mountpoint_valid}", 0, $successOutput ); | 25 | $t += checkCmd( "./check_disk -w 1\% -c 1\% ${mountpoint_valid}", 0, $successOutput ); |
29 | $t += checkCmd( "./check_disk 0 0 ${mountpoint_valid}", 2, $failureOutput ); | 26 | $t += checkCmd( "./check_disk 0 0 ${mountpoint_valid}", 2, $failureOutput ); |
30 | $t += checkCmd( "./check_disk 100 100 ${mountpoint_invalid}", 2, '/not found/' ); | ||
31 | 27 | ||
32 | exit(0) if defined($Test::Harness::VERSION); | 28 | exit(0) if defined($Test::Harness::VERSION); |
33 | exit($tests - $t); | 29 | exit($tests - $t); |
diff --git a/plugins/t/check_procs.t b/plugins/t/check_procs.t index 91f5c44d..b8c2e8a5 100644 --- a/plugins/t/check_procs.t +++ b/plugins/t/check_procs.t | |||
@@ -19,7 +19,7 @@ $t += checkCmd( "./check_procs -w 100000 -c 100000 -s Z", 0, '/^PROCS OK: [0-9 | |||
19 | $t += checkCmd( "./check_procs -w 0 -c 10000000", 1, '/^PROCS WARNING: [0-9]+ process(es)?$/' ); | 19 | $t += checkCmd( "./check_procs -w 0 -c 10000000", 1, '/^PROCS WARNING: [0-9]+ process(es)?$/' ); |
20 | $t += checkCmd( "./check_procs -w 0 -c 0", 2, '/^PROCS CRITICAL: [0-9]+ process(es)?$/' ); | 20 | $t += checkCmd( "./check_procs -w 0 -c 0", 2, '/^PROCS CRITICAL: [0-9]+ process(es)?$/' ); |
21 | $t += checkCmd( "./check_procs -w 0 -c 0 -s S", 2, '/^PROCS CRITICAL: [0-9]+ process(es)? with /' ); | 21 | $t += checkCmd( "./check_procs -w 0 -c 0 -s S", 2, '/^PROCS CRITICAL: [0-9]+ process(es)? with /' ); |
22 | $t += checkCmd( "./check_procs -w 0 -c 10000000 -p 1", 1, "/^PROCS WARNING: [0-9]+ process(es)? with PPID = 1/' ); | 22 | $t += checkCmd( "./check_procs -w 0 -c 10000000 -p 1", 1, '/^PROCS WARNING: [0-9]+ process(es)? with PPID = 1/' ); |
23 | 23 | ||
24 | exit(0) if defined($Test::Harness::VERSION); | 24 | exit(0) if defined($Test::Harness::VERSION); |
25 | exit($tests - $t); | 25 | exit($tests - $t); |