0e0c6853fb
v1.8.0 47c6f338eda98ed849531d92b63c5e33103f76e4 source https://github.com/puppetlabs/puppetlabs-apt Related blueprint merge-openstack-puppet-modules Related-bug: #1443800 Change-Id: I5f86751ba9b16fdedd209677bb67e23cdb85b44f Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
40 lines
1.0 KiB
Ruby
40 lines
1.0 KiB
Ruby
require 'spec_helper'
|
|
describe 'apt::params', :type => :class do
|
|
let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian' } }
|
|
let (:title) { 'my_package' }
|
|
|
|
it { should contain_apt__params }
|
|
|
|
# There are 4 resources in this class currently
|
|
# there should not be any more resources because it is a params class
|
|
# The resources are class[apt::params], class[main], class[settings], stage[main]
|
|
it "Should not contain any resources" do
|
|
subject.resources.size.should == 4
|
|
end
|
|
|
|
describe "With unknown lsbdistid" do
|
|
|
|
let(:facts) { { :lsbdistid => 'CentOS' } }
|
|
let (:title) { 'my_package' }
|
|
|
|
it do
|
|
expect {
|
|
should compile
|
|
}.to raise_error(Puppet::Error, /Unsupported lsbdistid/)
|
|
end
|
|
|
|
end
|
|
|
|
describe "With lsb-release not installed" do
|
|
let(:facts) { { :lsbdistid => '' } }
|
|
let (:title) { 'my_package' }
|
|
|
|
it do
|
|
expect {
|
|
should compile
|
|
}.to raise_error(Puppet::Error, /Unable to determine lsbdistid, is lsb-release installed/)
|
|
end
|
|
end
|
|
|
|
end
|