diff options
author | Ton Voon <ton.voon@opsera.com> | 2011-01-21 13:14:33 (GMT) |
---|---|---|
committer | Ton Voon <ton.voon@opsera.com> | 2011-01-21 13:14:33 (GMT) |
commit | 1a5a83bb82c35d888229fe9f815fbc663c0f4d3c (patch) | |
tree | 56a059f3cb927547d2905e65ed837b36affcc565 /plugins/tests/check_procs.t | |
parent | ae2a66913706e4cb3fc870485abe34c0f3696124 (diff) | |
download | monitoring-plugins-1a5a83bb82c35d888229fe9f815fbc663c0f4d3c.tar.gz |
Fix for regex input of '|', being output causing problems with Nagios' parsing of
performance data. Now replaced with ','
Diffstat (limited to 'plugins/tests/check_procs.t')
-rw-r--r-- | plugins/tests/check_procs.t | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/tests/check_procs.t b/plugins/tests/check_procs.t index 1d0c034..d71c83a 100644 --- a/plugins/tests/check_procs.t +++ b/plugins/tests/check_procs.t | |||
@@ -8,7 +8,7 @@ use Test::More; | |||
8 | use NPTest; | 8 | use NPTest; |
9 | 9 | ||
10 | if (-x "./check_procs") { | 10 | if (-x "./check_procs") { |
11 | plan tests => 48; | 11 | plan tests => 50; |
12 | } else { | 12 | } else { |
13 | plan skip_all => "No check_procs compiled"; | 13 | plan skip_all => "No check_procs compiled"; |
14 | } | 14 | } |
@@ -113,3 +113,7 @@ $result = NPTest->testCmd( "$command --metric=RSS -c 70000 -v" ); | |||
113 | is( $result->return_code, 2, "Checking against RSS > 70MB" ); | 113 | is( $result->return_code, 2, "Checking against RSS > 70MB" ); |
114 | is( $result->output, 'RSS CRITICAL: 5 crit, 0 warn out of 95 processes [WindowServer, SystemUIServer, Safari, Mail, Safari]', "Output correct" ); | 114 | is( $result->output, 'RSS CRITICAL: 5 crit, 0 warn out of 95 processes [WindowServer, SystemUIServer, Safari, Mail, Safari]', "Output correct" ); |
115 | 115 | ||
116 | $result = NPTest->testCmd( "$command --ereg-argument-array='(nosuchname|nosuch2name)'" ); | ||
117 | is( $result->return_code, 0, "Checking no pipe symbol in output" ); | ||
118 | is( $result->output, "PROCS OK: 0 processes with regex args '(nosuchname,nosuch2name)'", "Output correct" ); | ||
119 | |||