2014-01-07 01:53:19 +01:00
|
|
|
require 'spec_helper_acceptance'
|
|
|
|
|
2014-02-24 22:52:13 +01:00
|
|
|
describe 'apt::release class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
|
2014-01-07 01:53:19 +01:00
|
|
|
context 'release_id' do
|
|
|
|
it 'should work with no errors' do
|
|
|
|
pp = <<-EOS
|
|
|
|
include apt
|
|
|
|
class { 'apt::release': release_id => 'precise', }
|
|
|
|
EOS
|
|
|
|
|
|
|
|
apply_manifest(pp, :catch_failures => true)
|
|
|
|
end
|
|
|
|
|
|
|
|
describe file('/etc/apt/apt.conf.d/01release') do
|
|
|
|
it { should be_file }
|
|
|
|
it { should contain 'APT::Default-Release "precise";' }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2014-01-10 00:26:32 +01:00
|
|
|
context 'reset' do
|
|
|
|
it 'cleans up' do
|
|
|
|
shell('rm -rf /etc/apt/apt.conf.d/01release')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2014-01-07 01:53:19 +01:00
|
|
|
end
|