2013-09-13 19:13:59 +02:00
|
|
|
describe 'mysql::client' do
|
2014-07-25 20:32:00 +02:00
|
|
|
fail ArgumentError, "Puppet facts missing" if Dir["spec/fixtures/modules/puppet_facts/PE3.3/*"].empty?
|
|
|
|
Dir["spec/fixtures/modules/puppet_facts/PE3.3/*"].each do |facts|
|
|
|
|
platform_name = facts.gsub(/\.facts/, '')
|
|
|
|
describe "on #{platform_name}" do
|
|
|
|
hash = {}
|
|
|
|
File.read(facts).each_line do |line|
|
|
|
|
key, value = line.split(' => ')
|
|
|
|
hash[key.to_sym] = value.chomp unless value.nil?
|
|
|
|
end
|
|
|
|
let(:facts) { hash }
|
2013-09-13 19:13:59 +02:00
|
|
|
|
2014-07-25 20:32:00 +02:00
|
|
|
context 'with defaults' do
|
|
|
|
it { should_not contain_class('mysql::bindings') }
|
|
|
|
it { should contain_package('mysql_client') }
|
|
|
|
end
|
2013-09-13 19:13:59 +02:00
|
|
|
|
2014-07-25 20:32:00 +02:00
|
|
|
context 'with bindings enabled' do
|
|
|
|
let(:params) {{ :bindings_enable => true }}
|
2013-09-13 19:13:59 +02:00
|
|
|
|
2014-07-25 20:32:00 +02:00
|
|
|
it { should contain_class('mysql::bindings') }
|
|
|
|
it { should contain_package('mysql_client') }
|
|
|
|
end
|
|
|
|
end
|
2013-09-13 19:13:59 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|