/usr/share/puppet/modules.available/puppet-community-mcollective/spec/defines/mcollective__plugin_spec.rb is in puppet-module-puppet-community-mcollective 0.6.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | require 'spec_helper'
describe 'mcollective::plugin' do
let(:title) { 'fishcakes' }
context '#source' do
context 'default (unset)' do
it { should contain_datacat_fragment('mcollective::plugin fishcakes') }
it { should contain_datacat_fragment('mcollective::plugin fishcakes').with_target('mcollective::site_libdir') }
it { should contain_datacat_fragment('mcollective::plugin fishcakes').with_data('source_path' => ['puppet:///modules/mcollective/plugins/fishcakes']) }
end
context 'set' do
let(:params) { { :source => 'puppet:///modules/my_module/fishcakes' } }
it { should contain_datacat_fragment('mcollective::plugin fishcakes') }
it { should contain_datacat_fragment('mcollective::plugin fishcakes').with_target('mcollective::site_libdir') }
it { should contain_datacat_fragment('mcollective::plugin fishcakes').with_data('source_path' => ['puppet:///modules/my_module/fishcakes']) }
end
end
context '#package' do
context 'default (false)' do
it { should_not contain_package('mcollective-fishcakes-agent') }
it { should_not contain_package('mcollective-fishcakes-client') }
end
context 'true' do
let(:params) { { :package => true } }
it { should contain_package('mcollective-fishcakes-agent') }
context '#client' do
context 'default (false)' do
it { should_not contain_package('mcollective-fishcakes-client') }
end
context 'true' do
let(:params) { { :package => true, :client => true } }
it { should contain_package('mcollective-fishcakes-client') }
end
end
end
end
end
|