Branch Coverage

blib/lib/MogileFS/Device.pm
Criterion Covered Total %
branch 12 72 16.6


line true false branch
16 0 21 $ENV{'TESTING'} ? :
34 0 130 if $$self{'observed_state'} and not $$self{'observed_state'} =~ /^(?:writeable|readable|unreachable)$/
57 0 108 unless $$self{'mb_total'} and defined $$self{'mb_used'}
64 0 0 unless $$self{'mb_total'} and defined $$self{'mb_used'}
71 0 0 @_ ? :
99 0 52 unless $self->host_ok
105 0 0 unless $self->host_ok
112 0 0 unless $self->host_ok
119 278 0 if $ds
144 2 52 unless $dstate->should_get_new_files
145 0 52 unless $self->observed_writeable
146 10 42 unless $self->host->alive
149 0 42 if $$self{'mb_total'} and $self->mb_free < $min_free
157 42 0 if $$self{'mb_total'} and defined $$self{'mb_used'}
172 0 0 ref $_ ? :
174 0 0 grep({$my_hostid == $_;} @hostids) ? :
191 0 0 if ($self->doesnt_know_mkcol or 'MogileFS::Config'->server_setting_cached('skip_mkcol'))
192 0 0 $cb ? :
197 0 0 unless $uri =~ m[/$]
199 0 0 if ($dir_made{$uri})
200 0 0 $cb ? :
205 0 0 if ($res->is_success) { }
0 0 elsif ($res->code =~ /\A(?:400|501)\z/) { }
211 0 0 if ($dir_made_lastclean < $now - $clean_interval)
214 0 0 if $dir_made{$k} < $now - 3600
231 0 0 if $cb
234 0 0 if $cb
244 0 0 unless $limit and $limit =~ /^\d+$/
245 0 0 if %opts
250 0 0 unless $fidids
261 0 0 unless $fidids
284 0 0 if $self->dstate->is_perm_dead and $newstate eq 'alive'
299 0 0 unless $path =~ /^http/
300 0 0 unless $path =~ m[/dev(\d+)/(\d+)/(\d\d\d)/(\d\d\d)/\d+\.fid$]
303 0 0 unless $self->id == $devid
305 0 0 if ($cb) { }