File Coverage

tfiles/service/fake-http-service2
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 16 16 100.0


line stmt bran cond sub pod time code
1             # vim: ft=perl
2              
3 1     1   5 use strict;
  1         1  
  1         21  
4 1     1   2 use warnings;
  1         2  
  1         17  
5              
6 1     1   3 use Ubic::Service::Common;
  1         1  
  1         11  
7 1     1   2 use Storable;
  1         1  
  1         95  
8              
9             my $file = 'tfiles/fake-http-service2.status';
10             return Ubic::Service::Common->new({
11             start => sub {
12             store { status => 'running' } => $file;
13             },
14             stop => sub {
15             store { status => 'not running' } => $file;
16             },
17             status => sub {
18             return unless -e $file;
19             return retrieve($file)->{status};
20             },
21             port => 12347, # conflicts with fake-http-service
22             });