[monitoring-plugins] check_users: add new test cases

Sven Nierlein <[email protected]>
Newsgroups gmane.network.nagios.cvs
Message-ID <[email protected]>
 Module: monitoring-plugins
 Branch: master
 Commit: aa7ed88c549141a403d3d8de2bd9760c1f411cb0
 Author: Sven Nierlein <[email protected]>
   Date: Mon Nov  7 21:49:40 2016 +0100
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=aa7ed88

check_users: add new test cases

Signed-off-by: Sven Nierlein <[email protected]>

---

 plugins/t/check_users.t | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/plugins/t/check_users.t b/plugins/t/check_users.t
index 39044bb..088f3b5 100644
--- a/plugins/t/check_users.t
+++ b/plugins/t/check_users.t
@@ -13,7 +13,7 @@ use Test;
 use NPTest;
 
 use vars qw($tests);
-BEGIN {$tests = 4; plan tests => $tests}
+BEGIN {$tests = 8; plan tests => $tests}
 
 my $successOutput = '/^USERS OK - [0-9]+ users currently logged in/';
 my $failureOutput = '/^USERS CRITICAL - [0-9]+ users currently logged in/';
@@ -22,6 +22,8 @@ my $t;
 
 $t += checkCmd( "./check_users 1000 1000", 0, $successOutput );
 $t += checkCmd( "./check_users    0    0", 2, $failureOutput );
+$t += checkCmd( "./check_users -w 0:1000 -c 0:1000", 0, $successOutput );
+$t += checkCmd( "./check_users -w 0:0 -c 0:0", 2, $failureOutput );
 
 exit(0) if defined($Test::Harness::VERSION);
 exit($tests - $t);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.