summaryrefslogtreecommitdiffstats
path: root/plugins/t/check_disk.t
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/t/check_disk.t')
-rw-r--r--plugins/t/check_disk.t6
1 files changed, 1 insertions, 5 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;
10use NPTest; 10use NPTest;
11 11
12use vars qw($tests); 12use vars qw($tests);
13BEGIN {$tests = 10; plan tests => $tests} 13BEGIN {$tests = 8; plan tests => $tests}
14 14
15my $successOutput = '/^DISK OK - /'; 15my $successOutput = '/^DISK OK - /';
16my $failureOutput = '/^DISK CRITICAL - /'; 16my $failureOutput = '/^DISK CRITICAL - /';
@@ -18,16 +18,12 @@ my $failureOutput = '/^DISK CRITICAL - /';
18my $mountpoint_valid = getTestParameter( "mountpoint_valid", "NP_MOUNTPOINT_VALID", "/", 18my $mountpoint_valid = getTestParameter( "mountpoint_valid", "NP_MOUNTPOINT_VALID", "/",
19 "The path to a valid mountpoint" ); 19 "The path to a valid mountpoint" );
20 20
21my $mountpoint_invalid = getTestParameter( "mountpoint_invalid", "NP_MOUNTPOINT_INVALID", "/missing",
22 "The path to a invalid (non-existent) mountpoint" );
23
24my $t; 21my $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
32exit(0) if defined($Test::Harness::VERSION); 28exit(0) if defined($Test::Harness::VERSION);
33exit($tests - $t); 29exit($tests - $t);