Skip to content

Commit

Permalink
Allow empty string for release in apt::source
Browse files Browse the repository at this point in the history
This fixes a regression from commit 0a178c3.

Some repos don't have a release. This allows using such repos.

Tests added to make sure when release is set to an empty string the
source file is rendered correctly.

All other tests are passing.
  • Loading branch information
tomduckering authored and Helen Campbell committed May 26, 2017
1 parent bb82b88 commit 03baf34
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spec/defines/source_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,19 @@
end
end

context 'release is empty string' do
let :facts do
{
:lsbdistid => 'Debian',
:osfamily => 'Debian',
:puppetversion => Puppet.version,
}
end
let(:params) { { :location => 'hello.there', :release => '' } }

it { is_expected.to contain_apt__setting('list-my_source').with_content(/hello\.there main/) }
end

context 'invalid pin' do
let :facts do
{
Expand Down

0 comments on commit 03baf34

Please sign in to comment.