summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2003-05-17 17:50:40 (GMT)
committerTon Voon <tonvoon@users.sourceforge.net>2003-05-17 17:50:40 (GMT)
commite4d0a2d2df48c364abb0b15d97b0f63bd965b800 (patch)
treeaa83e4be83d072a284dc9b5fa81b4e4029fb43a7
parent08134b03fb3eaf9184808f250ee6de07d05fc996 (diff)
downloadmonitoring-plugins-e4d0a2d2df48c364abb0b15d97b0f63bd965b800.tar.gz
Fixed test commands (Mathew Ericson - 738605)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/branches/release-1.3.0@519 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--plugins/t/check_procs.t10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/t/check_procs.t b/plugins/t/check_procs.t
index 9c2330f..9c0c3b8 100644
--- a/plugins/t/check_procs.t
+++ b/plugins/t/check_procs.t
@@ -13,35 +13,35 @@ my $str;
13my $t; 13my $t;
14 14
15# Reverse Compatibility 15# Reverse Compatibility
16$cmd = "./check_procs 100000 100000"; 16$cmd = "./check_procs -w 100000 -c 100000";
17$str = `$cmd`; 17$str = `$cmd`;
18$t += ok $?>>8,0; 18$t += ok $?>>8,0;
19print "Test was: $cmd\n" if ($?); 19print "Test was: $cmd\n" if ($?);
20$t += ok $str, '/^OK - [0-9]+ processes running$/'; 20$t += ok $str, '/^OK - [0-9]+ processes running$/';
21 21
22# Reverse Compatibility 22# Reverse Compatibility
23$cmd = "./check_procs 100000 100000 Z"; 23$cmd = "./check_procs -w 100000 -c 100000 -s Z";
24$str = `$cmd`; 24$str = `$cmd`;
25$t += ok $?>>8,0; 25$t += ok $?>>8,0;
26print "Test was: $cmd\n" if ($?); 26print "Test was: $cmd\n" if ($?);
27$t += ok $str, '/^OK - [0-9]+ processes running with /'; 27$t += ok $str, '/^OK - [0-9]+ processes running with /';
28 28
29# Reverse Compatibility 29# Reverse Compatibility
30$cmd = "./check_procs 0 10000000"; 30$cmd = "./check_procs -w 0 -c 10000000";
31$str = `$cmd`; 31$str = `$cmd`;
32$t += ok $?>>8,1; 32$t += ok $?>>8,1;
33print "Test was: $cmd\n" unless ($?); 33print "Test was: $cmd\n" unless ($?);
34$t += ok $str, '/^WARNING - [0-9]+ processes running$/'; 34$t += ok $str, '/^WARNING - [0-9]+ processes running$/';
35 35
36# Reverse Compatibility 36# Reverse Compatibility
37$cmd = "./check_procs 0 0"; 37$cmd = "./check_procs -w 0 -c 0";
38$str = `$cmd`; 38$str = `$cmd`;
39$t += ok $?>>8,2; 39$t += ok $?>>8,2;
40print "Test was: $cmd\n" unless ($?); 40print "Test was: $cmd\n" unless ($?);
41$t += ok $str, '/^CRITICAL - [0-9]+ processes running$/'; 41$t += ok $str, '/^CRITICAL - [0-9]+ processes running$/';
42 42
43# Reverse Compatibility 43# Reverse Compatibility
44$cmd = "./check_procs 0 0 S"; 44$cmd = "./check_procs -w 0 -c 0 -s S";
45$str = `$cmd`; 45$str = `$cmd`;
46$t += ok $?>>8,2; 46$t += ok $?>>8,2;
47print "Test was: $cmd\n" unless ($?); 47print "Test was: $cmd\n" unless ($?);