Branch Coverage

blib/lib/FusionInventory/Agent/SNMP/Live.pm
Criterion Covered Total %
branch 17 76 22.3


line true false branch
14 1 5 unless $params{'hostname'}
20 0 2 $params{'version'} eq '3' ? :
0 2 $params{'version'} eq '2c' ? :
3 2 $params{'version'} eq '1' ? :
0 5 !$params{'version'} ? :
23 2 3 unless $version
33 0 3 if $params{'timeout'}
36 0 3 if ($version eq 'snmpv3') { }
40 0 0 if $params{'authprotocol'}
42 0 0 if $params{'authpassword'}
44 0 0 if $params{'privprotocol'}
46 0 0 if $params{'privpassword'}
53 2 1 unless ($self->{'session'})
54 0 2 if $error =~ /^No response from remote host/
56 0 2 if $error =~ /^Received usmStats(WrongDigests|UnknownUserNames)/
61 1 0 if ($version ne 'snmpv3')
66 1 0 unless $response
69 0 0 if $response->{$oid} =~ /No response from remote host/
82 0 0 $version_id == 3 ? :
0 0 $version_id == 1 ? :
0 0 $version_id == 0 ? :
89 0 0 if ($version eq 'snmpv3') { }
93 0 0 unless $self->{'oldsession'}
103 0 0 unless $self->{'session'}
111 0 0 $version_id == 3 ? :
0 0 $version_id == 1 ? :
0 0 $version_id == 0 ? :
117 0 0 if ($version eq 'snmpv3') { }
128 0 0 unless $oid
132 0 0 if $self->{'context'}
136 0 0 unless $response
138 0 0 if $response->{$oid} =~ /noSuchInstance/
139 0 0 if $response->{$oid} =~ /noSuchObject/
140 0 0 if $response->{$oid} =~ /No response from remote host/
151 0 0 unless $oid
155 0 0 if $self->{'context'}
156 0 0 if $session->version != 0
160 0 0 unless $response