[Nagiosplug-checkins] nagiosplug/plugins/t check_disk.t,1.8,1.9

Ton Voon tonvoon at users.sourceforge.net
Thu Mar 23 09:17:08 CET 2006


Update of /cvsroot/nagiosplug/nagiosplug/plugins/t
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18117/plugins/t

Modified Files:
	check_disk.t 
Log Message:
check_disk now errors if a specified directory does not exist (cf df /foo)


Index: check_disk.t
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/t/check_disk.t,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- check_disk.t	23 Mar 2006 16:06:00 -0000	1.8
+++ check_disk.t	23 Mar 2006 17:16:38 -0000	1.9
@@ -22,7 +22,7 @@
 if ($mountpoint_valid eq "" or $mountpoint2_valid eq "") {
 	plan skip_all => "Need 2 mountpoints to test";
 } else {
-	plan tests => 31;
+	plan tests => 32;
 }
 
 $result = NPTest->testCmd( 
@@ -157,11 +157,9 @@
 $result = NPTest->testCmd( "./check_disk 200 0 $mountpoint_valid" );
 cmp_ok( $result->return_code, '==', 3, "Old syntax: Error with values outside percent range" );
 
-TODO: {
-	local $TODO = "Check existence of each filesystem as a directory";
-	$result = NPTest->testCmd( "./check_disk -w 0% -c 0% -p /bob" );
-	cmp_ok( $result->return_code, '==', 2, "Checking /bob - return error because /bob does not exist" );
-}
+$result = NPTest->testCmd( "./check_disk -w 0% -c 0% -p /bob" );
+cmp_ok( $result->return_code, '==', 2, "Checking /bob - return error because /bob does not exist" );
+cmp_ok( $result->output, 'eq', 'DISK CRITICAL - /bob does not exist', 'Output OK');
 
 $result = NPTest->testCmd( "./check_disk -w 0% -c 0% -p /" );
 my $root_output = $result->output;





More information about the Commits mailing list