|
81 | 81 | context 'with no pin', if: facts[:os]['family'] == 'Debian' do
|
82 | 82 | let(:params) { { repos_ensure: true, package_apt_pin: '' } }
|
83 | 83 |
|
84 |
| - if Puppet.version =~ %r{^[6,7]} # https://tickets.puppetlabs.com/browse/PUP-9112 and https://tickets.puppetlabs.com/browse/PUP-9180 |
85 |
| - let(:expected_key_apt_source_key_content) { 'nil' } |
86 |
| - else |
87 |
| - let(:expected_key_apt_source_key_content) { ':undef' } |
88 |
| - end |
89 |
| - |
90 | 84 | describe 'it sets up an apt::source' do
|
91 | 85 | it {
|
92 | 86 | is_expected.to contain_apt__source('rabbitmq').with(
|
93 | 87 | 'location' => "https://packagecloud.io/rabbitmq/rabbitmq-server/#{facts[:os]['name'].downcase}",
|
94 | 88 | 'repos' => 'main',
|
95 |
| - 'key' => "{\"id\"=>\"8C695B0219AFDEB04A058ED8F4E789204D206F89\", \"source\"=>\"https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey\", \"content\"=>#{expected_key_apt_source_key_content}}" |
| 89 | + 'key' => '{"id"=>"8C695B0219AFDEB04A058ED8F4E789204D206F89", "source"=>"https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey", "content"=>nil}' |
96 | 90 | )
|
97 | 91 | }
|
98 | 92 | end
|
|
101 | 95 | context 'with pin', if: facts[:os]['family'] == 'Debian' do
|
102 | 96 | let(:params) { { repos_ensure: true, package_apt_pin: '700' } }
|
103 | 97 |
|
104 |
| - if Puppet.version =~ %r{^[6,7]} # https://tickets.puppetlabs.com/browse/PUP-9112 and https://tickets.puppetlabs.com/browse/PUP-9180 |
105 |
| - let(:expected_key_apt_source_key_content) { 'nil' } |
106 |
| - else |
107 |
| - let(:expected_key_apt_source_key_content) { ':undef' } |
108 |
| - end |
109 |
| - |
110 | 98 | describe 'it sets up an apt::source and pin' do
|
111 | 99 | it {
|
112 | 100 | is_expected.to contain_apt__source('rabbitmq').with(
|
113 | 101 | 'location' => "https://packagecloud.io/rabbitmq/rabbitmq-server/#{facts[:os]['name'].downcase}",
|
114 | 102 | 'repos' => 'main',
|
115 |
| - 'key' => "{\"id\"=>\"8C695B0219AFDEB04A058ED8F4E789204D206F89\", \"source\"=>\"https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey\", \"content\"=>#{expected_key_apt_source_key_content}}" |
| 103 | + 'key' => '{"id"=>"8C695B0219AFDEB04A058ED8F4E789204D206F89", "source"=>"https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey", "content"=>nil}' |
116 | 104 | )
|
117 | 105 | }
|
118 | 106 |
|
|
0 commit comments