Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9124654
volume_spec.rb
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
volume_spec.rb
View Options
require
'spec_helper_acceptance'
volume_name
=
'test-volume'
if
os
[
:family
]
==
'windows'
docker_args
=
'docker_ee => true'
command
=
'"/cygdrive/c/Program Files/Docker/docker"'
elsif
'osfamily'
==
'RedHat'
docker_args
=
"repo_opt => '--enablerepo=localmirror-extras'"
command
=
'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'
end
describe
'docker volume'
do
before
(
:all
)
do
retry_on_error_matching
(
60
,
5
,
%r{connection failure running}
)
do
install_pp
=
"class { 'docker':
#{
docker_args
}
}"
apply_manifest
(
install_pp
,
catch_failures
:
true
)
end
end
it
'exposes volume subcommand'
do
run_shell
(
"
#{
command
}
volume --help"
,
expect_failures
:
false
)
end
context
'with a local volume described in Puppet'
do
it
'applies idempotently'
do
pp
=
<<-
MANIFEST
docker_volume { '#{volume_name}':
ensure => present,
}
MANIFEST
idempotent_apply
(
pp
)
end
it
'has created a volume'
do
run_shell
(
"
#{
command
}
volume inspect
#{
volume_name
}
"
,
expect_failures
:
false
)
end
after
(
:all
)
do
run_shell
(
"
#{
command
}
volume rm
#{
volume_name
}
"
)
end
end
end
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Sat, Jun 21, 7:22 PM (2 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3398484
Attached To
R205 puppet-puppetlabs-docker
Event Timeline
Log In to Comment