[Nagiosplug-checkins] nagiosplug/plugins/t check_load.t,1.6,1.7
Ton Voon
tonvoon at users.sourceforge.net
Thu Apr 26 00:10:16 CEST 2007
Update of /cvsroot/nagiosplug/nagiosplug/plugins/t
In directory sc8-pr-cvs16:/tmp/cvs-serv31443/plugins/t
Modified Files:
check_load.t
Log Message:
check_load can optionally divide by number of cpus
Index: check_load.t
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/t/check_load.t,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- check_load.t 2 Oct 2006 12:09:18 -0000 1.6
+++ check_load.t 25 Apr 2007 22:10:13 -0000 1.7
@@ -14,7 +14,7 @@
my $successOutput = '/^OK - load average: [0-9]+\.?[0-9]+, [0-9]+\.?[0-9]+, [0-9]+\.?[0-9]+/';
my $failureOutput = '/^CRITICAL - load average: [0-9]+\.?[0-9]+, [0-9]+\.?[0-9]+, [0-9]+\.?[0-9]+/';
-plan tests => 4;
+plan tests => 6;
$res = NPTest->testCmd( "./check_load -w 100,100,100 -c 100,100,100" );
cmp_ok( $res->return_code, 'eq', 0, "load not over 100");
@@ -24,3 +24,7 @@
cmp_ok( $res->return_code, 'eq', 2, "Load over 0");
like( $res->output, $failureOutput, "Output OK");
+$res = NPTest->testCmd( "./check_load -r -w 0,0,0 -c 0,0,0" );
+cmp_ok( $res->return_code, 'eq', 2, "Load over 0 with per cpu division");
+like( $res->output, $failureOutput, "Output OK");
+
More information about the Commits
mailing list