tfiles/service/fake-http-service2

filter: Statementstmt 100% 12 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 16 / 16 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« tfiles/service/fake-http-service ↑ Summary tfiles/service/sleeping-common »
1 # vim: ft=perl
2  
3 88 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 88 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 88 ▶use Ubic::Service::Common;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 88 ▶use Storable;
Subroutine BEGIN: called CC=1 SCAR=0.0
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 });
« tfiles/service/fake-http-service ↑ Summary tfiles/service/sleeping-common »