[Nagiosplug-checkins] nagiosplug/plugins/t check_dns.t,1.4,1.5

Ton Voon tonvoon at users.sourceforge.net
Wed Mar 22 08:47:01 CET 2006


Update of /cvsroot/nagiosplug/nagiosplug/plugins/t
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7147/t

Modified Files:
	check_dns.t 
Log Message:
Added warning and critical response times (John Rouillard - 1343159)


Index: check_dns.t
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/t/check_dns.t,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- check_dns.t	22 Mar 2006 14:17:10 -0000	1.4
+++ check_dns.t	22 Mar 2006 16:45:57 -0000	1.5
@@ -11,7 +11,7 @@
 
 plan skip_all => "check_dns not compiled" unless (-x "check_dns");
 
-plan tests => 11;
+plan tests => 13;
 
 my $successOutput = '/DNS OK: [\.0-9]+ seconds response time/';
 
@@ -50,6 +50,12 @@
 cmp_ok( $res->return_code, '==', 0, "Found $hostname_valid");
 like  ( $res->output, $successOutput, "Output OK" );
 
+$res = NPTest->testCmd("./check_dns -H $hostname_valid -t 5 -w 0 -c 0");
+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");
+
 $res = NPTest->testCmd("./check_dns -H $hostname_invalid -t 1");
 cmp_ok( $res->return_code, '==', 2, "Invalid $hostname_invalid");
 





More information about the Commits mailing list