X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Fdefines%2Fsource_compat_spec.rb;h=88cd625e1a5bcad94b9d5ce9c21517130698b044;hb=bd3b3fbe990bfa824ebed3504c0c82175d7c7ec9;hp=a3849077288ddbd39ac96c9817c567be77fdfcdc;hpb=35b2c5c0e1d04e190306e2efff0f10d8114331eb;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/spec/defines/source_compat_spec.rb b/spec/defines/source_compat_spec.rb index a384907..88cd625 100644 --- a/spec/defines/source_compat_spec.rb +++ b/spec/defines/source_compat_spec.rb @@ -20,8 +20,7 @@ describe 'apt::source', :type => :define do let :params do { - 'include_deb' => false, - 'include_src' => true, + 'include' => { 'deb' => false, 'src' => true }, 'location' => 'http://debian.mirror.iweb.ca/debian/', } end @@ -42,19 +41,15 @@ describe 'apt::source', :type => :define do end let :params do { - 'comment' => 'foo', - 'location' => 'http://debian.mirror.iweb.ca/debian/', - 'release' => 'sid', - 'repos' => 'testing', - 'include_src' => false, - 'required_packages' => 'vim', - 'key' => GPG_KEY_ID, - 'key_server' => 'pgp.mit.edu', - 'key_content' => 'GPG key content', - 'key_source' => 'http://apt.puppetlabs.com/pubkey.gpg', - 'pin' => '10', - 'architecture' => 'x86_64', - 'trusted_source' => true, + 'comment' => 'foo', + 'location' => 'http://debian.mirror.iweb.ca/debian/', + 'release' => 'sid', + 'repos' => 'testing', + 'include' => { 'src' => false }, + 'key' => GPG_KEY_ID, + 'pin' => '10', + 'architecture' => 'x86_64', + 'allow_unsigned' => true, } end @@ -68,26 +63,14 @@ describe 'apt::source', :type => :define do }) } - it { is_expected.to contain_exec("Required packages: 'vim' for my_source").that_comes_before('Apt::Setting[list-my_source]').with({ - 'command' => '/usr/bin/apt-get -y install vim', - 'logoutput' => 'on_failure', - 'refreshonly' => true, - 'tries' => '3', - 'try_sleep' => '1', - }) - } - it { is_expected.to contain_apt__key("Add key: #{GPG_KEY_ID} from Apt::Source my_source").that_comes_before('Apt::Setting[list-my_source]').with({ 'ensure' => 'present', 'id' => GPG_KEY_ID, - 'key_server' => 'pgp.mit.edu', - 'key_content' => 'GPG key content', - 'key_source' => 'http://apt.puppetlabs.com/pubkey.gpg', }) } end - context 'trusted_source true' do + context 'allow_unsigned true' do let :facts do { :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }}, @@ -99,9 +82,9 @@ describe 'apt::source', :type => :define do end let :params do { - 'include_src' => false, + 'include' => {'src' => false}, 'location' => 'http://debian.mirror.iweb.ca/debian/', - 'trusted_source' => true, + 'allow_unsigned' => true, } end