Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions spec/acceptance/compose_v3_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@
'nanoserver-sac2016'
end
else
docker_args = if os[:name] == 'ubuntu' && os[:release][:full] == '14.04'
"version => '18.06.1~ce~3-0~ubuntu'"
else
''
end
docker_args = ''
install_dir = '/usr/local/bin'
file_extension = ''
tmp_path = '/tmp'
Expand Down
7 changes: 1 addition & 6 deletions spec/acceptance/docker_custom_source_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,11 @@
default_docker_run_arg = "restart => 'always', net => 'nat',"
default_run_command = 'ping 127.0.0.1 -t'
docker_command = '"/cygdrive/c/Program Files/Docker/docker"'
skip = false
elsif os[:name] == 'Ubuntu' && os[:release][:full] == '14.04'
docker_args = "version => '18.06.1~ce~3-0~ubuntu'"
default_image = 'busybox'
skip = true
else
docker_args = ''
default_image = 'busybox'
skip = false
end
skip = false

describe 'the Puppet Docker module' do
context 'with download location', skip: skip do
Expand Down
12 changes: 3 additions & 9 deletions spec/acceptance/docker_full_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@
docker_mount_path = 'C:/Users/Public/DockerVolume'
storage_driver = 'windowsfilter'
else
docker_args = if os[:name] == 'ubuntu' && os[:release][:full] == '14.04'
"version => '18.06.1~ce~3-0~ubuntu'"
else
''
end
docker_args = ''
default_image = 'alpine'
second_image = 'busybox'
default_image_tag = '3.7'
Expand All @@ -45,9 +41,7 @@
default_docker_exec_command = 'touch /root/test_file.txt'
docker_mount_path = '/root'
storage_driver = 'devicemapper'
storage_driver = if os[:family] == 'Debian' && os[:release][:major] =~ %r{14.04|^8$}
'aufs'
elsif os[:family] == 'RedHat'
storage_driver = if os[:family] == 'RedHat'
'devicemapper'
else
'overlay2'
Expand Down Expand Up @@ -823,7 +817,7 @@ class { 'docker': #{docker_args} }

if os[:family] == 'windows'
apply_manifest(pp5, catch_failures: true)
elsif %r{14.04|^8$}.match?(os[:release])
elsif %r{^8$}.match?(os[:release])
apply_manifest(pp5, catch_failures: true) do |r|
expect(r.stdout).to match(%r{container_3_7_3})
end
Expand Down
6 changes: 1 addition & 5 deletions spec/acceptance/docker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@
bad_server_strip = "#{registry_host}_5001"
broken = true
else
docker_args = if os[:name] == 'ubuntu' && os[:release][:full] == '14.04'
"version => '18.06.1~ce~3-0~ubuntu'"
else
''
end
docker_args = ''
docker_registry_image = 'registry'
docker_network = 'bridge'
registry_host = '127.0.0.1'
Expand Down
3 changes: 0 additions & 3 deletions spec/acceptance/network_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
if os[:family] == 'windows'
puts 'Not implemented on Windows'
broken = true
elsif os[:name] == 'ubuntu' && os[:release][:full] == '14.04'
docker_args = "version => '18.06.1~ce~3-0~ubuntu'"
else
docker_args = ''
end

Expand Down
2 changes: 0 additions & 2 deletions spec/acceptance/plugin_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
if os[:family] == 'windows'
puts 'Not implemented on Windows'
broken = true
elsif os[:name] == 'ubuntu' && os[:release][:full] == '14.04'
docker_args = "version => '18.06.1~ce~3-0~ubuntu'"
else
docker_args = ''
end
Expand Down
6 changes: 1 addition & 5 deletions spec/acceptance/stack_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@
tmp_path = 'C:\\tmp\\'
wait_for_container_seconds = 120
else
docker_args = if os[:name] == 'ubuntu' && os[:release][:full] == '14.04'
"version => '18.06.1~ce~3-0~ubuntu'"
else
''
end
docker_args = ''
tmp_path = '/tmp/'
wait_for_container_seconds = 10
end
Expand Down
3 changes: 0 additions & 3 deletions spec/acceptance/volume_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
if os[:family] == 'windows'
docker_args = 'docker_ee => true'
command = '"/cygdrive/c/Program Files/Docker/docker"'
elsif os[:name] == 'ubuntu' && os[:release][:full] == '14.04'
docker_args = "version => '18.06.1~ce~3-0~ubuntu'"
command = 'docker'
else
docker_args = ''
command = 'docker'
Expand Down
31 changes: 9 additions & 22 deletions spec/helper/get_defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,28 +112,15 @@ def get_defaults(_facts)
case _facts[:os]['name']
when 'Ubuntu'
package_release = "ubuntu-#{_facts[:os]['distro']['codename']}"

if _facts[:os]['release']['full'] != '14.04'
service_after_override = :undef
service_config_template = 'docker/etc/sysconfig/docker.systemd.erb'
service_hasrestart = true
service_hasstatus = true
service_overrides_template = 'docker/etc/systemd/system/docker.service.d/service-overrides-debian.conf.erb'
service_provider = 'systemd'
socket_override = false
socket_overrides_template = 'docker/etc/systemd/system/docker.socket.d/socket-overrides.conf.erb'
storage_config = '/etc/default/docker-storage'
else
service_after_override = :undef
service_config_template = 'docker/etc/default/docker.erb'
service_hasrestart = false
service_hasstatus = true
service_overrides_template = :undef
service_provider = 'upstart'
socket_override = false
socket_overrides_template = :undef
storage_config = :undef
end
service_after_override = :undef
service_config_template = 'docker/etc/sysconfig/docker.systemd.erb'
service_hasrestart = true
service_hasstatus = true
service_overrides_template = 'docker/etc/systemd/system/docker.service.d/service-overrides-debian.conf.erb'
service_provider = 'systemd'
socket_override = false
socket_overrides_template = 'docker/etc/systemd/system/docker.socket.d/socket-overrides.conf.erb'
storage_config = '/etc/default/docker-storage'
else
package_release = "debian-#{_facts[:os]['distro']['codename']}"
service_after_override = :undef
Expand Down
30 changes: 14 additions & 16 deletions spec/shared_examples/params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,19 @@
shared_examples 'params' do |_facts|
case _facts[:os]['family']
when 'Debian'
if _facts[:os]['release']['full'] != '14.04'
it {
is_expected.to contain_class('docker::params')
is_expected.to contain_class('docker::systemd_reload')
is_expected.to contain_exec('docker-systemd-reload').with(
'path' => [
'/bin/',
'/sbin/',
'/usr/bin/',
'/usr/sbin/',
],
'command' => 'systemctl daemon-reload',
'refreshonly' => 'true',
)
}
end
it {
is_expected.to contain_class('docker::params')
is_expected.to contain_class('docker::systemd_reload')
is_expected.to contain_exec('docker-systemd-reload').with(
'path' => [
'/bin/',
'/sbin/',
'/usr/bin/',
'/usr/sbin/',
],
'command' => 'systemctl daemon-reload',
'refreshonly' => 'true',
)
}
end
end