debian/bullseye
debian/jessie
|
Last change
on this file since e6c9e70 was 1c22429, checked in by Joachim Langenbach <joachim.langenbach@…>, 10 years ago |
- gnuboat_epd adds the apt repository from gnuboat to install epd-fuse package
|
-
Property mode
set to
100644
|
|
File size:
1.4 KB
|
| Line | |
|---|
| 1 | require 'spec_helper_acceptance'
|
|---|
| 2 |
|
|---|
| 3 | describe 'apt class' do
|
|---|
| 4 |
|
|---|
| 5 | context 'reset' do
|
|---|
| 6 | it 'fixes the sources.list' do
|
|---|
| 7 | shell('cp /etc/apt/sources.list /tmp')
|
|---|
| 8 | end
|
|---|
| 9 | end
|
|---|
| 10 |
|
|---|
| 11 | context 'all the things' do
|
|---|
| 12 | it 'should work with no errors' do
|
|---|
| 13 | pp = <<-EOS
|
|---|
| 14 | if $::lsbdistcodename == 'lucid' {
|
|---|
| 15 | $sources = undef
|
|---|
| 16 | } else {
|
|---|
| 17 | $sources = {
|
|---|
| 18 | 'puppetlabs' => {
|
|---|
| 19 | 'ensure' => present,
|
|---|
| 20 | 'location' => 'http://apt.puppetlabs.com',
|
|---|
| 21 | 'repos' => 'main',
|
|---|
| 22 | 'key' => {
|
|---|
| 23 | 'id' => '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30',
|
|---|
| 24 | 'server' => 'pgp.mit.edu',
|
|---|
| 25 | },
|
|---|
| 26 | },
|
|---|
| 27 | }
|
|---|
| 28 | }
|
|---|
| 29 | class { 'apt':
|
|---|
| 30 | update => {
|
|---|
| 31 | 'frequency' => 'always',
|
|---|
| 32 | 'timeout' => '400',
|
|---|
| 33 | 'tries' => '3',
|
|---|
| 34 | },
|
|---|
| 35 | purge => {
|
|---|
| 36 | 'sources.list' => true,
|
|---|
| 37 | 'sources.list.d' => true,
|
|---|
| 38 | 'preferences' => true,
|
|---|
| 39 | 'preferences.d' => true,
|
|---|
| 40 | },
|
|---|
| 41 | sources => $sources,
|
|---|
| 42 | }
|
|---|
| 43 | EOS
|
|---|
| 44 |
|
|---|
| 45 | apply_manifest(pp, :catch_failures => true)
|
|---|
| 46 | apply_manifest(pp, :catch_failures => true)
|
|---|
| 47 | end
|
|---|
| 48 | it 'should still work' do
|
|---|
| 49 | shell('apt-get update')
|
|---|
| 50 | shell('apt-get -y --force-yes upgrade')
|
|---|
| 51 | end
|
|---|
| 52 | end
|
|---|
| 53 |
|
|---|
| 54 | context 'reset' do
|
|---|
| 55 | it 'fixes the sources.list' do
|
|---|
| 56 | shell('cp /tmp/sources.list /etc/apt')
|
|---|
| 57 | end
|
|---|
| 58 | end
|
|---|
| 59 |
|
|---|
| 60 | end
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.