[Nagiosplug-checkins] nagiosplug/plugins/t check_disk.t,1.5,1.6

Ton Voon tonvoon at users.sourceforge.net
Thu Dec 15 07:21:02 CET 2005


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

Modified Files:
	check_disk.t 
Log Message:
New 3 parameter version of getTestParameters. Updated check_disk.t to reflect.
Added notes re: testing in developer guidelines.


Index: check_disk.t
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/t/check_disk.t,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- check_disk.t	15 Nov 2005 16:26:42 -0000	1.5
+++ check_disk.t	15 Dec 2005 15:19:55 -0000	1.6
@@ -6,7 +6,7 @@
 #
 
 use strict;
-use Test::More tests => 26;
+use Test::More;
 use NPTest;
 use POSIX qw(ceil floor);
 
@@ -16,12 +16,14 @@
 
 my $result;
 
-my $mountpoint_valid   = getTestParameter( "mountpoint_valid",   "NP_MOUNTPOINT_VALID",   "/",
-					   "The path to a valid mountpoint" );
-
-my $mountpoint2_valid   = getTestParameter( "mountpoint2_valid",   "NP_MOUNTPOINT2_VALID",   "/var",
-					   "The path to another valid mountpoint. Must be different from 1st one." );
+my $mountpoint_valid  = getTestParameter( "NP_MOUNTPOINT_VALID", "Path to valid mountpoint",  "/");
+my $mountpoint2_valid = getTestParameter( "NP_MOUNTPOINT2_VALID", "Path to another valid mountpoint. Must be different from 1st one", "/var");
 
+if ($mountpoint_valid eq "" or $mountpoint2_valid eq "") {
+	plan skip_all => "Need 2 mountpoints to test";
+} else {
+	plan tests => 26;
+}
 
 $result = NPTest->testCmd( 
 	"./check_disk -w 1% -c 1% -p $mountpoint_valid -w 1% -c 1% -p $mountpoint2_valid" 





More information about the Commits mailing list