1 require 'spec_helper_acceptance'
3 everything_everything_pp = <<-MANIFEST
7 'location' => 'http://apt.puppetlabs.com',
10 'id' => '6F6B15509CF8E59E6E469F327F438280EF8D349F',
11 'server' => 'pool.sks-keyservers.net',
17 'frequency' => 'always',
22 'sources.list' => true,
23 'sources.list.d' => true,
24 'preferences' => true,
25 'preferences.d' => true,
32 describe 'apt class' do
33 context 'with reset' do
34 it 'fixes the sources.list' do
35 run_shell('cp /etc/apt/sources.list /tmp')
39 context 'with all the things' do
40 it 'works with no errors' do
41 # Apply the manifest (Retry if timeout error is received from key pool)
42 retry_on_error_matching do
43 apply_manifest(everything_everything_pp, catch_failures: true)
47 run_shell('apt-get update')
48 run_shell('apt-get -y --force-yes upgrade')
52 context 'with reset' do
53 it 'fixes the sources.list' do
54 run_shell('cp /tmp/sources.list /etc/apt')