diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2006-03-23 17:16:38 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2006-03-23 17:16:38 +0000 |
commit | ada5f2fe02f4171e82ff7adc39d5f46dda40e4b1 (patch) | |
tree | 9fcc284629332af23c36449cd430c16bbacfb260 /plugins/t | |
parent | f82e0dfa81f134c5e064730fac7690a7aa435f59 (diff) | |
download | monitoring-plugins-ada5f2fe02f4171e82ff7adc39d5f46dda40e4b1.tar.gz |
check_disk now errors if a specified directory does not exist (cf df /foo)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1351 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/t')
-rw-r--r-- | plugins/t/check_disk.t | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/t/check_disk.t b/plugins/t/check_disk.t index e742b5bc..14bc8ded 100644 --- a/plugins/t/check_disk.t +++ b/plugins/t/check_disk.t | |||
@@ -22,7 +22,7 @@ my $mountpoint2_valid = getTestParameter( "NP_MOUNTPOINT2_VALID", "Path to anoth | |||
22 | if ($mountpoint_valid eq "" or $mountpoint2_valid eq "") { | 22 | if ($mountpoint_valid eq "" or $mountpoint2_valid eq "") { |
23 | plan skip_all => "Need 2 mountpoints to test"; | 23 | plan skip_all => "Need 2 mountpoints to test"; |
24 | } else { | 24 | } else { |
25 | plan tests => 31; | 25 | plan tests => 32; |
26 | } | 26 | } |
27 | 27 | ||
28 | $result = NPTest->testCmd( | 28 | $result = NPTest->testCmd( |
@@ -157,11 +157,9 @@ TODO: { | |||
157 | $result = NPTest->testCmd( "./check_disk 200 0 $mountpoint_valid" ); | 157 | $result = NPTest->testCmd( "./check_disk 200 0 $mountpoint_valid" ); |
158 | cmp_ok( $result->return_code, '==', 3, "Old syntax: Error with values outside percent range" ); | 158 | cmp_ok( $result->return_code, '==', 3, "Old syntax: Error with values outside percent range" ); |
159 | 159 | ||
160 | TODO: { | 160 | $result = NPTest->testCmd( "./check_disk -w 0% -c 0% -p /bob" ); |
161 | local $TODO = "Check existence of each filesystem as a directory"; | 161 | cmp_ok( $result->return_code, '==', 2, "Checking /bob - return error because /bob does not exist" ); |
162 | $result = NPTest->testCmd( "./check_disk -w 0% -c 0% -p /bob" ); | 162 | cmp_ok( $result->output, 'eq', 'DISK CRITICAL - /bob does not exist', 'Output OK'); |
163 | cmp_ok( $result->return_code, '==', 2, "Checking /bob - return error because /bob does not exist" ); | ||
164 | } | ||
165 | 163 | ||
166 | $result = NPTest->testCmd( "./check_disk -w 0% -c 0% -p /" ); | 164 | $result = NPTest->testCmd( "./check_disk -w 0% -c 0% -p /" ); |
167 | my $root_output = $result->output; | 165 | my $root_output = $result->output; |