[Nagiosplug-checkins] SF.net SVN: nagiosplug:[2113] Nagios-Plugin/trunk/t/ Nagios-Plugin-Performance.t

dermoth at users.sourceforge.net dermoth at users.sourceforge.net
Mon Jan 5 23:26:24 CET 2009


Revision: 2113
          http://nagiosplug.svn.sourceforge.net/nagiosplug/?rev=2113&view=rev
Author:   dermoth
Date:     2009-01-05 22:26:23 +0000 (Mon, 05 Jan 2009)

Log Message:
-----------
One other test, from check_ntp_time

Modified Paths:
--------------
    Nagios-Plugin/trunk/t/Nagios-Plugin-Performance.t

Modified: Nagios-Plugin/trunk/t/Nagios-Plugin-Performance.t
===================================================================
--- Nagios-Plugin/trunk/t/Nagios-Plugin-Performance.t	2008-12-23 11:53:16 UTC (rev 2112)
+++ Nagios-Plugin/trunk/t/Nagios-Plugin-Performance.t	2009-01-05 22:26:23 UTC (rev 2113)
@@ -16,7 +16,7 @@
   },
 );
 
-plan tests => (8 * scalar @test) + 125;
+plan tests => (8 * scalar @test) + 132;
 
 use_ok('Nagios::Plugin::Performance');
 diag "\nusing Nagios::Plugin::Performance revision ". $Nagios::Plugin::Performance::VERSION . "\n" if $ENV{TEST_VERBOSE};
@@ -239,4 +239,15 @@
 is( $p[1]->threshold->critical->is_set, 1, "Critical range has been set");
 is( $p[1]->threshold->critical, "60", "warn okay");
 
+
+# Another set of comma separated stuff
+ at p = Nagios::Plugin::Performance->parse_perfstring("offset=-0,023545s;60,000000;120,000000;");
+is( $p[0]->label, "offset", "label okay for numeric with commas instead of periods");
+is( $p[0]->value, -0.023545, "value okay");
+is( $p[0]->uom, "s", "uom okay");
+is( $p[0]->threshold->warning->is_set, 1, "Warning range has been set");
+is( $p[0]->threshold->warning, 60, "warn okay");
+is( $p[0]->threshold->critical->is_set, 1, "Critical range has been set");
+is( $p[0]->threshold->critical, 120, "warn okay");
+
 # add_perfdata tests in t/Nagios-Plugin-01.t


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Commits mailing list