[Nagiosplug-checkins] CVS: nagiosplug/plugins/t check_procs.t,1.1.1.1,1.2
Ton Voon
tonvoon at users.sourceforge.net
Sat May 17 10:51:05 CEST 2003
Update of /cvsroot/nagiosplug/nagiosplug/plugins/t
In directory sc8-pr-cvs1:/tmp/cvs-serv17999/t
Modified Files:
check_procs.t
Log Message:
Fixed test commands (Mathew Ericson - 738605)
Index: check_procs.t
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/t/check_procs.t,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** check_procs.t 28 Feb 2002 06:43:00 -0000 1.1.1.1
--- check_procs.t 17 May 2003 17:50:40 -0000 1.2
***************
*** 14,50 ****
# Reverse Compatibility
! $cmd = "./check_procs 100000 100000";
$str = `$cmd`;
$t += ok $?>>8,0;
print "Test was: $cmd\n" if ($?);
! $t += ok $str, '/^OK - [0-9]+ processes running$/';
# Reverse Compatibility
! $cmd = "./check_procs 100000 100000 Z";
$str = `$cmd`;
$t += ok $?>>8,0;
print "Test was: $cmd\n" if ($?);
! $t += ok $str, '/^OK - [0-9]+ processes running with /';
# Reverse Compatibility
! $cmd = "./check_procs 0 10000000";
$str = `$cmd`;
$t += ok $?>>8,1;
print "Test was: $cmd\n" unless ($?);
! $t += ok $str, '/^WARNING - [0-9]+ processes running$/';
# Reverse Compatibility
! $cmd = "./check_procs 0 0";
$str = `$cmd`;
$t += ok $?>>8,2;
print "Test was: $cmd\n" unless ($?);
! $t += ok $str, '/^CRITICAL - [0-9]+ processes running$/';
# Reverse Compatibility
! $cmd = "./check_procs 0 0 S";
$str = `$cmd`;
$t += ok $?>>8,2;
print "Test was: $cmd\n" unless ($?);
! $t += ok $str, '/^CRITICAL - [0-9]+ processes running with /';
exit(0) if defined($Test::Harness::VERSION);
--- 14,50 ----
# Reverse Compatibility
! $cmd = "./check_procs -w 100000 -c 100000";
$str = `$cmd`;
$t += ok $?>>8,0;
print "Test was: $cmd\n" if ($?);
! $t += ok $str, '/^PROCS OK: [0-9]+ process(es)?$/';
# Reverse Compatibility
! $cmd = "./check_procs -w 100000 -c 100000 -s Z";
$str = `$cmd`;
$t += ok $?>>8,0;
print "Test was: $cmd\n" if ($?);
! $t += ok $str, '/^PROCS OK: [0-9]+ process(es)? with /';
# Reverse Compatibility
! $cmd = "./check_procs -w 0 -c 10000000";
$str = `$cmd`;
$t += ok $?>>8,1;
print "Test was: $cmd\n" unless ($?);
! $t += ok $str, '/^PROCS WARNING: [0-9]+ process(es)?$/';
# Reverse Compatibility
! $cmd = "./check_procs -w 0 -c 0";
$str = `$cmd`;
$t += ok $?>>8,2;
print "Test was: $cmd\n" unless ($?);
! $t += ok $str, '/^PROCS CRITICAL: [0-9]+ process(es)?$/';
# Reverse Compatibility
! $cmd = "./check_procs -w 0 -c 0 -s S";
$str = `$cmd`;
$t += ok $?>>8,2;
print "Test was: $cmd\n" unless ($?);
! $t += ok $str, '/^PROCS CRITICAL: [0-9]+ process(es)? with /';
exit(0) if defined($Test::Harness::VERSION);
More information about the Commits
mailing list