From d6aeb8c9eebbab1771138b1108a81d40de8d6bb3 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 20 Jul 2020 14:34:28 +0900 Subject: [PATCH] Update parameters for apt::source Change-Id: Ibebaf17c82cf399859aa2f05df3f95bd25b81ea1 --- ...penstack_extras_repo_debian_debian_spec.rb | 42 +++++++++---------- ...penstack_extras_repo_debian_ubuntu_spec.rb | 42 +++++++++---------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/spec/classes/openstack_extras_repo_debian_debian_spec.rb b/spec/classes/openstack_extras_repo_debian_debian_spec.rb index f347800..1d4e141 100644 --- a/spec/classes/openstack_extras_repo_debian_debian_spec.rb +++ b/spec/classes/openstack_extras_repo_debian_debian_spec.rb @@ -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') } diff --git a/spec/classes/openstack_extras_repo_debian_ubuntu_spec.rb b/spec/classes/openstack_extras_repo_debian_ubuntu_spec.rb index 3fceea8..787b0b8 100644 --- a/spec/classes/openstack_extras_repo_debian_ubuntu_spec.rb +++ b/spec/classes/openstack_extras_repo_debian_ubuntu_spec.rb @@ -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') }