Imported Upstream version 2.0
This commit is contained in:
parent
c89ccc3c74
commit
0841b5c7c7
165 changed files with 25440 additions and 4442 deletions
|
@ -10,14 +10,14 @@ use NPTest;
|
|||
|
||||
plan skip_all => "check_dns not compiled" unless (-x "check_dns");
|
||||
|
||||
plan tests => 13;
|
||||
plan tests => 14;
|
||||
|
||||
my $successOutput = '/DNS OK: [\.0-9]+ seconds? response time/';
|
||||
|
||||
my $hostname_valid = getTestParameter(
|
||||
"NP_HOSTNAME_VALID",
|
||||
"A valid (known to DNS) hostname",
|
||||
"nagios.com"
|
||||
"monitoring-plugins.org"
|
||||
);
|
||||
|
||||
my $hostname_valid_ip = getTestParameter(
|
||||
|
@ -54,6 +54,7 @@ cmp_ok( $res->return_code, '==', 2, "Critical threshold passed");
|
|||
|
||||
$res = NPTest->testCmd("./check_dns -H $hostname_valid -t 5 -w 0 -c 5");
|
||||
cmp_ok( $res->return_code, '==', 1, "Warning threshold passed");
|
||||
like( $res->output, "/\|time=[\d\.]+s;0.0*;5\.0*;0\.0*/", "Output performance data OK" );
|
||||
|
||||
$res = NPTest->testCmd("./check_dns -H $hostname_invalid -t 1");
|
||||
cmp_ok( $res->return_code, '==', 2, "Invalid $hostname_invalid");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue