diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2006-03-22 16:45:57 (GMT) |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2006-03-22 16:45:57 (GMT) |
commit | 63271bf65d7f6da74e832e16217bac5778d21d6b (patch) | |
tree | 146b3a3462f653691c4311725a03e0c7e0ade56f /plugins/t | |
parent | 7de561c9122315c7974e0b978de0c74bf3b56973 (diff) | |
download | monitoring-plugins-63271bf65d7f6da74e832e16217bac5778d21d6b.tar.gz |
Added warning and critical response times (John Rouillard - 1343159)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1346 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/t')
-rw-r--r-- | plugins/t/check_dns.t | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/t/check_dns.t b/plugins/t/check_dns.t index 5d750d3..9a95e80 100644 --- a/plugins/t/check_dns.t +++ b/plugins/t/check_dns.t | |||
@@ -11,7 +11,7 @@ use NPTest; | |||
11 | 11 | ||
12 | plan skip_all => "check_dns not compiled" unless (-x "check_dns"); | 12 | plan skip_all => "check_dns not compiled" unless (-x "check_dns"); |
13 | 13 | ||
14 | plan tests => 11; | 14 | plan tests => 13; |
15 | 15 | ||
16 | my $successOutput = '/DNS OK: [\.0-9]+ seconds response time/'; | 16 | my $successOutput = '/DNS OK: [\.0-9]+ seconds response time/'; |
17 | 17 | ||
@@ -50,6 +50,12 @@ $res = NPTest->testCmd("./check_dns -H $hostname_valid -t 5"); | |||
50 | cmp_ok( $res->return_code, '==', 0, "Found $hostname_valid"); | 50 | cmp_ok( $res->return_code, '==', 0, "Found $hostname_valid"); |
51 | like ( $res->output, $successOutput, "Output OK" ); | 51 | like ( $res->output, $successOutput, "Output OK" ); |
52 | 52 | ||
53 | $res = NPTest->testCmd("./check_dns -H $hostname_valid -t 5 -w 0 -c 0"); | ||
54 | cmp_ok( $res->return_code, '==', 2, "Critical threshold passed"); | ||
55 | |||
56 | $res = NPTest->testCmd("./check_dns -H $hostname_valid -t 5 -w 0 -c 5"); | ||
57 | cmp_ok( $res->return_code, '==', 1, "Warning threshold passed"); | ||
58 | |||
53 | $res = NPTest->testCmd("./check_dns -H $hostname_invalid -t 1"); | 59 | $res = NPTest->testCmd("./check_dns -H $hostname_invalid -t 1"); |
54 | cmp_ok( $res->return_code, '==', 2, "Invalid $hostname_invalid"); | 60 | cmp_ok( $res->return_code, '==', 2, "Invalid $hostname_invalid"); |
55 | 61 | ||