summaryrefslogtreecommitdiffstats
path: root/t/Nagios-Plugin-Threshold.t
diff options
context:
space:
mode:
Diffstat (limited to 't/Nagios-Plugin-Threshold.t')
-rw-r--r--t/Nagios-Plugin-Threshold.t12
1 files changed, 6 insertions, 6 deletions
diff --git a/t/Nagios-Plugin-Threshold.t b/t/Nagios-Plugin-Threshold.t
index 677c054..cdb8d77 100644
--- a/t/Nagios-Plugin-Threshold.t
+++ b/t/Nagios-Plugin-Threshold.t
@@ -4,7 +4,7 @@ use Test::More tests => 71;
4#use Test::Exception; # broken for now so we don't need this. 4#use Test::Exception; # broken for now so we don't need this.
5BEGIN { 5BEGIN {
6 use_ok('Nagios::Plugin::Threshold'); 6 use_ok('Nagios::Plugin::Threshold');
7 use_ok('Nagios::Plugin::Base', ':all' ); 7 use_ok('Nagios::Plugin::Functions', ':all' );
8 # Silence warnings unless TEST_VERBOSE is set 8 # Silence warnings unless TEST_VERBOSE is set
9 $SIG{__WARN__} = sub { warn $_[0] if $ENV{TEST_VERBOSE} }; 9 $SIG{__WARN__} = sub { warn $_[0] if $ENV{TEST_VERBOSE} };
10} 10}
@@ -12,7 +12,7 @@ BEGIN {
12diag "\nusing Nagios::Plugin::Threshold revision ". $Nagios::Plugin::Threshold::VERSION . "\n" 12diag "\nusing Nagios::Plugin::Threshold revision ". $Nagios::Plugin::Threshold::VERSION . "\n"
13 if $ENV{TEST_VERBOSE}; 13 if $ENV{TEST_VERBOSE};
14 14
15Nagios::Plugin::Base::_fake_exit(1); 15Nagios::Plugin::Functions::_fake_exit(1);
16 16
17diag "threshold: critical if > 80" if $ENV{TEST_VERBOSE}; 17diag "threshold: critical if > 80" if $ENV{TEST_VERBOSE};
18my $t = Nagios::Plugin::Threshold->set_thresholds(critical => "80"); 18my $t = Nagios::Plugin::Threshold->set_thresholds(critical => "80");
@@ -96,8 +96,8 @@ test_expected_statuses( $t, $expected );
96goto SKIP_DEATH; 96goto SKIP_DEATH;
97diag "threshold: test pure crap for arguments - default to OK." if $ENV{TEST_VERBOSE}; 97diag "threshold: test pure crap for arguments - default to OK." if $ENV{TEST_VERBOSE};
98diag "you should see one invalid range definition warning and an UNKNOWN line here:\n"; 98diag "you should see one invalid range definition warning and an UNKNOWN line here:\n";
99Nagios::Plugin::Base->print_on_die(1); 99Nagios::Plugin::Functions->print_on_die(1);
100Nagios::Plugin::Base->exit_on_die(1); 100Nagios::Plugin::Functions->exit_on_die(1);
101 101
102dies_ok( sub { 102dies_ok( sub {
103 $t = Nagios::Plugin::Threshold->set_thresholds( 103 $t = Nagios::Plugin::Threshold->set_thresholds(
@@ -106,8 +106,8 @@ dies_ok( sub {
106 ) 106 )
107 }, "bad thresholds cause death" 107 }, "bad thresholds cause death"
108); 108);
109Nagios::Plugin::Base->print_on_die(0); 109Nagios::Plugin::Functions->print_on_die(0);
110Nagios::Plugin::Base->exit_on_die(0); 110Nagios::Plugin::Functions->exit_on_die(0);
111SKIP_DEATH: 111SKIP_DEATH:
112 112
113 113