X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Facceptance%2Fapt_spec.rb;h=60def0e1544cd6ff86bc982bd36f6e25dc8d5b3d;hb=71ebb94283618ca99faf9c3fd9d65557f2d774d6;hp=f89976e4000cbbf53dda2340c5159695b52c7dc0;hpb=81a3f9d60ca927b59ad6f29d3efccfe32caaae2c;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/spec/acceptance/apt_spec.rb b/spec/acceptance/apt_spec.rb index f89976e..60def0e 100644 --- a/spec/acceptance/apt_spec.rb +++ b/spec/acceptance/apt_spec.rb @@ -217,10 +217,7 @@ describe 'apt class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily') end describe file('/etc/apt/preferences') do - it { should be_file } - it 'is managed by Puppet' do - shell("grep 'Explanation' /etc/apt/preferences", {:acceptable_exit_codes => 0}) - end + it { should_not be_file } end end end @@ -274,6 +271,34 @@ describe 'apt class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily') end end + context 'fancy_progress => true' do + it 'should work with no errors' do + pp = <<-EOS + class { 'apt': fancy_progress => true } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/99progressbar') do + it { should be_file } + it { should contain 'Dpkg::Progress-Fancy "1";' } + end + end + context 'fancy_progress => false' do + it 'should work with no errors' do + pp = <<-EOS + class { 'apt': fancy_progress => false } + EOS + + apply_manifest(pp, :catch_failures => true) + end + + describe file('/etc/apt/apt.conf.d/99progressbar') do + it { should_not be_file } + end + end + context 'reset' do it 'fixes the sources.list' do shell('cp /tmp/sources.list /etc/apt')