« t/Templates/Plugins/Nagios/check_template-ftp.t
↑ Summary
t/Templates/Plugins/Mail/check_template-mail-fingerprint-xml.t »
| 1 | 1 | ▶ | use Test::More tests => 7; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | |||
| 3 | 1 | ▶ | BEGIN { use_ok ( 'ASNMTAP::Asnmtap::Plugins::Mail' ) }; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | BEGIN { use_ok ( 'ASNMTAP::Asnmtap::Plugins::Mail', qw(:ALL) ) }; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | TODO: { | ||
| 7 | 1 | ▶ | use ASNMTAP::Asnmtap::Plugins v3.002.003; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 1 | ▶ | use ASNMTAP::Asnmtap::Plugins qw(:PLUGINS %STATE); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 1 | my $objectPlugins = ASNMTAP::Asnmtap::Plugins->new ( | |
| 11 | _programName => 'Mail.t', | ||
| 12 | _programDescription => 'Test ASNMTAP::Asnmtap::Plugins::MAIL', | ||
| 13 | _programVersion => '3.002.003', | ||
| 14 | _programGetOptions => ['environment|e:s', 'timeout|t:i', 'trendline|T:i'], | ||
| 15 | _timeout => 30, | ||
| 16 | _debug => 0); | ||
| 17 | |||
| 18 | 1 | ▶ | no warnings 'deprecated'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 19 | 1 | $objectPlugins->{_getOptionsArgv}->{environment} = 'P'; | |
| 20 | |||
| 21 | 1 | isa_ok( $objectPlugins, 'ASNMTAP::Asnmtap::Plugins' ); | |
| 22 | 1 | can_ok( $objectPlugins, qw(programName programDescription programVersion getOptionsArgv getOptionsValue debug dumpData printRevision printRevision printUsage printHelp) ); | |
| 23 | 1 | can_ok( $objectPlugins, qw(appendPerformanceData browseragent SSLversion clientCertificate pluginValue pluginValues proxy timeout setEndTime_and_getResponsTime write_debugfile call_system exit) ); | |
| 24 | |||
| 25 | 1 | my $body = "\nThis is the body of the email !!! ...\n"; | |
| 26 | |||
| 27 | 1 | ▶ | use ASNMTAP::Asnmtap::Plugins::Mail v3.002.003; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 28 | |||
| 29 | 1 | my $objectMAIL = ASNMTAP::Asnmtap::Plugins::Mail->new ( | |
| 30 | _asnmtapInherited => \$objectPlugins, | ||
| 31 | _SMTP => { smtp => [ qw(smtp.citap.be) ], mime => 0 }, | ||
| 32 | _mailType => 0, | ||
| 33 | _mail => { | ||
| 34 | from => 'alex.peeters@citap.com', | ||
| 35 | to => 'asnmtap@citap.com', | ||
| 36 | status => $APPLICATION .' Status UP', | ||
| 37 | body => $body | ||
| 38 | } | ||
| 39 | ); | ||
| 40 | |||
| 41 | 0 | isa_ok( $objectMAIL, 'ASNMTAP::Asnmtap::Plugins::Mail' ); | |
| 42 | 0 | can_ok( $objectMAIL, qw(sending_fingerprint_mail) ); | |
| 43 | |||
| 44 | 1 | ▶ | no warnings 'deprecated'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 45 | 0 | $objectPlugins->{_pluginValues}->{stateValue} = $ERRORS{OK}; | |
| 46 | 0 | $objectPlugins->{_pluginValues}->{stateError} = $STATE{$ERRORS{OK}}; | |
| 47 | 0 | $objectPlugins->exit (0); | |
| 48 | } | ||