X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Fdefines%2Fsource_spec.rb;h=2ce50a2f03f0dd8a20f6f3774066445a7afc0850;hb=0c35168fb0223854fb82d1a61e4769bf2297a17e;hp=94446bfa9febdbdf68417346f99dbea62720a642;hpb=7e31732abd277c852564c10011099bdf6967dc4f;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/spec/defines/source_spec.rb b/spec/defines/source_spec.rb index 94446bf..2ce50a2 100644 --- a/spec/defines/source_spec.rb +++ b/spec/defines/source_spec.rb @@ -154,6 +154,38 @@ describe 'apt::source' do } end + context 'with keyring set' do + let :params do + { + location: 'hello.there', + keyring: '/usr/share/keyrings/foo-archive-keyring.gpg', + } + end + + it { + is_expected.to contain_apt__setting('list-my_source') + .with(ensure: 'present') + .with_content(%r{# my_source\ndeb \[signed-by=/usr/share/keyrings/foo-archive-keyring.gpg\] hello.there jessie main\n}) + } + end + + context 'with keyring, architecture and allow_unsigned set' do + let :params do + { + location: 'hello.there', + architecture: 'amd64', + allow_unsigned: true, + keyring: '/usr/share/keyrings/foo-archive-keyring.gpg', + } + end + + it { + is_expected.to contain_apt__setting('list-my_source') + .with(ensure: 'present') + .with_content(%r{# my_source\ndeb \[arch=amd64 trusted=yes signed-by=/usr/share/keyrings/foo-archive-keyring.gpg\] hello.there jessie main\n}) + } + end + context 'with a https location, install apt-transport-https' do let :params do {