Revision: 2089
http://nagiosplug.svn.sourceforge.net/nagiosplug/?rev=2089&view=rev
Author: tonvoon
Date: 2008-11-21 01:35:04 +0000 (Fri, 21 Nov 2008)
Log Message:
-----------
Fixed test problems against Test::More 0.86
Modified Paths:
--------------
Nagios-Plugin/trunk/Changes
Nagios-Plugin/trunk/lib/Nagios/Plugin/Range.pm
Nagios-Plugin/trunk/t/Nagios-Plugin-Performance.t
Modified: Nagios-Plugin/trunk/Changes
===================================================================
--- Nagios-Plugin/trunk/Changes 2008-11-20 08:14:41 UTC (rev 2088)
+++ Nagios-Plugin/trunk/Changes 2008-11-21 01:35:04 UTC (rev 2089)
@@ -1,5 +1,9 @@
Revision history for Perl module Nagios::Plugin.
+0.28 21st November 2008
+ - Fixed test problems when run against Test::More 0.86
+ - Added max_state_* wrappers
+
0.27 14th May 2008
- Fixed parsing of performance data with scientific notation
Modified: Nagios-Plugin/trunk/lib/Nagios/Plugin/Range.pm
===================================================================
--- Nagios-Plugin/trunk/lib/Nagios/Plugin/Range.pm 2008-11-20 08:14:41 UTC (rev 2088)
+++ Nagios-Plugin/trunk/lib/Nagios/Plugin/Range.pm 2008-11-21 01:35:04 UTC (rev 2089)
@@ -15,6 +15,7 @@
our ($VERSION) = $Nagios::Plugin::Functions::VERSION;
use overload
+ 'eq' => sub { shift->_stringify },
'""' => sub { shift->_stringify };
# alert_on constants (undef == range not set)
Modified: Nagios-Plugin/trunk/t/Nagios-Plugin-Performance.t
===================================================================
--- Nagios-Plugin/trunk/t/Nagios-Plugin-Performance.t 2008-11-20 08:14:41 UTC (rev 2088)
+++ Nagios-Plugin/trunk/t/Nagios-Plugin-Performance.t 2008-11-21 01:35:04 UTC (rev 2089)
@@ -130,8 +130,10 @@
cmp_ok( $p[0]->uom, "eq", "s", "uom okay");
ok( defined $p[0]->threshold->warning->is_set, "Warning range has been set");
ok( defined $p[0]->threshold->critical->is_set, "Critical range has been set");
-cmp_ok( $p[0]->threshold->warning, 'eq', "0", "warn okay");
-cmp_ok( $p[0]->threshold->critical, 'eq', "0", "crit okay");
+# The two below used to be cmp_ok, but Test::More 0.86 appears to have a problem with a stringification
+# of 0. See http://rt.cpan.org/Ticket/Display.html?id=41109
+is( $p[0]->threshold->warning, "0", "warn okay");
+is( $p[0]->threshold->critical, "0", "crit okay");
@p = Nagios::Plugin::Performance->parse_perfstring("pct_used=73.7%;90;95");
cmp_ok( $p[0]->label, "eq", "pct_used", "label okay");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.