Skip to content

Commit

Permalink
removed redundant code, fixes centos repo (#413)
Browse files Browse the repository at this point in the history
  • Loading branch information
davejrt authored and florindragos committed Jan 17, 2019
1 parent 56d0241 commit 3ece32c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 22 deletions.
10 changes: 6 additions & 4 deletions spec/acceptance/compose_v3_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
tmp_path = 'C:/cygwin64/tmp'
test_container = 'nanoserver-sac2016'
else
if fact('osfamily') == 'RedHat'
docker_args = "repo_opt => '--enablerepo=localmirror-everything'"
if fact('os.name') == 'RedHat'
docker_args = "repo_opt => '--enablerepo=localmirror-extras'"
elsif fact('os.name') == 'Centos'
docker_args = "repo_opt => '--enablerepo=localmirror-extras'"
else
docker_args = ''
end
Expand All @@ -18,12 +20,12 @@
test_container = 'debian'
end

describe 'docker compose' do
describe 'docker compose' do
before(:all) do
retry_on_error_matching(60, 5, /connection failure running/) do
install_code = <<-code
class { 'docker': #{docker_args} }
class { 'docker::compose':
class { 'docker::compose':
version => '1.23.2',
}
code
Expand Down
28 changes: 10 additions & 18 deletions spec/acceptance/docker_full_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'spec_helper_acceptance'

if fact('operatingsystem') == 'windows'
if fact('kernel') == 'windows'
docker_args = 'docker_ee => true'
default_image = 'microsoft/nanoserver'
default_image_tag = '10.0.14393.2189'
Expand All @@ -18,23 +18,12 @@
default_docker_exec_command = 'cmd /c "echo test > c:\windows\temp\test_file.txt"'
docker_mount_path = 'C:/Users/Administrator/AppData/Local/Temp'
storage_driver = "windowsfilter"
elsif fact('operatingsystem') =~ (/RedHat|CentOS/)
docker_args = "repo_opt => '--enablerepo=localmirror-everything'"
default_image = 'alpine'
second_image = 'busybox'
default_image_tag = '3.7'
default_digest = 'sha256:3dcdb92d7432d56604d4545cbd324b14e647b313626d99b889d0626de158f73a'
default_dockerfile = '/root/Dockerfile'
dockerfile_test = "#{default_dockerfile}_test.txt"
docker_command = "docker"
default_docker_run_arg = ''
default_run_command = "init"
default_docker_exec_lr_command = '/bin/sh -c "touch /root/test_file.txt; while true; do echo hello world; sleep 1; done"'
default_docker_exec_command = 'touch /root/test_file.txt'
docker_mount_path = "/root"
storage_driver = "devicemapper"
else
docker_args = ''
if fact('os.family') == 'RedHat'
docker_args = "repo_opt => '--enablerepo=localmirror-extras'"
else
docker_args = ''
end
default_image = 'alpine'
second_image = 'busybox'
default_image_tag = '3.7'
Expand All @@ -47,8 +36,11 @@
default_docker_exec_lr_command = '/bin/sh -c "touch /root/test_file.txt; while true; do echo hello world; sleep 1; done"'
default_docker_exec_command = 'touch /root/test_file.txt'
docker_mount_path = "/root"
if fact('os.release.major') =~ (/14.04|^8$/)
storage_driver = "devicemapper"
if fact('os.family') == 'Debian' && fact('os.release.major') =~ (/14.04|^8$/)
storage_driver = "aufs"
elsif fact('os.family') == 'RedHat'
storage_driver = "devicemapper"
else
storage_driver = "overlay2"
end
Expand Down

0 comments on commit 3ece32c

Please sign in to comment.