2 describe 'apt::backports', :type => :class do
4 describe 'when asigning a custom priority to backports' do
7 'lsbdistcodename' => 'Karmic',
8 'lsbdistid' => 'Ubuntu'
12 context 'integer priority' do
13 let :params do { :pin_priority => 500 } end
15 it { should contain_apt__source('backports').with({
16 'location' => 'http://old-releases.ubuntu.com/ubuntu',
17 'release' => 'karmic-backports',
18 'repos' => 'main universe multiverse restricted',
20 'key_server' => 'pgp.mit.edu',
26 context 'invalid priority' do
27 let :params do { :pin_priority => 'banana' } end
29 expect { subject }.to raise_error(/must be an integer/)
34 describe 'when turning on backports for ubuntu karmic' do
38 'lsbdistcodename' => 'Karmic',
39 'lsbdistid' => 'Ubuntu'
43 it { should contain_apt__source('backports').with({
44 'location' => 'http://old-releases.ubuntu.com/ubuntu',
45 'release' => 'karmic-backports',
46 'repos' => 'main universe multiverse restricted',
48 'key_server' => 'pgp.mit.edu',
54 describe "when turning on backports for debian squeeze" do
58 'lsbdistcodename' => 'Squeeze',
59 'lsbdistid' => 'Debian',
63 it { should contain_apt__source('backports').with({
64 'location' => 'http://backports.debian.org/debian-backports',
65 'release' => 'squeeze-backports',
66 'repos' => 'main contrib non-free',
68 'key_server' => 'pgp.mit.edu',
74 describe "when turning on backports for debian squeeze but using your own mirror" do
78 'lsbdistcodename' => 'Squeeze',
79 'lsbdistid' => 'Debian'
84 'http://mirrors.example.com/debian-backports'
88 { 'location' => location }
91 it { should contain_apt__source('backports').with({
92 'location' => location,
93 'release' => 'squeeze-backports',
94 'repos' => 'main contrib non-free',
96 'key_server' => 'pgp.mit.edu',