Page MenuHomeSoftware Heritage

volume_spec.rb
No OneTemporary

volume_spec.rb

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

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

Event Timeline