}
end
it { is_expected.to contain_apt__source('backports').with({
- :location => 'http://httpredir.debian.org/debian',
+ :location => 'http://deb.debian.org/debian',
:key => 'A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553',
:repos => 'main contrib non-free',
:release => 'wheezy-backports',
})
}
end
- context 'defaults on squeeze' do
- let(:facts) do
- {
- :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '6', :full => '6.0' }},
- :lsbdistid => 'Debian',
- :osfamily => 'Debian',
- :lsbdistcodename => 'squeeze',
- :puppetversion => Puppet.version,
- }
- end
- it { is_expected.to contain_apt__source('backports').with({
- :location => 'http://httpredir.debian.org/debian-backports',
- :key => 'A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553',
- :repos => 'main contrib non-free',
- :release => 'squeeze-backports',
- :pin => { 'priority' => 200, 'release' => 'squeeze-backports' },
- })
- }
- end
context 'defaults on ubuntu' do
let(:facts) do
{
it do
expect {
subject.call
- }.to raise_error(Puppet::Error, /expects a String value/)
+ }.to raise_error(Puppet::Error, /expects a/)
end
end
context 'invalid release' do
it do
expect {
subject.call
- }.to raise_error(Puppet::Error, /expects a String value/)
+ }.to raise_error(Puppet::Error, /expects a/)
end
end
context 'invalid repos' do
it do
expect {
subject.call
- }.to raise_error(Puppet::Error, /expects a String value/)
+ }.to raise_error(Puppet::Error, /expects a/)
end
end
context 'invalid key' do
it do
expect {
subject.call
- }.to raise_error(Puppet::Error, /expects a value of type String or Hash, got Boolean/)
+ }.to raise_error(Puppet::Error, /expects a/)
end
end
context 'invalid pin' do
it do
expect {
subject.call
- }.to raise_error(Puppet::Error, /expects a value of type Integer, String, or Hash, got Boolean/)
+ }.to raise_error(Puppet::Error, /expects a/)
end
end
end