From d47be7a9e48242a25e356e2509f6fb774ae0be10 Mon Sep 17 00:00:00 2001 From: Ton Voon Date: Wed, 25 Apr 2007 22:10:13 +0000 Subject: check_load can optionally divide by number of cpus git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1700 f882894a-f735-0410-b71e-b25c423dba1c --- plugins/t/check_load.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'plugins/t') diff --git a/plugins/t/check_load.t b/plugins/t/check_load.t index 0804ac65..da87d168 100644 --- a/plugins/t/check_load.t +++ b/plugins/t/check_load.t @@ -14,7 +14,7 @@ my $res; my $successOutput = '/^OK - load average: [0-9]+\.?[0-9]+, [0-9]+\.?[0-9]+, [0-9]+\.?[0-9]+/'; my $failureOutput = '/^CRITICAL - load average: [0-9]+\.?[0-9]+, [0-9]+\.?[0-9]+, [0-9]+\.?[0-9]+/'; -plan tests => 4; +plan tests => 6; $res = NPTest->testCmd( "./check_load -w 100,100,100 -c 100,100,100" ); cmp_ok( $res->return_code, 'eq', 0, "load not over 100"); @@ -24,3 +24,7 @@ $res = NPTest->testCmd( "./check_load -w 0,0,0 -c 0,0,0" ); cmp_ok( $res->return_code, 'eq', 2, "Load over 0"); like( $res->output, $failureOutput, "Output OK"); +$res = NPTest->testCmd( "./check_load -r -w 0,0,0 -c 0,0,0" ); +cmp_ok( $res->return_code, 'eq', 2, "Load over 0 with per cpu division"); +like( $res->output, $failureOutput, "Output OK"); + -- cgit v1.2.3-74-g34f1