mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-04-15 22:00:06 -04:00
Adapt further test to changed output
This commit is contained in:
parent
72fd885f4f
commit
f63d249984
4 changed files with 4 additions and 4 deletions
|
|
@ -45,7 +45,7 @@ $res = NPTest->testCmd(
|
|||
"./$plugin $host_nonresponsive -wt 1 -ct 2 -t 3"
|
||||
);
|
||||
cmp_ok( $res->return_code, '==', 2, "Webserver $host_nonresponsive not responding" );
|
||||
cmp_ok( $res->output, 'eq', "CRITICAL - Socket timeout after 3 seconds", "Output OK");
|
||||
like( $res->output, "/Socket timeout after/", "Output OK");
|
||||
|
||||
$res = NPTest->testCmd(
|
||||
"./$plugin $hostname_invalid -wt 1 -ct 2"
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ my $hostname_invalid = getTestParameter("NP_HOSTNAME_INVALID", "An invalid (no
|
|||
|
||||
my $jabberOK = '/JABBER OK\s-\s\d+\.\d+\ssecond response time on '.$host_tcp_jabber.' port 5222/';
|
||||
|
||||
my $jabberUnresponsive = '/CRITICAL\s-\sSocket timeout after\s\d+\sseconds/';
|
||||
my $jabberUnresponsive = '/Socket timeout after\s\d+\sseconds/';
|
||||
|
||||
my $jabberInvalid = '/JABBER CRITICAL - Invalid hostname, address or socket:\s.+/';
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ SKIP: {
|
|||
|
||||
$result = NPTest->testCmd("$command -H $host_nonresponsive -b ou=blah -t 2 -w 1 -c 1");
|
||||
is( $result->return_code, 2, "$command -H $host_nonresponsive -b ou=blah -t 5 -w 2 -c 3" );
|
||||
is( $result->output, 'CRITICAL - Socket timeout after 2 seconds', "output ok" );
|
||||
like($result->output, '/Socket timeout after \d+ seconds/', "output ok" );
|
||||
};
|
||||
|
||||
SKIP: {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ my $ntp_critmatch1 = '/^NTP\sCRITICAL:\sOffset\s-?[0-9]+(\.[0-9]+)?(e-[0-9]{2})?
|
|||
my $ntp_okmatch2 = '/^NTP\sOK:\sOffset\s-?[0-9]+(\.[0-9]+)?(e-[0-9]{2})?\ssecs,\sjitter=[0-9]+\.[0-9]+,\sstratum=[0-9]{1,2},\struechimers=[0-9]+/';
|
||||
my $ntp_warnmatch2 = '/^NTP\sWARNING:\sOffset\s-?[0-9]+(\.[0-9]+)?(e-[0-9]{2})?\ssecs,\sjitter=[0-9]+\.[0-9]+,\sstratum=[0-9]{1,2}\s\(WARNING\),\struechimers=[0-9]+/';
|
||||
my $ntp_critmatch2 = '/^NTP\sCRITICAL:\sOffset\s-?[0-9]+(\.[0-9]+)?(e-[0-9]{2})?\ssecs,\sjitter=[0-9]+\.[0-9]+\s\(CRITICAL\),\sstratum=[0-9]{1,2},\struechimers=[0-9]+/';
|
||||
my $ntp_noresponse = '/^(CRITICAL - Socket timeout after 3 seconds)|(NTP CRITICAL: No response from NTP server)$/';
|
||||
my $ntp_noresponse = '/^(.*Socket timeout after \d+ seconds.*)|.*No response from NTP server.*)$/';
|
||||
my $ntp_nosuchhost = '/^check_ntp.*: Invalid hostname/address - ' . $hostname_invalid . '/';
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue