diff --git a/manifests/params.pp b/manifests/params.pp index f635b58..d57b801 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -49,6 +49,9 @@ class apt::params { } } } + '': { + fail('Unable to determine lsbdistid, is lsb-release installed?') + } default: { fail("Unsupported lsbdistid (${::lsbdistid})") } diff --git a/spec/classes/params_spec.rb b/spec/classes/params_spec.rb index aa330bb..d85e849 100644 --- a/spec/classes/params_spec.rb +++ b/spec/classes/params_spec.rb @@ -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