Condition Coverage

blib/lib/Search/Elasticsearch/Role/Cxn.pm
Criterion Covered Total %
condition 34 58 58.6


and 3 conditions

line !l l&&!r l&&r condition
107 166 1 3 $params->{'port'} and not $node =~ m(//[^/\[]+:\d+)
155 175 0 0 defined $ENV{'ELASTIC_CLIENT_APIVERSIONING'} and lc $ENV{'ELASTIC_CLIENT_APIVERSIONING'} eq 'true' || $ENV{'ELASTIC_CLIENT_APIVERSIONING'} eq '1'
161 175 0 0 defined $params->{'elastic_cloud_api_key'} and defined $params->{'token_api'}
364 0 62 178 $code >= 200 and $code < 300
375 5 1 233 $mime_type && $mime_type ne 'text/plain'
386 0 62 177 $code >= 200 and $code <= 209
387 33 3 141 defined $body and length $body
404 49 0 0 defined $body and length $body
420 2 0 0 $error_type eq "Conflict" and $msg =~ /: version conflict, current (?:version )?\[(\d+)\]/

or 2 conditions

line l !l condition
100 175 0 $params->{'node'} || {'host', 'localhost', 'port', '9200'}
120 173 2 $node->{'host'} || 'localhost'
121 1 172 $node->{'userinfo'} || $params->{'userinfo'} || ''
128 1 165 $node->{'path'} || $params->{'path_prefix'} || ''
365 177 1 $headers->{$PRODUCT_CHECK_HEADER} // ""
373 234 5 $headers->{'content-type'} || ''
453 2 0 $body->{'error'} || (return)
456 0 0 $error->{'root_cause'} || []

or 3 conditions

line l !l&&r !l&&!r condition
123 170 5 0 $node->{'scheme'} || ($params->{'use_https'} ? 'https' : 'http')
127 0 4 0 $node->{'port'} || $params->{'port'} || ($scheme eq 'http' ? 80 : 443)
155 0 0 0 lc $ENV{'ELASTIC_CLIENT_APIVERSIONING'} eq 'true' || $ENV{'ELASTIC_CLIENT_APIVERSIONING'} eq '1'
418 2 0 0 $self->_munge_elasticsearch_exception($body) || $msg
424 60 0 0 $msg ||= $error_type