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 'fix_pin_quotes' into 1.4.x
[puppet-modules/puppetlabs-apt.git]
/
spec
/
acceptance
/
apt_spec.rb
diff --git
a/spec/acceptance/apt_spec.rb
b/spec/acceptance/apt_spec.rb
index 4dbb54a0e98163b4ad9aafdeb8ec26366556ec47..775139145ec8b575543210ebb7b5e3f4e6782359 100644
(file)
--- a/
spec/acceptance/apt_spec.rb
+++ b/
spec/acceptance/apt_spec.rb
@@
-1,6
+1,12
@@
require 'spec_helper_acceptance'
require 'spec_helper_acceptance'
-describe 'apt class' do
+describe 'apt class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
+
+ context 'reset' do
+ it 'fixes the sources.list' do
+ shell('cp /etc/apt/sources.list /tmp')
+ end
+ end
context 'always_apt_update => true' do
it 'should work with no errors' do
context 'always_apt_update => true' do
it 'should work with no errors' do
@@
-62,7
+68,7
@@
describe 'apt class' do
pp = <<-EOS
class { 'apt':
proxy_host => 'localhost',
pp = <<-EOS
class { 'apt':
proxy_host => 'localhost',
- proxy_port => '
8080
',
+ proxy_port => '
7042
',
}
EOS
}
EOS
@@
-71,7
+77,7
@@
describe 'apt class' do
describe file('/etc/apt/apt.conf.d/proxy') do
it { should be_file }
describe file('/etc/apt/apt.conf.d/proxy') do
it { should be_file }
- it { should contain 'Acquire::http::Proxy "http://localhost:
8080
\";' }
+ it { should contain 'Acquire::http::Proxy "http://localhost:
7042
\";' }
end
end
end
end
@@
-104,7
+110,7
@@
describe 'apt class' do
pp = <<-EOS
class { 'apt':
proxy_host => 'localhost',
pp = <<-EOS
class { 'apt':
proxy_host => 'localhost',
- proxy_port => '
8080
',
+ proxy_port => '
7042
',
}
EOS
}
EOS
@@
-113,7
+119,7
@@
describe 'apt class' do
describe file('/etc/apt/apt.conf.d/proxy') do
it { should be_file }
describe file('/etc/apt/apt.conf.d/proxy') do
it { should be_file }
- it { should contain 'Acquire::http::Proxy "http://localhost:
8080
\";' }
+ it { should contain 'Acquire::http::Proxy "http://localhost:
7042
\";' }
end
end
end
end
@@
-217,4
+223,11
@@
describe 'apt class' do
end
end
end
end
end
end
+
+ context 'reset' do
+ it 'fixes the sources.list' do
+ shell('cp /tmp/sources.list /etc/apt')
+ end
+ end
+
end
end