lib/Rex/Virtualization/Docker/daemon.pm

filter: Statementstmt 65.0% 13 / 20 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 0.0% 0 / 1 totaltotal 53.1% 17 / 32 CC 4 SCAR 23.5
CC
4
Cov
50%
execute
20.0
BEGIN
1.0
BEGIN
1.0
CRAP 10.5
« lib/Rex/Virtualization/VBox/shutdown.pm ↑ Summary lib/Rex/Pkg/SuSE.pm »
1 #
2 # (c) Jan Gehring <jan.gehring@gmail.com>
3 #
4  
5 package Rex::Virtualization::Docker::daemon;
6  
7 1 ▶use v5.14.4;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 our $VERSION = '1.16.1'; # VERSION
11  
12 1 ▶use Rex::Logger;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 1 ▶use Rex::Helper::Run;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 0 ▶sub execute {
Subroutine execute: not called CC=4 SCAR=30.0
Pod undocumented
16 0 my ( $class, %opt ) = @_;
17  
18 0 ▶ my $bind = defined $opt{bind} ? $opt{bind} : '0.0.0.0';
Branch: 1 branch
BranchTrueFalseTotal
defined $opt{'bind'} ? : 0 0 0
19 0 ▶ my $host = defined $opt{host} ? $opt{host} : 'unix:///var/run/docker.sock';
Branch: 1 branch
BranchTrueFalseTotal
defined $opt{'host'} ? : 0 0 0
20  
21 0 Rex::Logger::debug("starting docker daemon");
22  
23 0 i_run "docker -d -H $host -ip $bind", fail_ok => 1;
24 0 ▶ if ( $? != 0 ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($? != 0) 0 0 0
25 0 die("Error starting docker daemon");
26 }
27  
28 }
29  
30 1 1;
« lib/Rex/Virtualization/VBox/shutdown.pm ↑ Summary lib/Rex/Pkg/SuSE.pm »