Merge pull request #329 from spuder/spuder/lsbdist

Adds check to params.pp if lab-release is not installed
This commit is contained in:
Morgan Haskel 2014-07-29 19:24:30 -04:00
commit 256a63b407
2 changed files with 15 additions and 0 deletions

View file

@ -49,6 +49,9 @@ class apt::params {
}
}
}
'': {
fail('Unable to determine lsbdistid, is lsb-release installed?')
}
default: {
fail("Unsupported lsbdistid (${::lsbdistid})")
}

View file

@ -24,4 +24,16 @@ describe 'apt::params', :type => :class do
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