cdb6d6b007
Unless the class `concat::setup` has been manually included into the manifest before using the `concat` / `concat::fragment` defined types, the puppet master will generate this warning while compiling the catalog. Tue Oct 15 14:05:06 -0700 2013 Scope(Concat[/etc/exports]) (warning): Could not look up qualified variable 'concat::setup::root_group'; class concat::setup has not been evaluated The need to `include concat::setup` directly into the manifest has never been part of the documented API.
37 lines
922 B
Ruby
37 lines
922 B
Ruby
require 'spec_helper'
|
|
|
|
describe 'concat::fragment', :type => :defne do
|
|
let(:title) { 'motd_header' }
|
|
|
|
let(:facts) do
|
|
{
|
|
:concat_basedir => '/var/lib/puppet/concat',
|
|
:id => 'root',
|
|
}
|
|
end
|
|
|
|
let :pre_condition do
|
|
"concat{ '/etc/motd': }"
|
|
end
|
|
|
|
context 'target => /etc/motd' do
|
|
let(:params) {{ :target => '/etc/motd' }}
|
|
it do
|
|
should contain_class('concat::setup')
|
|
should contain_concat('/etc/motd')
|
|
should contain_concat__fragment('motd_header').with({
|
|
:target => '/etc/motd',
|
|
})
|
|
should contain_file('/var/lib/puppet/concat/_etc_motd/fragments/10_motd_header' ).with({
|
|
:ensure => 'present',
|
|
:mode => '0644',
|
|
:owner => 'root',
|
|
:group => 0,
|
|
:source => nil,
|
|
:content => nil,
|
|
:backup => 'puppet',
|
|
:alias => 'concat_fragment_motd_header',
|
|
})
|
|
end
|
|
end
|
|
end
|