Skip to content

Commit 71c40bc

Browse files
Mark Wilsonmihaibuzgau
authored andcommitted
CLOUD-1854-Fixing github issue #213
# Conflicts: # spec/classes/docker_windows_spec.rb
1 parent ee32631 commit 71c40bc

File tree

5 files changed

+25
-4
lines changed

5 files changed

+25
-4
lines changed

manifests/init.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@
595595
contain 'docker::config'
596596
contain 'docker::service'
597597

598-
Class['docker::repos'] -> Class['docker::install'] -> Class['docker::config'] ~> Class['docker::service']
598+
Class['docker::repos'] -> Class['docker::install'] -> Class['docker::config'] -> Class['docker::service']
599599
Class['docker'] -> Docker::Registry <||> -> Docker::Image <||>
600600
Class['docker'] -> Docker::Image <||>
601601
Class['docker'] -> Docker::Run <||>

spec/acceptance/docker_spec.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@
55
service_name = 'docker'
66
command = 'docker'
77

8+
context 'When adding system user' do
9+
let(:pp) {"
10+
class { 'docker':
11+
docker_users => ['user1']
12+
}
13+
"}
14+
15+
it 'the docker daemon' do
16+
apply_manifest(pp, :catch_failures=>true) do |r|
17+
expect(r.stdout).to_not match(/docker-systemd-reload-before-service/)
18+
end
19+
end
20+
end
21+
822
context 'with default parameters' do
923
let(:pp) {"
1024
class { 'docker':

spec/classes/docker_spec.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,8 +422,7 @@
422422
it { should compile.with_all_deps }
423423
it { should contain_class('docker::repos').that_comes_before('Class[docker::install]') }
424424
it { should contain_class('docker::install').that_comes_before('Class[docker::config]') }
425-
it { should contain_class('docker::service').that_subscribes_to('Class[docker::config]') }
426-
it { should contain_class('docker::config') }
425+
it { should contain_class('docker::config').that_comes_before('Class[docker::service]') }
427426

428427
it { should contain_file(service_config_file).without_content(/icc=/) }
429428

spec/defines/services_spec.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,12 @@
7171
it { is_expected.to compile.with_all_deps }
7272
it { should contain_exec('test_service docker service remove').with_command(/docker service rm/) }
7373
end
74+
75+
context 'when adding a system user' do
76+
let(:params) { {
77+
'user' => ['user1'],
78+
} }
79+
it { is_expected.to compile.with_all_deps }
80+
it { should_not contain_exec('docker-systemd-reload-before-service') }
81+
end
7482
end

spec/defines/system_user_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
:operatingsystemmajrelease => '8',
1212
:os => { :distro => { :codename => 'wheezy' }, :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' } }
1313
} }
14-
14+
1515
context 'with default' do
1616
let(:params) { {'create_user' => true} }
1717
it { should contain_user('testuser') }

0 commit comments

Comments
 (0)