diff options
Diffstat (limited to 't/Nagios-Plugin-Threshold.t')
-rw-r--r-- | t/Nagios-Plugin-Threshold.t | 12 |
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. |
5 | BEGIN { | 5 | BEGIN { |
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 { | |||
12 | diag "\nusing Nagios::Plugin::Threshold revision ". $Nagios::Plugin::Threshold::VERSION . "\n" | 12 | diag "\nusing Nagios::Plugin::Threshold revision ". $Nagios::Plugin::Threshold::VERSION . "\n" |
13 | if $ENV{TEST_VERBOSE}; | 13 | if $ENV{TEST_VERBOSE}; |
14 | 14 | ||
15 | Nagios::Plugin::Base::_fake_exit(1); | 15 | Nagios::Plugin::Functions::_fake_exit(1); |
16 | 16 | ||
17 | diag "threshold: critical if > 80" if $ENV{TEST_VERBOSE}; | 17 | diag "threshold: critical if > 80" if $ENV{TEST_VERBOSE}; |
18 | my $t = Nagios::Plugin::Threshold->set_thresholds(critical => "80"); | 18 | my $t = Nagios::Plugin::Threshold->set_thresholds(critical => "80"); |
@@ -96,8 +96,8 @@ test_expected_statuses( $t, $expected ); | |||
96 | goto SKIP_DEATH; | 96 | goto SKIP_DEATH; |
97 | diag "threshold: test pure crap for arguments - default to OK." if $ENV{TEST_VERBOSE}; | 97 | diag "threshold: test pure crap for arguments - default to OK." if $ENV{TEST_VERBOSE}; |
98 | diag "you should see one invalid range definition warning and an UNKNOWN line here:\n"; | 98 | diag "you should see one invalid range definition warning and an UNKNOWN line here:\n"; |
99 | Nagios::Plugin::Base->print_on_die(1); | 99 | Nagios::Plugin::Functions->print_on_die(1); |
100 | Nagios::Plugin::Base->exit_on_die(1); | 100 | Nagios::Plugin::Functions->exit_on_die(1); |
101 | 101 | ||
102 | dies_ok( sub { | 102 | dies_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 | ); |
109 | Nagios::Plugin::Base->print_on_die(0); | 109 | Nagios::Plugin::Functions->print_on_die(0); |
110 | Nagios::Plugin::Base->exit_on_die(0); | 110 | Nagios::Plugin::Functions->exit_on_die(0); |
111 | SKIP_DEATH: | 111 | SKIP_DEATH: |
112 | 112 | ||
113 | 113 | ||