diff options
author | mail_redacted_for_web | 2019-04-17 19:07:19 +0200 |
---|---|---|
committer | mail_redacted_for_web | 2019-04-17 19:07:19 +0200 |
commit | 1e2387474a449452b78520b9ad96a8b4b5e99722 (patch) | |
tree | 836889471eec7d2aac177405068e2a8f1e2b1978 /nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/t | |
download | nagios-plugins-contrib-1e2387474a449452b78520b9ad96a8b4b5e99722.tar.bz2 |
initial commit of source fetch
Diffstat (limited to 'nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/t')
-rw-r--r-- | nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/t/00_modules.t | 61 | ||||
-rw-r--r-- | nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/t/01_validation.t | 20 |
2 files changed, 81 insertions, 0 deletions
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/t/00_modules.t b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/t/00_modules.t new file mode 100644 index 0000000..ac1dbcb --- /dev/null +++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/t/00_modules.t @@ -0,0 +1,61 @@ +#!perl + +use 5.00800; + +use strict; +use warnings; + +use Test::More tests => 33; + +our $VERSION = '1.4.0'; + +my $plugin_name; +if ( eval { require Monitoring::Plugin } ) { + $plugin_name = 'Monitoring::Plugin'; +} +else { + $plugin_name = 'Nagios::Plugin'; +} + +use_ok($plugin_name); +can_ok( $plugin_name, 'new' ); +can_ok( $plugin_name, 'nagios_exit' ); +can_ok( $plugin_name, 'add_perfdata' ); +can_ok( $plugin_name, 'perfdata' ); + +use_ok( $plugin_name . '::Getopt' ); +can_ok( $plugin_name . '::Getopt', 'new' ); +can_ok( $plugin_name . '::Getopt', 'arg' ); +can_ok( $plugin_name . '::Getopt', 'getopts' ); +can_ok( $plugin_name . '::Getopt', 'get' ); + +use_ok( $plugin_name . '::Threshold' ); +can_ok( $plugin_name . '::Threshold', 'new' ); +can_ok( $plugin_name . '::Threshold', 'set_thresholds' ); + +use_ok('IO::Select'); +can_ok( 'IO::Select', 'new' ); +can_ok( 'IO::Select', 'count' ); +can_ok( 'IO::Select', 'can_read' ); +can_ok( 'IO::Select', 'remove' ); +can_ok( 'IO::Select', 'handles' ); + +use_ok('Net::DNS::Resolver'); +can_ok( 'Net::DNS::Resolver', 'new' ); +can_ok( 'Net::DNS::Resolver', 'can' ); +can_ok( 'Net::DNS::Resolver', 'bgsend' ); +can_ok( 'Net::DNS::Resolver', 'bgread' ); + +use_ok('English'); +use_ok('Readonly'); + +use_ok('Net::IP'); +can_ok( 'Net::IP', 'ip_expand_address' ); + +use_ok('Data::Validate::Domain'); +can_ok( 'Data::Validate::Domain', 'is_hostname' ); + +use_ok('Data::Validate::IP'); +can_ok( 'Data::Validate::IP', 'is_ipv4' ); +can_ok( 'Data::Validate::IP', 'is_ipv6' ); + diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/t/01_validation.t b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/t/01_validation.t new file mode 100644 index 0000000..c76f3fb --- /dev/null +++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_rbl/check_rbl-1.4.4/t/01_validation.t @@ -0,0 +1,20 @@ +#!perl + +use 5.00800; + +use strict; +use warnings; + +use File::Spec; +use Test::More tests => 1; + +our $VERSION = '1.4.0'; + +my $check_rbl = File::Spec->catfile(qw(blib script check_rbl)); + +require_ok($check_rbl); + +my $plugin_module = load_module( 'Monitoring::Plugin', 'Nagios::Plugin' ); +our $plugin = $plugin_module->new( shortname => 'CHECK_RBL' ); + +1; |