summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2007-09-04 13:17:01 (GMT)
committerTon Voon <tonvoon@users.sourceforge.net>2007-09-04 13:17:01 (GMT)
commit3ec5d3b8b2426a9acce2faa23a58e615af62930f (patch)
tree544b1c26587ced6c82b992fc151c66981dc35e81 /t
parent819c55cfdd0c26069229ec27a02576d4169defdb (diff)
downloadmonitoring-plugin-perl-3ec5d3b8b2426a9acce2faa23a58e615af62930f.tar.gz
Fixed CPAN test failures due to bad MANIFEST. Fixed version numbering
Fixed a performance parsing problem where uom=% wasn't being recognised git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1775 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 't')
-rw-r--r--t/Nagios-Plugin-Performance.t11
1 files changed, 10 insertions, 1 deletions
diff --git a/t/Nagios-Plugin-Performance.t b/t/Nagios-Plugin-Performance.t
index c4d518c..0574ea0 100644
--- a/t/Nagios-Plugin-Performance.t
+++ b/t/Nagios-Plugin-Performance.t
@@ -1,6 +1,6 @@
1 1
2use strict; 2use strict;
3use Test::More tests => 84; 3use Test::More tests => 91;
4BEGIN { use_ok('Nagios::Plugin::Performance') }; 4BEGIN { use_ok('Nagios::Plugin::Performance') };
5 5
6diag "\nusing Nagios::Plugin::Performance revision ". $Nagios::Plugin::Performance::VERSION . "\n" if $ENV{TEST_VERBOSE}; 6diag "\nusing Nagios::Plugin::Performance revision ". $Nagios::Plugin::Performance::VERSION . "\n" if $ENV{TEST_VERBOSE};
@@ -133,4 +133,13 @@ cmp_ok( $p[0]->uom, "eq", "s", "uom okay");
133cmp_ok( $p[0]->threshold->warning, 'eq', "0", "warn okay"); 133cmp_ok( $p[0]->threshold->warning, 'eq', "0", "warn okay");
134cmp_ok( $p[0]->threshold->critical, 'eq', "0", "crit okay"); 134cmp_ok( $p[0]->threshold->critical, 'eq', "0", "crit okay");
135 135
136@p = Nagios::Plugin::Performance->parse_perfstring("pct_used=73.7%;90;95");
137cmp_ok( $p[0]->label, "eq", "pct_used", "label okay");
138cmp_ok( $p[0]->value, "eq", "73.7", "value okay");
139cmp_ok( $p[0]->uom, "eq", "%", "uom okay");
140 ok( defined eval { $p[0]->threshold->warning->is_set }, "Warning range has been set");
141 ok( defined eval { $p[0]->threshold->critical->is_set }, "Critical range has been set");
142cmp_ok( $p[0]->threshold->warning, 'eq', "90", "warn okay");
143cmp_ok( $p[0]->threshold->critical, 'eq', "95", "crit okay");
144
136# add_perfdata tests in t/Nagios-Plugin-01.t 145# add_perfdata tests in t/Nagios-Plugin-01.t