X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Fdefines%2Fsource_compat_spec.rb;h=55be585aa63918a02ceb5c7f649bbd5a8c8e3cc8;hb=refs%2Fheads%2Frelease-prep;hp=dc261fbb88210fd2f0fd447e2f91d183bbf4def9;hpb=4513a5845c2a18aece7e17ad82612ec4da3efaa0;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/spec/defines/source_compat_spec.rb b/spec/defines/source_compat_spec.rb index dc261fb..55be585 100644 --- a/spec/defines/source_compat_spec.rb +++ b/spec/defines/source_compat_spec.rb @@ -3,12 +3,8 @@ require 'spec_helper' describe 'apt::source', type: :define do - GPG_KEY_ID = '6F6B15509CF8E59E6E469F327F438280EF8D349F' - - let :title do - 'my_source' - end - + let(:id) { '6F6B15509CF8E59E6E469F327F438280EF8D349F' } + let(:title) { 'my_source' } let :facts do { os: { @@ -16,13 +12,13 @@ describe 'apt::source', type: :define do name: 'Debian', release: { major: '9', - full: '9.0', + full: '9.0' }, distro: { codename: 'stretch', - id: 'Debian', - }, - }, + id: 'Debian' + } + } } end @@ -30,7 +26,7 @@ describe 'apt::source', type: :define do let :params do { 'include' => { 'deb' => false, 'src' => true }, - 'location' => 'http://debian.mirror.iweb.ca/debian/', + 'location' => 'http://debian.mirror.iweb.ca/debian/' } end @@ -47,10 +43,10 @@ describe 'apt::source', type: :define do 'release' => 'sid', 'repos' => 'testing', 'include' => { 'src' => false }, - 'key' => GPG_KEY_ID, + 'key' => id, 'pin' => '10', 'architecture' => 'x86_64', - 'allow_unsigned' => true, + 'allow_unsigned' => true } end @@ -66,8 +62,8 @@ describe 'apt::source', type: :define do } it { - expect(subject).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) + expect(subject).to contain_apt__key("Add key: #{id} from Apt::Source my_source").that_comes_before('Apt::Setting[list-my_source]').with('ensure' => 'present', + 'id' => id) } end @@ -76,7 +72,7 @@ describe 'apt::source', type: :define do { 'include' => { 'src' => false }, 'location' => 'http://debian.mirror.iweb.ca/debian/', - 'allow_insecure' => true, + 'allow_insecure' => true } end @@ -88,7 +84,7 @@ describe 'apt::source', type: :define do { 'include' => { 'src' => false }, 'location' => 'http://debian.mirror.iweb.ca/debian/', - 'allow_unsigned' => true, + 'allow_unsigned' => true } end @@ -99,7 +95,7 @@ describe 'apt::source', type: :define do let :params do { 'location' => 'http://debian.mirror.iweb.ca/debian/', - 'architecture' => 'x86_64', + 'architecture' => 'x86_64' } end @@ -111,7 +107,7 @@ describe 'apt::source', type: :define do context 'with ensure => absent' do let :params do { - 'ensure' => 'absent', + 'ensure' => 'absent' } end @@ -129,12 +125,12 @@ describe 'apt::source', type: :define do name: 'Debian', release: { major: '8', - full: '8.0', + full: '8.0' }, distro: { - id: 'Debian', - }, - }, + id: 'Debian' + } + } } end