Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding in acceptance test for storage driver #269

Merged
merged 1 commit into from
Jul 11, 2018
Merged
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
22 changes: 22 additions & 0 deletions spec/acceptance/docker_full_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
default_docker_exec_lr_command = 'cmd /c "ping 127.0.0.1 -t > c:\windows\temp\test_file.txt"'
default_docker_exec_command = 'cmd /c "echo test > c:\windows\temp\test_file.txt"'
docker_mount_path = "c:/windows/temp"
storage_driver = "windowsfilter"
else
docker_ee_arg = ''
default_image = 'alpine'
Expand All @@ -29,6 +30,7 @@
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 = "overlay2"
end

describe 'the Puppet Docker module' do
Expand Down Expand Up @@ -136,6 +138,26 @@ class { 'docker': #{docker_ee_arg} }
end
end

context 'passing a storage driver' do
before(:all) do
@pp=<<-EOS
class {'docker':
#{docker_ee_arg},
storage_driver => "#{storage_driver}",
}
EOS

apply_manifest(@pp, :catch_failures => true)
sleep 15
end

it 'should result in the docker daemon being configured with the specified storage driver' do
shell("#{docker_command} info -f \"{{ .Driver}}\"") do |r|
expect(r.stdout).to match (/#{storage_driver}/)
end
end
end

context 'passing a TCP address to bind to' do
before(:all) do
@pp =<<-EOS
Expand Down