Forráskód Böngészése

Fixed tests (Mathew Ericson - 738607)

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@520 f882894a-f735-0410-b71e-b25c423dba1c
Ton Voon 23 éve
szülő
commit
f242c3acd9
1 módosított fájl, 4 hozzáadás és 4 törlés
  1. 4 4
      plugins/t/check_load.t

+ 4 - 4
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);