bcc88b940a
While 2.x has been already released, it will most likely break our manifests in subtle ways[1]. The fix is scheduled for Puppet 5.0[2]. [1] https://tickets.puppetlabs.com/browse/MODULES-2104 [2] https://tickets.puppetlabs.com/browse/PUP-1963 Commit: 5997e65f18eb78cd7dbce818eb29354e49d5a038 Source: https://github.com/puppetlabs/puppetlabs-concat/ Implements: blueprint upgrade-openstack-puppet-modules Change-Id: Idc9bb8647d311f797ef7d3ae5a95d0b90ad00ad1
36 lines
856 B
Ruby
36 lines
856 B
Ruby
require 'spec_helper_acceptance'
|
|
|
|
describe 'concat validate_cmd parameter', :unless => (fact('kernel') != 'Linux') do
|
|
basedir = default.tmpdir('concat')
|
|
context '=> "/usr/bin/test -e %"' do
|
|
before(:all) do
|
|
pp = <<-EOS
|
|
file { '#{basedir}':
|
|
ensure => directory
|
|
}
|
|
EOS
|
|
|
|
apply_manifest(pp)
|
|
end
|
|
pp = <<-EOS
|
|
concat { '#{basedir}/file':
|
|
validate_cmd => '/usr/bin/test -e %',
|
|
}
|
|
concat::fragment { 'content':
|
|
target => '#{basedir}/file',
|
|
content => 'content',
|
|
}
|
|
EOS
|
|
|
|
it 'applies the manifest twice with no stderr' do
|
|
apply_manifest(pp, :catch_failures => true)
|
|
apply_manifest(pp, :catch_changes => true)
|
|
end
|
|
|
|
describe file("#{basedir}/file") do
|
|
it { should be_file }
|
|
it { should contain 'content' }
|
|
end
|
|
end
|
|
end
|