1
0
mirror of https://github.com/krislamo/puppet-fluentd synced 2024-12-16 05:10:36 +00:00

use rspec-puppet-facts for fluentd_repo_spec

This commit is contained in:
Max Wilhelm 2017-08-14 17:55:27 +02:00
parent 41a617c156
commit 754cd4a696

View File

@ -1,30 +1,21 @@
require 'spec_helper' require 'spec_helper'
describe 'fluentd::repo', :type => :class do describe 'fluentd::repo', :type => :class do
on_supported_os.each do |os, facts|
context "on #{os}" do
let :facts do
facts
end
context 'when called with no parameters on osfamily Debian' do describe 'when called with no parameters' do
let(:facts) { case facts[:osfamily]
{ when 'Debian'
:osfamily => 'Debian', it { is_expected.to contain_class('fluentd::repo::apt') }
:lsbdistid => 'Ubuntu', when 'RedHat'
:operatingsystem => 'Ubuntu', it { is_expected.to contain_class('fluentd::repo::yum') }
:lsbdistcodename => 'precise', end
:architecture => 'amd64', end
} end
}
it {
should contain_class('fluentd::repo::apt')
}
end
context 'when called with no parameters on osfamily RedHat' do
let(:facts) {
{
:osfamily => 'RedHat',
}
}
it {
should contain_class('fluentd::repo::yum')
}
end end
end end