2 describe 'apt::backports', :type => :class do
4 describe 'when asigning a custom priority to backports' do
7 'lsbdistcodename' => 'Karmic',
8 'lsbdistid' => 'Ubuntu',
13 context 'integer priority' do
14 let :params do { :pin_priority => 500 } end
16 it { should contain_apt__source('backports').with({
17 'location' => 'http://old-releases.ubuntu.com/ubuntu',
18 'release' => 'karmic-backports',
19 'repos' => 'main universe multiverse restricted',
21 'key_server' => 'pgp.mit.edu',
27 context 'invalid priority' do
28 let :params do { :pin_priority => 'banana' } end
30 expect { subject }.to raise_error(/must be an integer/)
35 describe 'when turning on backports for ubuntu karmic' do
39 'lsbdistcodename' => 'Karmic',
40 'lsbdistid' => 'Ubuntu',
41 'osfamily' => 'Debian'
45 it { should contain_apt__source('backports').with({
46 'location' => 'http://old-releases.ubuntu.com/ubuntu',
47 'release' => 'karmic-backports',
48 'repos' => 'main universe multiverse restricted',
50 'key_server' => 'pgp.mit.edu',
56 describe "when turning on backports for debian squeeze" do
60 'lsbdistcodename' => 'Squeeze',
61 'lsbdistid' => 'Debian',
62 'osfamily' => 'Debian'
66 it { should contain_apt__source('backports').with({
67 'location' => 'http://backports.debian.org/debian-backports',
68 'release' => 'squeeze-backports',
69 'repos' => 'main contrib non-free',
71 'key_server' => 'pgp.mit.edu',
77 describe "when turning on backports for linux mint debian edition" do
81 'lsbdistcodename' => 'debian',
82 'lsbdistid' => 'LinuxMint',
83 'osfamily' => 'Debian'
87 it { should contain_apt__source('backports').with({
88 'location' => 'http://ftp.debian.org/debian/',
89 'release' => 'wheezy-backports',
90 'repos' => 'main contrib non-free',
92 'key_server' => 'pgp.mit.edu',
98 describe "when turning on backports for linux mint 17 (ubuntu-based)" do
102 'lsbdistcodename' => 'qiana',
103 'lsbdistid' => 'LinuxMint',
104 'osfamily' => 'Debian'
108 it { should contain_apt__source('backports').with({
109 'location' => 'http://us.archive.ubuntu.com/ubuntu',
110 'release' => 'trusty-backports',
111 'repos' => 'main universe multiverse restricted',
113 'key_server' => 'pgp.mit.edu',
119 describe "when turning on backports for debian squeeze but using your own mirror" do
123 'lsbdistcodename' => 'Squeeze',
124 'lsbdistid' => 'Debian',
125 'osfamily' => 'Debian'
130 'http://mirrors.example.com/debian-backports'
134 { 'location' => location }
137 it { should contain_apt__source('backports').with({
138 'location' => location,
139 'release' => 'squeeze-backports',
140 'repos' => 'main contrib non-free',
142 'key_server' => 'pgp.mit.edu',