-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': always_apt_update => true }
- EOS
-
- apply_manifest(pp, :catch_failures => true) do |r|
- expect(r.stdout).to match(/apt_update/)
- end
- end
- end
- context 'always_apt_update => false' do
- it 'should work with no errors' do
- pp = <<-EOS
- class { 'apt': always_apt_update => false }
- EOS
-
- apply_manifest(pp, :catch_failures => true) do |r|
- expect(r.stdout).to_not match(/apt_update/)
- end
- end
- end
-
- # disable_keys drops in a 99unauth file to ignore keys in
- # other files.
- context 'disable_keys => true' do
- it 'should work with no errors' do
- pp = <<-EOS
- class { 'apt': disable_keys => true }
- EOS
-
- apply_manifest(pp, :catch_failures => true)
- end
-
- describe file('/etc/apt/apt.conf.d/99unauth') do
- it { should be_file }
- it { should contain 'APT::Get::AllowUnauthenticated 1;' }
- end
- end
- context 'disable_keys => false' do
- it 'should work with no errors' do
- pp = <<-EOS
- class { 'apt': disable_keys => false }
- EOS
-
- apply_manifest(pp, :catch_failures => true)
- end
-
- describe file('/etc/apt/apt.conf.d/99unauth') do
- it { should_not be_file }
- end
- end
-
- # proxy_host sets the proxy to use for transfers.
- # proxy_port sets the proxy port to use.
- context 'proxy settings' do
- it 'should work with no errors' do
- pp = <<-EOS
- class { 'apt':
- proxy_host => 'localhost',
- proxy_port => '7042',
+MAX_TIMEOUT_RETRY = 3
+TIMEOUT_RETRY_WAIT = 5
+TIMEOUT_ERROR_MATCHER = %r{no valid OpenPGP data found}
+
+everything_everything_pp = <<-MANIFEST
+ if $::lsbdistcodename == 'lucid' {
+ $sources = undef
+ } else {
+ $sources = {
+ 'puppetlabs' => {
+ 'ensure' => present,
+ 'location' => 'http://apt.puppetlabs.com',
+ 'repos' => 'main',
+ 'key' => {
+ 'id' => '6F6B15509CF8E59E6E469F327F438280EF8D349F',
+ 'server' => 'hkps.pool.sks-keyservers.net',
+ },
+ },
+ }