require 'spec_helper_acceptance'
-describe 'apt class' do
+describe 'apt class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
+
+ context 'reset' do
+ it 'fixes the sources.list' do
+ shell('cp /etc/apt/sources.list /tmp')
+ end
+ end
context 'always_apt_update => true' do
it 'should work with no errors' do
pp = <<-EOS
class { 'apt':
proxy_host => 'localhost',
- proxy_port => '8080',
+ proxy_port => '7042',
}
EOS
describe file('/etc/apt/apt.conf.d/proxy') do
it { should be_file }
- it { should contain 'Acquire::http::Proxy "http://localhost:8080\";' }
+ it { should contain 'Acquire::http::Proxy "http://localhost:7042\";' }
end
end
pp = <<-EOS
class { 'apt':
proxy_host => 'localhost',
- proxy_port => '8080',
+ proxy_port => '7042',
}
EOS
describe file('/etc/apt/apt.conf.d/proxy') do
it { should be_file }
- it { should contain 'Acquire::http::Proxy "http://localhost:8080\";' }
+ it { should contain 'Acquire::http::Proxy "http://localhost:7042\";' }
end
end
end
end
end
+
+ context 'reset' do
+ it 'fixes the sources.list' do
+ shell('cp /tmp/sources.list /etc/apt')
+ end
+ end
+
end