Autorequire tacker package by tacker_config

This patch ensure that tacker package which provide configuration files
will be installed before tacker_config will try change those files.

Signed-off-by: Michal Skalski <mskalski@mirantis.com>
This commit is contained in:
Michal Skalski 2016-03-14 19:52:46 +01:00
parent 1def594f3f
commit acc5ffbdc8
2 changed files with 5 additions and 1 deletions

View File

@ -39,4 +39,8 @@ Puppet::Type.newtype(:tacker_config) do
defaultto false
end
autorequire(:package) do
'tacker'
end
end

View File

@ -52,7 +52,7 @@ describe 'Puppet::Type.type(:tacker_config)' do
it 'should autorequire the package that install the file' do
catalog = Puppet::Resource::Catalog.new
package = Puppet::Type.type(:package).new(:name => 'tacker-common')
package = Puppet::Type.type(:package).new(:name => 'tacker')
catalog.add_resource package, @tacker_config
dependency = @tacker_config.autorequire
expect(dependency.size).to eq(1)