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
Fix syntax error
[puppet-modules/puppetlabs-apt.git]
/
spec
/
defines
/
key_compat_spec.rb
diff --git
a/spec/defines/key_compat_spec.rb
b/spec/defines/key_compat_spec.rb
index 93453a6c2b21b820b5d09839910f80bb2beddf17..7937c78db2121e6ab34486b1f3522f56576c9dc1 100644
(file)
--- a/
spec/defines/key_compat_spec.rb
+++ b/
spec/defines/key_compat_spec.rb
@@
-4,6
+4,7
@@
describe 'apt::key', :type => :define do
let(:facts) { {
:lsbdistid => 'Debian',
:osfamily => 'Debian',
let(:facts) { {
:lsbdistid => 'Debian',
:osfamily => 'Debian',
+ :puppetversion => Puppet.version,
} }
GPG_KEY_ID = '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30'
} }
GPG_KEY_ID = '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30'
@@
-17,8
+18,8
@@
describe 'apt::key', :type => :define do
describe 'normal operation' do
describe 'default options' do
describe 'normal operation' do
describe 'default options' do
- it
'contains the apt_key' do
-
should
contain_apt_key(title).with({
+ it
{
+
is_expected.to
contain_apt_key(title).with({
:id => title,
:ensure => 'present',
:source => nil,
:id => title,
:ensure => 'present',
:source => nil,
@@
-26,9
+27,9
@@
describe 'apt::key', :type => :define do
:content => nil,
:keyserver_options => nil,
})
:content => 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
+43,7
@@
describe 'apt::key', :type => :define do
} end
it 'contains the apt_key' do
} end
it 'contains the apt_key' do
-
should
contain_apt_key(title).with({
+
is_expected.to
contain_apt_key(title).with({
:id => GPG_KEY_ID,
:ensure => 'present',
:source => nil,
:id => GPG_KEY_ID,
:ensure => 'present',
:source => nil,
@@
-52,7
+53,7
@@
describe 'apt::key', :type => :define do
})
end
it 'contains the apt_key present anchor' do
})
end
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
+63,7
@@
describe 'apt::key', :type => :define do
} end
it 'contains the apt_key' do
} end
it 'contains the apt_key' do
-
should
contain_apt_key(title).with({
+
is_expected.to
contain_apt_key(title).with({
:id => title,
:ensure => 'absent',
:source => nil,
:id => title,
:ensure => 'absent',
:source => nil,
@@
-72,7
+73,7
@@
describe 'apt::key', :type => :define do
})
end
it 'contains the apt_key absent anchor' do
})
end
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
+86,7
@@
describe 'apt::key', :type => :define do
} end
it 'contains the apt_key' do
} end
it 'contains the apt_key' do
-
should
contain_apt_key(title).with({
+
is_expected.to
contain_apt_key(title).with({
:id => title,
:ensure => 'present',
:source => 'http://apt.puppetlabs.com/pubkey.gpg',
:id => title,
:ensure => 'present',
:source => 'http://apt.puppetlabs.com/pubkey.gpg',
@@
-95,7
+96,7
@@
describe 'apt::key', :type => :define do
})
end
it 'contains the apt_key present anchor' do
})
end
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
+105,7
@@
describe 'apt::key', :type => :define do
:key_server => 'p-gp.m-it.edu',
} end
it 'contains the apt_key' do
:key_server => 'p-gp.m-it.edu',
} end
it 'contains the apt_key' do
-
should
contain_apt_key(title).with({
+
is_expected.to
contain_apt_key(title).with({
:id => title,
:server => 'p-gp.m-it.edu',
})
:id => title,
:server => 'p-gp.m-it.edu',
})
@@
-118,7
+119,7
@@
describe 'apt::key', :type => :define do
}
end
it 'contains the apt_key' do
}
end
it 'contains the apt_key' do
-
should
contain_apt_key(title).with({
+
is_expected.to
contain_apt_key(title).with({
:id => title,
:server => 'hkp://pgp.mit.edu',
})
:id => title,
:server => 'hkp://pgp.mit.edu',
})
@@
-131,7
+132,7
@@
describe 'apt::key', :type => :define do
}
end
it 'contains the apt_key' do
}
end
it 'contains the apt_key' do
-
should
contain_apt_key(title).with({
+
is_expected.to
contain_apt_key(title).with({
:id => title,
:server => 'hkp://pgp.mit.edu:80',
})
:id => title,
:server => 'hkp://pgp.mit.edu:80',
})
@@
-286,19
+287,22
@@
describe 'apt::key', :type => :define do
"#{super()}\napt::key { 'duplicate': key => '#{title}', }"
end
"#{super()}\napt::key { 'duplicate': key => '#{title}', }"
end
- it 'contains t
wo apt::key resources
' do
-
should
contain_apt__key('duplicate').with({
+ it 'contains t
he duplicate apt::key resource
' do
+
is_expected.to
contain_apt__key('duplicate').with({
:key => title,
:ensure => 'present',
})
:key => title,
: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,
:ensure => 'present',
})
end
:id => title,
:ensure => 'present',
})
end
- it 'contains
only a singl
e apt_key' do
-
should
contain_apt_key('duplicate').with({
+ it 'contains
the nativ
e apt_key' do
+
is_expected.to
contain_apt_key('duplicate').with({
:id => title,
:ensure => 'present',
:source => nil,
:id => title,
:ensure => 'present',
:source => nil,
@@
-306,7
+310,10
@@
describe 'apt::key', :type => :define do
:content => nil,
:keyserver_options => nil,
})
:content => 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