[Nagiosplug-checkins] Nagios-Plugin/t Nagios-Plugin-01.t, 1.4, 1.5 Nagios-Plugin-Performance.t, 1.7, 1.8

Ton Voon tonvoon at users.sourceforge.net
Thu Feb 8 16:58:17 CET 2007


Update of /cvsroot/nagiosplug/Nagios-Plugin/t
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv8438/t

Modified Files:
	Nagios-Plugin-01.t Nagios-Plugin-Performance.t 
Log Message:
Fixed warnings when no uom specified for add_perfdata


Index: Nagios-Plugin-01.t
===================================================================
RCS file: /cvsroot/nagiosplug/Nagios-Plugin/t/Nagios-Plugin-01.t,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Nagios-Plugin-01.t	15 Nov 2006 02:11:10 -0000	1.4
+++ Nagios-Plugin-01.t	8 Feb 2007 15:58:15 -0000	1.5
@@ -1,7 +1,7 @@
 # Nagios::Plugin original test cases
 
 use strict;
-use Test::More tests => 12;
+use Test::More tests => 13;
 
 BEGIN { use_ok('Nagios::Plugin') };
 
@@ -41,6 +41,14 @@
 cmp_ok( $p->all_perfoutput, 'eq', "size=1kB;10:25;~:25", "Perfdata correct");
 #diag "dumping perfdata:  ". Dumper ($p->perfdata);
 
+$p->add_perfdata(
+	label => "time",
+	value => "3.52",
+	threshold => $t,
+	);
+
+is( $p->all_perfoutput, "size=1kB;10:25;~:25 time=3.52;10:25;~:25", "Perfdata correct when no uom specified");
+
 my $expected = {qw(
 		   -1    WARNING
 		   1     WARNING

Index: Nagios-Plugin-Performance.t
===================================================================
RCS file: /cvsroot/nagiosplug/Nagios-Plugin/t/Nagios-Plugin-Performance.t,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- Nagios-Plugin-Performance.t	26 Sep 2006 01:10:23 -0000	1.7
+++ Nagios-Plugin-Performance.t	8 Feb 2007 15:58:15 -0000	1.8
@@ -80,3 +80,5 @@
 cmp_ok( $p[1]->rrdlabel, "eq", "shared_folder_big", "replacing bad characters");
 cmp_ok( $p[2]->rrdlabel, "eq", "1234567890123456789", "shortening rrd label");
 
+
+# add_perfdata tests in t/Nagios-Plugin-01.t





More information about the Commits mailing list