Branch Coverage

blib/lib/FusionInventory/Agent/Task/Deploy/P2P.pm
Criterion Covered Total %
branch 23 48 47.9


line true false branch
41 0 0 if time - $self->{'cache_time'} < $self->{'cache_timeout'}
45 0 0 if ($FusionInventory::Agent::Task::Deploy::P2P::OSNAME eq 'linux') { }
0 0 elsif ($FusionInventory::Agent::Task::Deploy::P2P::OSNAME eq 'MSWin32') { }
54 0 0 unless (@interfaces)
63 0 0 unless $interface->{'IPADDRESS'}
64 0 0 unless $interface->{'IPMASK'}
65 0 0 unless lc $interface->{'STATUS'} eq 'up'
73 0 0 unless (@addresses)
84 0 0 unless (@potential_peers)
98 0 72 unless defined $limit
102 9 63 if $ip_bytes[0] == 127
103 0 63 if $ip_bytes[0] == 169
117 0 63 if $ipStart eq $ipEnd
121 0 63 unless my $ipIntervalBefore = 'Net::IP'->new($ipStart . ' - ' . $address->{'ip'})
123 0 63 unless my $ipIntervalAfter = 'Net::IP'->new($address->{'ip'} . ' - ' . $ipEnd)
130 9 54 if ($size > $self->{'max_size'})
138 54 0 if ($ipIntervalBefore->size + $ipIntervalAfter->size > $limit)
143 9 45 if ($ipIntervalBefore->size - 1 < $beforeCount) { }
9 36 elsif ($ipIntervalAfter->size < $afterCount) { }
151 45 9 if (defined $ipIntervalBefore and $ipIntervalBefore->size > $beforeCount + 1)
194 5 19 if $exit_code
198 36 8 if $manager->start($address)
199 1 7 $ping->ping($address) ? :
210 0 14 unless @$deck