diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2005-11-03 15:04:16 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2005-11-03 15:04:16 +0000 |
commit | f278c817e584ac7ccd3bdfee3daefdbc483398b7 (patch) | |
tree | a30a777628040bb25e2f42d86e15f47c12d0f3ee /plugins | |
parent | 5537f7b0cdac98df3b9a090e13030969e404ed7d (diff) | |
download | monitoring-plugins-f278c817e584ac7ccd3bdfee3daefdbc483398b7.tar.gz |
Fixing some test failures
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1270 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/t/check_http.t | 2 | ||||
-rw-r--r-- | plugins/t/check_time.t | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/plugins/t/check_http.t b/plugins/t/check_http.t index 56d939b3..d9799141 100644 --- a/plugins/t/check_http.t +++ b/plugins/t/check_http.t @@ -21,7 +21,7 @@ my $host_nonresponsive = getTestParameter( "host_nonresponsive", "NP_HOST_NONRES 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?" ); diff --git a/plugins/t/check_time.t b/plugins/t/check_time.t index 05878dc2..f7fcf959 100644 --- a/plugins/t/check_time.t +++ b/plugins/t/check_time.t @@ -23,14 +23,16 @@ my $hostname_invalid = getTestParameter( "hostname_invalid", "NP_HOSTNAME_IN 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 ); |