[Nagiosplug-checkins] CVS: nagiosplug/plugins/t check_load.t,1.1.1.1,1.1.1.1.2.1

Ton Voon tonvoon at users.sourceforge.net
Sat May 17 10:59:04 CEST 2003


Update of /cvsroot/nagiosplug/nagiosplug/plugins/t
In directory sc8-pr-cvs1:/tmp/cvs-serv21145/t

Modified Files:
      Tag: r1_3_0
	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.1.1.1.2.1
diff -C2 -r1.1.1.1 -r1.1.1.1.2.1
*** check_load.t	28 Feb 2002 06:43:00 -0000	1.1.1.1
--- check_load.t	17 May 2003 17:58:24 -0000	1.1.1.1.2.1
***************
*** 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