diff options
author | Sven Nierlein <sven@nierlein.de> | 2014-01-20 00:54:34 +0100 |
---|---|---|
committer | Sven Nierlein <sven@nierlein.de> | 2014-01-20 00:54:34 +0100 |
commit | b418181dfe80dd75169b6e8a619ac1932155dea2 (patch) | |
tree | cad9c0ae0eae8e800cfff60555ead06ad33c6856 /t/Monitoring-Plugin-Functions-04.t | |
parent | 1cd8d1c52cbd47121f344c4074aec84653f412ce (diff) | |
download | monitoring-plugin-perl-b418181dfe80dd75169b6e8a619ac1932155dea2.tar.gz |
renamed module into Monitoring::Plugin
since the complete monitoring team has been renamed, we
also rename this module.
Signed-off-by: Sven Nierlein <sven@nierlein.de>
Diffstat (limited to 't/Monitoring-Plugin-Functions-04.t')
-rw-r--r-- | t/Monitoring-Plugin-Functions-04.t | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/t/Monitoring-Plugin-Functions-04.t b/t/Monitoring-Plugin-Functions-04.t new file mode 100644 index 0000000..0a7c4e4 --- /dev/null +++ b/t/Monitoring-Plugin-Functions-04.t | |||
@@ -0,0 +1,21 @@ | |||
1 | # max_state_alt tests | ||
2 | |||
3 | use strict; | ||
4 | use Test::More tests => 8; | ||
5 | |||
6 | BEGIN { use_ok("Monitoring::Plugin::Functions", ":all") } | ||
7 | |||
8 | my $new_state = max_state_alt( OK, WARNING ); | ||
9 | |||
10 | is( $new_state, WARNING, "Moved up to WARNING" ); | ||
11 | is( max_state_alt( $new_state, UNKNOWN ), WARNING, "Still at WARNING" ); | ||
12 | |||
13 | $new_state = max_state_alt( $new_state, CRITICAL ); | ||
14 | is( $new_state, CRITICAL, "Now at CRITICAL" ); | ||
15 | is( max_state_alt( OK, OK ), OK, "This is OK" ); | ||
16 | |||
17 | is( max_state_alt( OK, UNKNOWN ), UNKNOWN, "This is UNKNOWN" ); | ||
18 | |||
19 | is( max_state_alt( OK, OK, OK, OK, OK, WARNING ), WARNING, "Use WARNING in this list" ); | ||
20 | |||
21 | is( max_state_alt(), UNKNOWN, "Return UNKNOWN if no parameters" ); | ||