Update parameters for apt::source

Change-Id: Ibebaf17c82cf399859aa2f05df3f95bd25b81ea1
This commit is contained in:
Takashi Kajinami 2020-07-20 14:34:28 +09:00
parent 796135c858
commit d6aeb8c9ee
2 changed files with 42 additions and 42 deletions

View File

@ -73,16 +73,17 @@ describe 'openstack_extras::repo::debian::debian' do
let :params do let :params do
default_params.merge!({ :source_hash => { default_params.merge!({ :source_hash => {
'debian_unstable' => { 'debian_unstable' => {
'location' => 'http://mymirror/debian/', 'location' => 'http://mymirror/debian/',
'repos' => 'main', 'repos' => 'main',
'release' => 'unstable' 'release' => 'unstable'
}, },
'puppetlabs' => { 'puppetlabs' => {
'location' => 'http://apt.puppetlabs.com', 'location' => 'http://apt.puppetlabs.com',
'repos' => 'main', 'repos' => 'main',
'release' => 'stretch', 'release' => 'stretch',
'key' => '4BD6EC30', 'key' => {
'key_server' => 'pgp.mit.edu' 'id' => '4BD6EC30', 'server' => 'pgp.mit.edu'
}
} }
} }
}) })
@ -95,11 +96,10 @@ describe 'openstack_extras::repo::debian::debian' do
)} )}
it { should contain_apt__source('puppetlabs').with( it { should contain_apt__source('puppetlabs').with(
:location => 'http://apt.puppetlabs.com', :location => 'http://apt.puppetlabs.com',
:repos => 'main', :repos => 'main',
:release => 'stretch', :release => 'stretch',
:key => '4BD6EC30', :key => { 'id' => '4BD6EC30', 'server' => 'pgp.mit.edu' }
:key_server => 'pgp.mit.edu'
)} )}
it { should contain_exec('installing openstack-backports-archive-keyring') } it { should contain_exec('installing openstack-backports-archive-keyring') }
@ -109,23 +109,23 @@ describe 'openstack_extras::repo::debian::debian' do
let :params do let :params do
default_params.merge!({ :source_hash => { default_params.merge!({ :source_hash => {
'debian_unstable' => { 'debian_unstable' => {
'location' => 'http://mymirror/debian/', 'location' => 'http://mymirror/debian/',
'repos' => 'main', 'repos' => 'main',
'release' => 'unstable' 'release' => 'unstable'
}, },
} }
}) })
default_params.merge!({ :source_defaults => { default_params.merge!({ :source_defaults => {
'include_src' => 'true' 'include' => { 'src' => true }
} }
}) })
end end
it { should contain_apt__source('debian_unstable').with( it { should contain_apt__source('debian_unstable').with(
:location => 'http://mymirror/debian/', :include => { 'src' => true },
:release => 'unstable', :location => 'http://mymirror/debian/',
:repos => 'main', :release => 'unstable',
:include_src => 'true' :repos => 'main',
)} )}
it { should contain_exec('installing openstack-backports-archive-keyring') } it { should contain_exec('installing openstack-backports-archive-keyring') }

View File

@ -61,16 +61,17 @@ describe 'openstack_extras::repo::debian::ubuntu' do
let :params do let :params do
default_params.merge!({ :source_hash => { default_params.merge!({ :source_hash => {
'local_mirror' => { 'local_mirror' => {
'location' => 'http://mymirror/ubuntu/', 'location' => 'http://mymirror/ubuntu/',
'repos' => 'main', 'repos' => 'main',
'release' => 'trusty' 'release' => 'trusty'
}, },
'puppetlabs' => { 'puppetlabs' => {
'location' => 'http://apt.puppetlabs.com', 'location' => 'http://apt.puppetlabs.com',
'repos' => 'main', 'repos' => 'main',
'release' => 'trusty', 'release' => 'trusty',
'key' => '4BD6EC30', 'key' => {
'key_server' => 'pgp.mit.edu' 'id' => '4BD6EC30', 'server' => 'pgp.mit.edu'
}
} }
} }
}) })
@ -83,11 +84,10 @@ describe 'openstack_extras::repo::debian::ubuntu' do
)} )}
it { should contain_apt__source('puppetlabs').with( it { should contain_apt__source('puppetlabs').with(
:location => 'http://apt.puppetlabs.com', :location => 'http://apt.puppetlabs.com',
:release => 'trusty', :release => 'trusty',
:repos => 'main', :repos => 'main',
:key => '4BD6EC30', :key => { 'id' => '4BD6EC30', 'server' => 'pgp.mit.edu' }
:key_server => 'pgp.mit.edu'
)} )}
it { should contain_exec('installing ubuntu-cloud-keyring') } it { should contain_exec('installing ubuntu-cloud-keyring') }
@ -97,23 +97,23 @@ describe 'openstack_extras::repo::debian::ubuntu' do
let :params do let :params do
default_params.merge!({ :source_hash => { default_params.merge!({ :source_hash => {
'local_mirror' => { 'local_mirror' => {
'location' => 'http://mymirror/ubuntu/', 'location' => 'http://mymirror/ubuntu/',
'repos' => 'main', 'repos' => 'main',
'release' => 'trusty' 'release' => 'trusty'
} }
} }
}) })
default_params.merge!({ :source_defaults => { default_params.merge!({ :source_defaults => {
'include_src' => 'true' 'include' => { 'src' => true }
} }
}) })
end end
it { should contain_apt__source('local_mirror').with( it { should contain_apt__source('local_mirror').with(
:include_src => 'true', :include => { 'src' => true },
:location => 'http://mymirror/ubuntu/', :location => 'http://mymirror/ubuntu/',
:release => 'trusty', :release => 'trusty',
:repos => 'main', :repos => 'main',
)} )}
it { should contain_exec('installing ubuntu-cloud-keyring') } it { should contain_exec('installing ubuntu-cloud-keyring') }