[Nagiosplug-checkins] CVS: nagiosplug/plugins/t check_load.t,1.1.1.1,1.2
Ton Voon
tonvoon at users.sourceforge.net
Sat May 17 11:00:05 CEST 2003
Update of /cvsroot/nagiosplug/nagiosplug/plugins/t
In directory sc8-pr-cvs1:/tmp/cvs-serv21569/t
Modified Files:
check_load.t
Log Message:
Fixed tests (Mathew Ericson - 738607)
Index: check_load.t
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/t/check_load.t,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** check_load.t 28 Feb 2002 06:43:00 -0000 1.1.1.1
--- check_load.t 17 May 2003 17:59:13 -0000 1.2
***************
*** 12,26 ****
my $t;
! $cmd = "./check_load 100 100 100 100 100 100";
$str = `$cmd`;
$t += ok $?>>8,0;
print "Test was: $cmd\n" if ($?);
! $t += ok $str, '/^load average: +[\.0-9]+, +[\.0-9]+, +[\.0-9]+$/';
! $cmd = "./check_load 0 0 0 0 0 0";
$str = `$cmd`;
$t += ok $?>>8,2;
print "Test was: $cmd\n" unless ($?);
! $t += ok $str, '/^load average: +[\.0-9]+, +[\.0-9]+, +[\.0-9]+ CRITICAL$/';
exit(0) if defined($Test::Harness::VERSION);
--- 12,26 ----
my $t;
! $cmd = "./check_load -w 100,100,100 -c 100,100,100";
$str = `$cmd`;
$t += ok $?>>8,0;
print "Test was: $cmd\n" if ($?);
! $t += ok $str, '/^OK - load average: [0-9]\.?[0-9]+, [0-9]\.?[0-9]+, [0-9]\.?[0-9]+$/';
! $cmd = "./check_load -w 0,0,0 -c 0,0,0";
$str = `$cmd`;
$t += ok $?>>8,2;
print "Test was: $cmd\n" unless ($?);
! $t += ok $str, '/^CRITICAL - load average: [0-9]\.?[0-9]+, [0-9]\.?[0-9]+, [0-9]\.?[0-9]+$/';
exit(0) if defined($Test::Harness::VERSION);
More information about the Commits
mailing list