|
151 | 151 | })
|
152 | 152 | }
|
153 | 153 |
|
154 |
| - it { |
155 |
| - is_expected.to contain_file('/etc/pki/deb-gpg/GPG-KEY-puppet-20250406') |
156 |
| - .with({ |
157 |
| - 'ensure' => 'file', |
158 |
| - 'owner' => '0', |
159 |
| - 'group' => '0', |
160 |
| - 'mode' => '0644', |
161 |
| - 'source' => 'puppet:///modules/puppet_agent/GPG-KEY-puppet-20250406', |
162 |
| - }) |
163 |
| - } |
164 |
| - |
165 |
| - it { |
166 |
| - is_expected.to contain_file('/etc/pki/deb-gpg/GPG-KEY-puppet') |
167 |
| - .with({ |
168 |
| - 'ensure' => 'file', |
169 |
| - 'owner' => '0', |
170 |
| - 'group' => '0', |
171 |
| - 'mode' => '0644', |
172 |
| - 'source' => 'puppet:///modules/puppet_agent/GPG-KEY-puppet', |
173 |
| - }) |
174 |
| - } |
175 |
| - |
176 |
| - it { |
177 |
| - is_expected.to contain_apt__key('legacy key') |
178 |
| - .with({ |
179 |
| - 'id' => '6F6B15509CF8E59E6E469F327F438280EF8D349F', |
180 |
| - 'source' => '/etc/pki/deb-gpg/GPG-KEY-puppet', |
181 |
| - }) |
182 |
| - } |
183 |
| - |
184 | 154 | it {
|
185 | 155 | is_expected.to contain_apt__source('pc_repo')
|
186 | 156 | .with({
|
187 | 157 | 'location' => 'https://master.example.vm:8140/packages/2000.0.0/debian-7-x86_64',
|
188 | 158 | 'repos' => 'PC1',
|
189 | 159 | 'key' => {
|
190 |
| - 'id' => 'D6811ED3ADEEB8441AF5AA8F4528B6CD9E61EF26', |
191 |
| - 'source' => '/etc/pki/deb-gpg/GPG-KEY-puppet-20250406', |
| 160 | + 'name' => 'GPG-KEY-puppet-20250406.asc', |
| 161 | + 'content' => File.read('files/GPG-KEY-puppet-20250406'), |
192 | 162 | },
|
193 | 163 | })
|
194 | 164 | }
|
|
209 | 179 | 'location' => 'https://fake-apt-mirror.com/packages/2000.0.0/debian-7-x86_64',
|
210 | 180 | 'repos' => 'PC1',
|
211 | 181 | 'key' => {
|
212 |
| - 'id' => 'D6811ED3ADEEB8441AF5AA8F4528B6CD9E61EF26', |
213 |
| - 'source' => '/etc/pki/deb-gpg/GPG-KEY-puppet-20250406', |
| 182 | + 'name' => 'GPG-KEY-puppet-20250406.asc', |
| 183 | + 'content' => File.read('files/GPG-KEY-puppet-20250406'), |
214 | 184 | },
|
215 | 185 | })
|
216 | 186 | }
|
|
225 | 195 | end
|
226 | 196 |
|
227 | 197 | it { is_expected.not_to contain_apt__setting('conf-pc_repo') }
|
228 |
| - it { is_expected.not_to contain_apt__key('legacy key') } |
229 | 198 | it { is_expected.not_to contain_apt__source('pc_repo') }
|
230 | 199 | end
|
231 | 200 |
|
|
245 | 214 | }
|
246 | 215 | end
|
247 | 216 |
|
248 |
| - it { |
249 |
| - is_expected.to contain_apt__key('legacy key') |
250 |
| - .with({ |
251 |
| - 'id' => '6F6B15509CF8E59E6E469F327F438280EF8D349F', |
252 |
| - 'source' => '/etc/pki/deb-gpg/GPG-KEY-puppet', |
253 |
| - }) |
254 |
| - } |
255 |
| - |
256 | 217 | it {
|
257 | 218 | is_expected.to contain_apt__source('pc_repo')
|
258 | 219 | .with({
|
259 | 220 | 'location' => 'https://apt.puppet.com',
|
260 | 221 | 'repos' => 'puppet5',
|
261 | 222 | 'key' => {
|
262 |
| - 'id' => 'D6811ED3ADEEB8441AF5AA8F4528B6CD9E61EF26', |
263 |
| - 'source' => '/etc/pki/deb-gpg/GPG-KEY-puppet-20250406', |
| 223 | + 'name' => 'GPG-KEY-puppet-20250406.asc', |
| 224 | + 'content' => File.read('files/GPG-KEY-puppet-20250406'), |
264 | 225 | },
|
265 | 226 | })
|
266 | 227 | }
|
|
282 | 243 | 'location' => 'https://fake-apt-mirror.com/',
|
283 | 244 | 'repos' => 'puppet5',
|
284 | 245 | 'key' => {
|
285 |
| - 'id' => 'D6811ED3ADEEB8441AF5AA8F4528B6CD9E61EF26', |
286 |
| - 'source' => '/etc/pki/deb-gpg/GPG-KEY-puppet-20250406', |
| 246 | + 'name' => 'GPG-KEY-puppet-20250406.asc', |
| 247 | + 'content' => File.read('files/GPG-KEY-puppet-20250406'), |
287 | 248 | },
|
288 | 249 | })
|
289 | 250 | }
|
|
297 | 258 | }
|
298 | 259 | end
|
299 | 260 |
|
300 |
| - it { is_expected.not_to contain_apt__key('legacy key') } |
301 | 261 | it { is_expected.not_to contain_apt__source('pc_repo') }
|
302 | 262 | end
|
303 | 263 |
|
|
0 commit comments