X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Fclasses%2Fapt_spec.rb;h=53ef7bea49a1805ced7de19670db36464dd499b9;hb=89c747ab3b2caad9b36b8ce53a693537f4db6f36;hp=5aded56b755bf5153001fff6185c91fd8d5f85e7;hpb=0dce05adaec1b3f789302dfec026b79aeded220c;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/spec/classes/apt_spec.rb b/spec/classes/apt_spec.rb index 5aded56..53ef7be 100644 --- a/spec/classes/apt_spec.rb +++ b/spec/classes/apt_spec.rb @@ -155,7 +155,7 @@ describe 'apt' do 'puppetlabs' => { 'location' => 'http://apt.puppetlabs.com', 'repos' => 'main', - 'key' => { 'id' => '47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30', 'server' => 'pgp.mit.edu' }, + 'key' => { 'id' => '6F6B15509CF8E59E6E469F327F438280EF8D349F', 'server' => 'pgp.mit.edu' }, } } } } @@ -177,6 +177,32 @@ describe 'apt' do it { is_expected.to contain_file('/etc/apt/sources.list.d/puppetlabs.list').with_content(/^deb http:\/\/apt.puppetlabs.com precise main$/) } end + context 'with confs defined on valid osfamily' do + let :facts do + { :osfamily => 'Debian', + :lsbdistcodename => 'precise', + :lsbdistid => 'Debian', + :puppetversion => Puppet.version, + } + end + let(:params) { { :confs => { + 'foo' => { + 'content' => 'foo', + }, + 'bar' => { + 'content' => 'bar', + } + } } } + + it { is_expected.to contain_apt__conf('foo').with({ + :content => 'foo', + })} + + it { is_expected.to contain_apt__conf('bar').with({ + :content => 'bar', + })} + end + context 'with keys defined on valid osfamily' do let :facts do { :osfamily => 'Debian', @@ -189,7 +215,7 @@ describe 'apt' do '55BE302B' => { 'server' => 'subkeys.pgp.net', }, - '4BD6EC30' => { + 'EF8D349F' => { 'server' => 'pgp.mit.edu', } } } } @@ -198,7 +224,7 @@ describe 'apt' do :server => 'subkeys.pgp.net', })} - it { is_expected.to contain_apt__key('4BD6EC30').with({ + it { is_expected.to contain_apt__key('EF8D349F').with({ :server => 'pgp.mit.edu', })} end @@ -208,6 +234,7 @@ describe 'apt' do { :osfamily => 'Debian', :lsbdistcodename => 'precise', :lsbdistid => 'ubuntu', + :lsbdistrelease => '12.04', :puppetversion => Puppet.version, } end