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 linux mint debian edition" do
78 'lsbdistcodename' => 'debian',
79 'lsbdistid' => 'LinuxMint',
83 it { should contain_apt__source('backports').with({
84 'location' => 'http://ftp.debian.org/debian/',
85 'release' => 'wheezy-backports',
86 'repos' => 'main contrib non-free',
88 'key_server' => 'pgp.mit.edu',
94 describe "when turning on backports for linux mint 17 (ubuntu-based)" do
98 'lsbdistcodename' => 'qiana',
99 'lsbdistid' => 'LinuxMint',
103 it { should contain_apt__source('backports').with({
104 'location' => 'http://us.archive.ubuntu.com/ubuntu',
105 'release' => 'trusty-backports',
106 'repos' => 'main universe multiverse restricted',
108 'key_server' => 'pgp.mit.edu',
114 describe "when turning on backports for debian squeeze but using your own mirror" do
118 'lsbdistcodename' => 'Squeeze',
119 'lsbdistid' => 'Debian'
124 'http://mirrors.example.com/debian-backports'
128 { 'location' => location }
131 it { should contain_apt__source('backports').with({
132 'location' => location,
133 'release' => 'squeeze-backports',
134 'repos' => 'main contrib non-free',
136 'key_server' => 'pgp.mit.edu',