Condition Coverage

blib/lib/Search/Elasticsearch/Role/Cxn.pm
Criterion Covered Total %
condition 35 61 57.3


and 3 conditions

line !l l&&!r l&&r condition
108 166 1 3 $params->{'port'} and not $node =~ m(//[^/\[]+:\d+)
156 175 0 0 defined $ENV{'ELASTIC_CLIENT_APIVERSIONING'} and lc $ENV{'ELASTIC_CLIENT_APIVERSIONING'} eq 'true' || $ENV{'ELASTIC_CLIENT_APIVERSIONING'} eq '1'
162 175 0 0 defined $params->{'elastic_cloud_api_key'} and defined $params->{'token_api'}
369 0 0 240 $self->client_version >= 8 and $code >= 200
0 62 178 $self->client_version >= 8 and $code >= 200 and $code < 300
380 5 1 233 $mime_type && $mime_type ne 'text/plain'
391 0 62 177 $code >= 200 and $code <= 209
392 33 3 141 defined $body and length $body
409 49 0 0 defined $body and length $body
425 2 0 0 $error_type eq "Conflict" and $msg =~ /: version conflict, current (?:version )?\[(\d+)\]/

or 2 conditions

line l !l condition
101 175 0 $params->{'node'} || {'host', 'localhost', 'port', '9200'}
121 173 2 $node->{'host'} || 'localhost'
122 1 172 $node->{'userinfo'} || $params->{'userinfo'} || ''
129 1 165 $node->{'path'} || $params->{'path_prefix'} || ''
370 177 1 $headers->{$PRODUCT_CHECK_HEADER} // ""
378 234 5 $headers->{'content-type'} || ''
458 2 0 $body->{'error'} || (return)
461 0 0 $error->{'root_cause'} || []

or 3 conditions

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