mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-04-22 14:46:57 -04:00
check_users: add new test cases
Signed-off-by: Sven Nierlein <sven@nierlein.de>
This commit is contained in:
parent
52cd7d7934
commit
aa7ed88c54
1 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue