Code Review
/
puppet-modules
/
puppetlabs-apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge branch '1.4.x'
[puppet-modules/puppetlabs-apt.git]
/
spec
/
acceptance
/
backports_spec.rb
diff --git
a/spec/acceptance/backports_spec.rb
b/spec/acceptance/backports_spec.rb
index ffb14ce62854b99719087368463e22348f630f55..80e2093848c6114ddd5676a8bd88befb713db97e 100644
(file)
--- a/
spec/acceptance/backports_spec.rb
+++ b/
spec/acceptance/backports_spec.rb
@@
-1,5
+1,13
@@
require 'spec_helper_acceptance'
require 'spec_helper_acceptance'
+codename = fact('lsbdistcodename')
+case fact('operatingsystem')
+when 'Ubuntu'
+ repos = 'main universe multiverse restricted'
+when 'Debian'
+ repos = 'main contrib non-free'
+end
+
describe 'apt::backports class' do
context 'defaults' do
it 'should work with no errors' do
describe 'apt::backports class' do
context 'defaults' do
it 'should work with no errors' do
@@
-14,7
+22,7
@@
describe 'apt::backports class' do
context 'release' do
it 'should work with no errors' do
pp = <<-EOS
context 'release' do
it 'should work with no errors' do
pp = <<-EOS
- class { 'apt::backports': release => '
precise
' }
+ class { 'apt::backports': release => '
#{codename}
' }
EOS
apply_manifest(pp, :catch_failures => true)
EOS
apply_manifest(pp, :catch_failures => true)
@@
-22,7
+30,7
@@
describe 'apt::backports class' do
describe file('/etc/apt/sources.list.d/backports.list') do
it { should be_file }
describe file('/etc/apt/sources.list.d/backports.list') do
it { should be_file }
- it { should contain
'precise-backports main universe multiverse restricted'
}
+ it { should contain
"#{codename}-backports #{repos}"
}
end
end
end
end
@@
-37,7
+45,7
@@
describe 'apt::backports class' do
describe file('/etc/apt/sources.list.d/backports.list') do
it { should be_file }
describe file('/etc/apt/sources.list.d/backports.list') do
it { should be_file }
- it { should contain
'deb http://localhost/ubuntu precise-backports main universe multiverse restricted'
}
+ it { should contain
"deb http://localhost/ubuntu precise-backports #{repos}"
}
end
end
end
end