[Nagiosplug-checkins] nagiosplug/plugins/t check_time.t,1.2,1.3 check_http.t,1.4,1.5
Ton Voon
tonvoon at users.sourceforge.net
Thu Nov 3 07:05:32 CET 2005
Update of /cvsroot/nagiosplug/nagiosplug/plugins/t
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17484/plugins/t
Modified Files:
check_time.t check_http.t
Log Message:
Fixing some test failures
Index: check_http.t
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/t/check_http.t,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- check_http.t 25 Jul 2005 01:47:14 -0000 1.4
+++ check_http.t 3 Nov 2005 15:04:16 -0000 1.5
@@ -21,7 +21,7 @@
my $hostname_invalid = getTestParameter( "hostname_invalid", "NP_HOSTNAME_INVALID", "nosuchhost",
"An invalid (not known to DNS) hostname" );
-my $successOutput = '/(HTTP\s[o|O][k|K]\s)?\s?HTTP\/1.[01]\s[0-9]{3}\s(OK|Found)\s-\s+[0-9]+\sbytes\sin\s+([0-9]+|[0-9]+\.[0-9]+)\sseconds/';
+my $successOutput = '/OK.*HTTP.*second/';
my %exceptions = ( 2 => "No Web Server present?" );
Index: check_time.t
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/t/check_time.t,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- check_time.t 25 Jul 2005 01:47:15 -0000 1.2
+++ check_time.t 3 Nov 2005 15:04:16 -0000 1.3
@@ -23,14 +23,16 @@
my $successOutput = '/^TIME OK - [0-9]+ second time difference/';
+my %exceptions = ( 3 => "No time server present?");
+
my $t;
# standard mode
-$t += checkCmd( "./check_time -H $host_udp_time -w 999999,59 -c 999999,59 -t 60", 0, $successOutput );
-$t += checkCmd( "./check_time -H $host_udp_time -w 999999 -W 59 -c 999999 -C 59 -t 60", 0, $successOutput );
+$t += checkCmd( "./check_time -H $host_udp_time -w 999999,59 -c 999999,59 -t 60", 0, $successOutput, %exceptions );
+$t += checkCmd( "./check_time -H $host_udp_time -w 999999 -W 59 -c 999999 -C 59 -t 60", 0, $successOutput, %exceptions );
# reverse compatibility mode
-$t += checkCmd( "./check_time $host_udp_time -wt 59 -ct 59 -cd 999999 -wd 999999 -to 60", 0, $successOutput );
+$t += checkCmd( "./check_time $host_udp_time -wt 59 -ct 59 -cd 999999 -wd 999999 -to 60", 0, $successOutput, %exceptions );
# failure mode
$t += checkCmd( "./check_time -H $host_nonresponsive -t 1", 2 );
More information about the Commits
mailing list