Branch Coverage

blib/lib/App/Prove/Elasticsearch/Planner/Default.pm
Criterion Covered Total %
branch 45 62 72.5


line true false branch
25 3 2 $conf->{'server.port'} ? :
26 2 3 unless $conf->{'server.host'}
27 1 2 unless $port
38 1 1 unless ($e->indices->exists('index', $index))
135 1 8 unless $options{'version'}
156 2 6 if $options{'name'}
167 0 7 unless ref $docs eq 'HASH' and ref $docs->{'hits'} eq 'HASH' and ref $docs->{'hits'}{'hits'} eq 'ARRAY'
168 1 6 unless scalar @{$docs->{'hits'}{'hits'};}
175 0 6 ref $match->{'platforms'} eq 'ARRAY' ? :
188 3 2 if $name_correct and $version_correct and $plats_correct
196 0 0 unless $options{'version'}
210 0 0 if $options{'name'}
225 0 0 unless $options{'searcher'}
229 0 0 unless ref $docs eq 'ARRAY' and scalar @$docs
234 0 0 unless ref $doc->{'_source'}{'tests'} eq 'ARRAY' and scalar @{$doc->{'_source'}{'tests'};}
238 0 0 if @tests
246 0 1 unless $searcher
257 1 4 if ($plan->{'noop'})
261 1 3 if $plan->{'update'}
263 1 2 unless $e
278 1 1 unless (defined $doc_exists and int $doc_exists)
310 0 2 if $res->{'result'} eq 'updated'
311 1 1 unless (grep {$res->{'result'} eq $_;} 'updated', 'noop')
322 1 2 unless $e
325 1 1 $out{'pairwise'} ? :
331 1 1 unless $out{'name'}
333 1 1 unless scalar @{$out{'tests'};}
340 1 2 unless $e
348 1 1 unless grep {$_ eq $okey;} @{$$existing{'tests'};}
351 1 1 unless grep {$_ eq $ekey;} @{$out{'tests'};}
354 1 0 unless (scalar keys %$adds or scalar keys %$subs)