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