« t/Templates/Plugins/WebTransact/check_template-WebTransact-with-client-certificate.t
↑ Summary
t/Asnmtap/Plugins/Nagios.t »
| 1 | #!/usr/bin/env perl -w -I .. | ||||||||||||||||||||||||||||||||||||||||||
| 2 | # | ||||||||||||||||||||||||||||||||||||||||||
| 3 | # ... Tests via check_template-WebTransact.pl | ||||||||||||||||||||||||||||||||||||||||||
| 4 | # | ||||||||||||||||||||||||||||||||||||||||||
| 5 | # $Id: check_template-WebTransact.t, v 1.0 2006/02/01 Alex Peeters Exp $ | ||||||||||||||||||||||||||||||||||||||||||
| 6 | # | ||||||||||||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||||||||||||
| 8 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 9 | 1 | ▶ | use Test; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 10 | 1 | ▶ | use ASNMTAP::Asnmtap::Plugins::NPTest; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||||||||||||||
| 12 | 1 | ▶ | use vars qw($tests); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 13 | 1 | ▶ | BEGIN {$tests = 4; plan tests => $tests} | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||||||||||||||||
| 15 | 1 | my $t; | |||||||||||||||||||||||||||||||||||||||||
| 16 | 1 | my $prefix = '../plugins/templates'; | |||||||||||||||||||||||||||||||||||||||||
| 17 | 1 | my $plugin = 'check_template-WebTransact.pl'; | |||||||||||||||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||||||||||||||||
| 19 | 1 | ▶ | if ( -x "$prefix/$plugin" ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 20 | 1 | $t += checkCmd( "$prefix/$plugin -V", 3, "/$plugin/"); | |||||||||||||||||||||||||||||||||||||||||
| 21 | 1 | $t += checkCmd( "$prefix/$plugin -h", 3); | |||||||||||||||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||||||||||||||||
| 23 | 1 | ▶ | my $ASNMTAP_PROXY = ( exists $ENV{ASNMTAP_PROXY} ) ? $ENV{ASNMTAP_PROXY} : undef; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||||||||||||||||
| 25 | 1 | ▶ | unless ( defined $ASNMTAP_PROXY and ( $ASNMTAP_PROXY eq '0.0.0.0' or $ASNMTAP_PROXY eq '' ) ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition16%1/6
defined $ASNMTAP_PROXY and $ASNMTAP_PROXY eq "0.0.0.0" || $ASNMTAP_PROXY eq ""
$ASNMTAP_PROXY eq "0.0.0.0" or $ASNMTAP_PROXY eq ""
MC/DC0%0/3
defined $ASNMTAP_PROXY and $ASNMTAP_PROXY eq "0.0.0.0" || $ASNMTAP_PROXY eq ""
defined $ASNMTAP_PROXY
$ASNMTAP_PROXY eq "0.0.0.0"
$ASNMTAP_PROXY eq ""
Truth table25%1/4
A and B or C
A= defined $ASNMTAP_PROXYB= $ASNMTAP_PROXY eq "0.0.0.0"C= $ASNMTAP_PROXY eq ""
| |||||||||||||||||||||||||||||||||||||||||||
| 26 | 1 | ▶ | my $proxy = ($ASNMTAP_PROXY ? "--proxy='$ASNMTAP_PROXY'" : ''); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||||||||||||||||
| 28 | 1 | $t += checkCmd( "$prefix/$plugin $proxy", [0, 1, 2, 3]); | |||||||||||||||||||||||||||||||||||||||||
| 29 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 30 | 0 | $t += skipMissingCmd( "ASNMTAP_PROXY", ($tests - 3) ); | |||||||||||||||||||||||||||||||||||||||||
| 31 | } | ||||||||||||||||||||||||||||||||||||||||||
| 32 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 33 | 0 | $t += skipMissingCmd( "$prefix/$plugin", $tests ); | |||||||||||||||||||||||||||||||||||||||||
| 34 | } | ||||||||||||||||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||||||||||||||||
| 36 | 1 | ▶ | exit(0) if defined($Test::Harness::VERSION); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 37 | 1 | exit($tests - $t); | |||||||||||||||||||||||||||||||||||||||||