diff options
author | Sven Nierlein <sven@nierlein.de> | 2014-06-28 20:05:25 (GMT) |
---|---|---|
committer | Sven Nierlein <sven@nierlein.de> | 2014-06-28 20:05:25 (GMT) |
commit | e566021a54c500aa2ee0f17bfe4f95d1fd1be243 (patch) | |
tree | ba07be301444c10260fa8dfa6087c45a9924cb19 /plugins/t/check_dns.t | |
parent | e49973493c4ede24f034dc8e54d988404795ae17 (diff) | |
download | monitoring-plugins-e566021a54c500aa2ee0f17bfe4f95d1fd1be243.tar.gz |
tests: added check_dns performance data test
Signed-off-by: Sven Nierlein <sven@nierlein.de>
Diffstat (limited to 'plugins/t/check_dns.t')
-rw-r--r-- | plugins/t/check_dns.t | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/t/check_dns.t b/plugins/t/check_dns.t index 2c903db..4ff553f 100644 --- a/plugins/t/check_dns.t +++ b/plugins/t/check_dns.t | |||
@@ -10,7 +10,7 @@ use NPTest; | |||
10 | 10 | ||
11 | plan skip_all => "check_dns not compiled" unless (-x "check_dns"); | 11 | plan skip_all => "check_dns not compiled" unless (-x "check_dns"); |
12 | 12 | ||
13 | plan tests => 13; | 13 | plan tests => 14; |
14 | 14 | ||
15 | my $successOutput = '/DNS OK: [\.0-9]+ seconds? response time/'; | 15 | my $successOutput = '/DNS OK: [\.0-9]+ seconds? response time/'; |
16 | 16 | ||
@@ -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"); |
56 | cmp_ok( $res->return_code, '==', 1, "Warning threshold passed"); | 56 | cmp_ok( $res->return_code, '==', 1, "Warning threshold passed"); |
57 | like( $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"); |
59 | cmp_ok( $res->return_code, '==', 2, "Invalid $hostname_invalid"); | 60 | cmp_ok( $res->return_code, '==', 2, "Invalid $hostname_invalid"); |