From b832a277dc687c4db6bb7f989e6f79d1e0e67e72 Mon Sep 17 00:00:00 2001 From: Ton Voon Date: Sat, 17 May 2003 17:59:13 +0000 Subject: Fixed tests (Mathew Ericson - 738607) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/branches/release-1.3.0@520 f882894a-f735-0410-b71e-b25c423dba1c diff --git a/plugins/t/check_load.t b/plugins/t/check_load.t index ac14620..fce168f 100644 --- a/plugins/t/check_load.t +++ b/plugins/t/check_load.t @@ -11,17 +11,17 @@ my $cmd; my $str; my $t; -$cmd = "./check_load 100 100 100 100 100 100"; +$cmd = "./check_load -w 100,100,100 -c 100,100,100"; $str = `$cmd`; $t += ok $?>>8,0; print "Test was: $cmd\n" if ($?); -$t += ok $str, '/^load average: +[\.0-9]+, +[\.0-9]+, +[\.0-9]+$/'; +$t += ok $str, '/^OK - load average: [0-9]\.?[0-9]+, [0-9]\.?[0-9]+, [0-9]\.?[0-9]+$/'; -$cmd = "./check_load 0 0 0 0 0 0"; +$cmd = "./check_load -w 0,0,0 -c 0,0,0"; $str = `$cmd`; $t += ok $?>>8,2; print "Test was: $cmd\n" unless ($?); -$t += ok $str, '/^load average: +[\.0-9]+, +[\.0-9]+, +[\.0-9]+ CRITICAL$/'; +$t += ok $str, '/^CRITICAL - load average: [0-9]\.?[0-9]+, [0-9]\.?[0-9]+, [0-9]\.?[0-9]+$/'; exit(0) if defined($Test::Harness::VERSION); exit($tests - $t); -- cgit v0.10-9-g596f