(maint) clean up key_compat_specs
This commit is contained in:
parent
c4899127ee
commit
5e0128cc86
1 changed files with 25 additions and 19 deletions
|
@ -17,8 +17,8 @@ describe 'apt::key', :type => :define do
|
||||||
|
|
||||||
describe 'normal operation' do
|
describe 'normal operation' do
|
||||||
describe 'default options' do
|
describe 'default options' do
|
||||||
it 'contains the apt_key' do
|
it {
|
||||||
should contain_apt_key(title).with({
|
is_expected.to contain_apt_key(title).with({
|
||||||
:id => title,
|
:id => title,
|
||||||
:ensure => 'present',
|
:ensure => 'present',
|
||||||
:source => nil,
|
:source => nil,
|
||||||
|
@ -26,9 +26,9 @@ describe 'apt::key', :type => :define do
|
||||||
:content => nil,
|
:content => nil,
|
||||||
:keyserver_options => nil,
|
:keyserver_options => nil,
|
||||||
})
|
})
|
||||||
end
|
}
|
||||||
it 'contains the apt_key present anchor' do
|
it 'contains the apt_key present anchor' do
|
||||||
should contain_anchor("apt_key #{title} present")
|
is_expected.to contain_anchor("apt_key #{title} present")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ describe 'apt::key', :type => :define do
|
||||||
} end
|
} end
|
||||||
|
|
||||||
it 'contains the apt_key' do
|
it 'contains the apt_key' do
|
||||||
should contain_apt_key(title).with({
|
is_expected.to contain_apt_key(title).with({
|
||||||
:id => GPG_KEY_ID,
|
:id => GPG_KEY_ID,
|
||||||
:ensure => 'present',
|
:ensure => 'present',
|
||||||
:source => nil,
|
:source => nil,
|
||||||
|
@ -52,7 +52,7 @@ describe 'apt::key', :type => :define do
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
it 'contains the apt_key present anchor' do
|
it 'contains the apt_key present anchor' do
|
||||||
should contain_anchor("apt_key #{GPG_KEY_ID} present")
|
is_expected.to contain_anchor("apt_key #{GPG_KEY_ID} present")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ describe 'apt::key', :type => :define do
|
||||||
} end
|
} end
|
||||||
|
|
||||||
it 'contains the apt_key' do
|
it 'contains the apt_key' do
|
||||||
should contain_apt_key(title).with({
|
is_expected.to contain_apt_key(title).with({
|
||||||
:id => title,
|
:id => title,
|
||||||
:ensure => 'absent',
|
:ensure => 'absent',
|
||||||
:source => nil,
|
:source => nil,
|
||||||
|
@ -72,7 +72,7 @@ describe 'apt::key', :type => :define do
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
it 'contains the apt_key absent anchor' do
|
it 'contains the apt_key absent anchor' do
|
||||||
should contain_anchor("apt_key #{title} absent")
|
is_expected.to contain_anchor("apt_key #{title} absent")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ describe 'apt::key', :type => :define do
|
||||||
} end
|
} end
|
||||||
|
|
||||||
it 'contains the apt_key' do
|
it 'contains the apt_key' do
|
||||||
should contain_apt_key(title).with({
|
is_expected.to contain_apt_key(title).with({
|
||||||
:id => title,
|
:id => title,
|
||||||
:ensure => 'present',
|
:ensure => 'present',
|
||||||
:source => 'http://apt.puppetlabs.com/pubkey.gpg',
|
:source => 'http://apt.puppetlabs.com/pubkey.gpg',
|
||||||
|
@ -95,7 +95,7 @@ describe 'apt::key', :type => :define do
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
it 'contains the apt_key present anchor' do
|
it 'contains the apt_key present anchor' do
|
||||||
should contain_anchor("apt_key #{title} present")
|
is_expected.to contain_anchor("apt_key #{title} present")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ describe 'apt::key', :type => :define do
|
||||||
:key_server => 'p-gp.m-it.edu',
|
:key_server => 'p-gp.m-it.edu',
|
||||||
} end
|
} end
|
||||||
it 'contains the apt_key' do
|
it 'contains the apt_key' do
|
||||||
should contain_apt_key(title).with({
|
is_expected.to contain_apt_key(title).with({
|
||||||
:id => title,
|
:id => title,
|
||||||
:server => 'p-gp.m-it.edu',
|
:server => 'p-gp.m-it.edu',
|
||||||
})
|
})
|
||||||
|
@ -118,7 +118,7 @@ describe 'apt::key', :type => :define do
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
it 'contains the apt_key' do
|
it 'contains the apt_key' do
|
||||||
should contain_apt_key(title).with({
|
is_expected.to contain_apt_key(title).with({
|
||||||
:id => title,
|
:id => title,
|
||||||
:server => 'hkp://pgp.mit.edu',
|
:server => 'hkp://pgp.mit.edu',
|
||||||
})
|
})
|
||||||
|
@ -131,7 +131,7 @@ describe 'apt::key', :type => :define do
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
it 'contains the apt_key' do
|
it 'contains the apt_key' do
|
||||||
should contain_apt_key(title).with({
|
is_expected.to contain_apt_key(title).with({
|
||||||
:id => title,
|
:id => title,
|
||||||
:server => 'hkp://pgp.mit.edu:80',
|
:server => 'hkp://pgp.mit.edu:80',
|
||||||
})
|
})
|
||||||
|
@ -286,19 +286,22 @@ describe 'apt::key', :type => :define do
|
||||||
"#{super()}\napt::key { 'duplicate': key => '#{title}', }"
|
"#{super()}\napt::key { 'duplicate': key => '#{title}', }"
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'contains two apt::key resources' do
|
it 'contains the duplicate apt::key resource' do
|
||||||
should contain_apt__key('duplicate').with({
|
is_expected.to contain_apt__key('duplicate').with({
|
||||||
:key => title,
|
:key => title,
|
||||||
:ensure => 'present',
|
:ensure => 'present',
|
||||||
})
|
})
|
||||||
should contain_apt__key(title).with({
|
end
|
||||||
|
|
||||||
|
it 'contains the original apt::key resource' do
|
||||||
|
is_expected.to contain_apt__key(title).with({
|
||||||
:id => title,
|
:id => title,
|
||||||
:ensure => 'present',
|
:ensure => 'present',
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'contains only a single apt_key' do
|
it 'contains the native apt_key' do
|
||||||
should contain_apt_key('duplicate').with({
|
is_expected.to contain_apt_key('duplicate').with({
|
||||||
:id => title,
|
:id => title,
|
||||||
:ensure => 'present',
|
:ensure => 'present',
|
||||||
:source => nil,
|
:source => nil,
|
||||||
|
@ -306,7 +309,10 @@ describe 'apt::key', :type => :define do
|
||||||
:content => nil,
|
:content => nil,
|
||||||
:keyserver_options => nil,
|
:keyserver_options => nil,
|
||||||
})
|
})
|
||||||
should_not contain_apt_key(title)
|
end
|
||||||
|
|
||||||
|
it 'does not contain the original apt_key' do
|
||||||
|
is_expected.not_to contain_apt_key(title)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue