File tree 4 files changed +1
-26
lines changed
lib/puppet/provider/docker_compose
4 files changed +1
-26
lines changed Original file line number Diff line number Diff line change 14
14
end
15
15
16
16
has_command ( :docker_compose , command ( :dockercompose ) ) do
17
- Dir . mkdir ( '/tmp_docker' ) unless Dir . exist? ( '/tmp_docker' )
18
- ENV . store ( 'TMPDIR' , '/tmp_docker' )
17
+ environment ( HOME : '/root' )
19
18
end
20
19
21
20
def exists?
Original file line number Diff line number Diff line change 196
196
}
197
197
else
198
198
it {
199
- # Stub /tmp_docker dir to prevent shelling out during spec test
200
- allow ( Dir ) . to receive ( :exist? ) . and_wrap_original do |original_method , a |
201
- original_method . call ( a )
202
- end
203
- allow ( Dir ) . to receive ( :exist? ) . with ( '/tmp_docker' ) . and_return ( true )
204
-
205
199
is_expected . to contain_class ( 'docker::repos' ) . that_comes_before ( 'Class[docker::install]' )
206
200
is_expected . to contain_class ( 'docker::install' ) . that_comes_before ( 'Class[docker::config]' )
207
201
is_expected . to contain_class ( 'docker::config' ) . that_comes_before ( 'Class[docker::service]' )
Original file line number Diff line number Diff line change 2
2
3
3
require 'spec_helper'
4
4
5
- # Stub /tmp_docker dir to prevent shelling out during spec test
6
- class Dir
7
- class << self
8
- def exist? ( var )
9
- return true if var == '/tmp_docker'
10
- end
11
- end
12
- end
13
-
14
5
tests = {
15
6
'with ensure => absent' => {
16
7
'ensure' => 'absent' ,
Original file line number Diff line number Diff line change 2
2
3
3
require 'spec_helper'
4
4
5
- # Stub /tmp_docker dir to prevent shelling out during spec test
6
- class Dir
7
- class << self
8
- def exist? ( var )
9
- return true if var == '/tmp_docker'
10
- end
11
- end
12
- end
13
-
14
5
compose = Puppet ::Type . type ( :docker_compose )
15
6
16
7
describe compose do
You can’t perform that action at this time.
0 commit comments