Skip to content

Commit beb786f

Browse files
authored
Merge pull request #269 from puppetlabs/CLOUD-1934
adding in acceptance test for storage driver
2 parents 79b08b6 + 108ae7c commit beb786f

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

spec/acceptance/docker_full_spec.rb

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
default_docker_exec_lr_command = 'cmd /c "ping 127.0.0.1 -t > c:\windows\temp\test_file.txt"'
1717
default_docker_exec_command = 'cmd /c "echo test > c:\windows\temp\test_file.txt"'
1818
docker_mount_path = "c:/windows/temp"
19+
storage_driver = "windowsfilter"
1920
else
2021
docker_ee_arg = ''
2122
default_image = 'alpine'
@@ -29,6 +30,7 @@
2930
default_docker_exec_lr_command = '/bin/sh -c "touch /root/test_file.txt; while true; do echo hello world; sleep 1; done"'
3031
default_docker_exec_command = 'touch /root/test_file.txt'
3132
docker_mount_path = "/root"
33+
storage_driver = "overlay2"
3234
end
3335

3436
describe 'the Puppet Docker module' do
@@ -136,6 +138,26 @@ class { 'docker': #{docker_ee_arg} }
136138
end
137139
end
138140

141+
context 'passing a storage driver' do
142+
before(:all) do
143+
@pp=<<-EOS
144+
class {'docker':
145+
#{docker_ee_arg},
146+
storage_driver => "#{storage_driver}",
147+
}
148+
EOS
149+
150+
apply_manifest(@pp, :catch_failures => true)
151+
sleep 15
152+
end
153+
154+
it 'should result in the docker daemon being configured with the specified storage driver' do
155+
shell("#{docker_command} info -f \"{{ .Driver}}\"") do |r|
156+
expect(r.stdout).to match (/#{storage_driver}/)
157+
end
158+
end
159+
end
160+
139161
context 'passing a TCP address to bind to' do
140162
before(:all) do
141163
@pp =<<-EOS

0 commit comments

Comments
 (0)