summaryrefslogtreecommitdiffstats
path: root/plugins/t/check_dns.t
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/t/check_dns.t')
-rw-r--r--plugins/t/check_dns.t5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/t/check_dns.t b/plugins/t/check_dns.t
index 64aaf0c..4ff553f 100644
--- a/plugins/t/check_dns.t
+++ b/plugins/t/check_dns.t
@@ -10,14 +10,14 @@ use NPTest;
10 10
11plan skip_all => "check_dns not compiled" unless (-x "check_dns"); 11plan skip_all => "check_dns not compiled" unless (-x "check_dns");
12 12
13plan tests => 13; 13plan tests => 14;
14 14
15my $successOutput = '/DNS OK: [\.0-9]+ seconds? response time/'; 15my $successOutput = '/DNS OK: [\.0-9]+ seconds? response time/';
16 16
17my $hostname_valid = getTestParameter( 17my $hostname_valid = getTestParameter(
18 "NP_HOSTNAME_VALID", 18 "NP_HOSTNAME_VALID",
19 "A valid (known to DNS) hostname", 19 "A valid (known to DNS) hostname",
20 "nagios.com" 20 "monitoring-plugins.org"
21 ); 21 );
22 22
23my $hostname_valid_ip = getTestParameter( 23my $hostname_valid_ip = getTestParameter(
@@ -54,6 +54,7 @@ cmp_ok( $res->return_code, '==', 2, "Critical threshold passed");
54 54
55$res = NPTest->testCmd("./check_dns -H $hostname_valid -t 5 -w 0 -c 5"); 55$res = NPTest->testCmd("./check_dns -H $hostname_valid -t 5 -w 0 -c 5");
56cmp_ok( $res->return_code, '==', 1, "Warning threshold passed"); 56cmp_ok( $res->return_code, '==', 1, "Warning threshold passed");
57like( $res->output, "/\|time=[\d\.]+s;0.0*;5\.0*;0\.0*/", "Output performance data OK" );
57 58
58$res = NPTest->testCmd("./check_dns -H $hostname_invalid -t 1"); 59$res = NPTest->testCmd("./check_dns -H $hostname_invalid -t 1");
59cmp_ok( $res->return_code, '==', 2, "Invalid $hostname_invalid"); 60cmp_ok( $res->return_code, '==', 2, "Invalid $hostname_invalid");