File tree Expand file tree Collapse file tree 4 files changed +3
-87
lines changed Expand file tree Collapse file tree 4 files changed +3
-87
lines changed Original file line number Diff line number Diff line change 391391
392392 case $facts [' os' ][' name' ] {
393393 ' Debian' : {
394- if versioncmp($facts [' os' ][' release' ][' major' ], ' 9' ) >= 0 {
395- stdlib::ensure_packages([' gnupg' ])
396- }
394+ stdlib::ensure_packages([' gnupg' ])
397395 }
398396 ' Ubuntu' : {
399397 if versioncmp($facts [' os' ][' release' ][' full' ], ' 17.04' ) >= 0 {
Original file line number Diff line number Diff line change 6464
6565 case $facts [' os' ][' name' ] {
6666 ' Debian' : {
67- if versioncmp($facts [' os' ][' release' ][' major' ], ' 9' ) >= 0 {
68- stdlib::ensure_packages([' gnupg' ])
69- Apt::Key<| title == $title |>
70- }
67+ stdlib::ensure_packages([' gnupg' ])
68+ Apt::Key<| title == $title |>
7169 }
7270 ' Ubuntu' : {
7371 if versioncmp($facts [' os' ][' release' ][' full' ], ' 17.04' ) >= 0 {
Original file line number Diff line number Diff line change 125125 else {
126126 $_location = $location
127127 }
128- # Newer oses, do not need the package for HTTPS transport.
129- $_transport_https_releases = [' 9' ]
130- if (fact(' os.release.major' ) in $_transport_https_releases) and $_location =~ /(?i:^https:\/\/)/ {
131- stdlib::ensure_packages(' apt-transport-https' )
132- Package[' apt-transport-https' ] -> Class[' apt::update' ]
133- }
134128 } else {
135129 $_location = undef
136130 }
Original file line number Diff line number Diff line change 3535
3636 it {
3737 expect ( subject ) . to contain_apt__setting ( 'list-my_source' ) . with ( ensure : 'present' ) . without_content ( %r{# my_source\n deb-src hello.there wheezy main\n } )
38- expect ( subject ) . not_to contain_package ( 'apt-transport-https' )
3938 }
4039 end
4140 end
223222 }
224223 end
225224
226- context 'with a https location, install apt-transport-https' do
227- let :params do
228- {
229- location : 'HTTPS://foo.bar' ,
230- allow_unsigned : false
231- }
232- end
233-
234- it {
235- expect ( subject ) . to contain_package ( 'apt-transport-https' )
236- }
237- end
238-
239- context 'with a https location and custom release, install apt-transport-https' do
240- let :facts do
241- {
242- os : {
243- family : 'Debian' ,
244- name : 'Debian' ,
245- release : {
246- major : '9' ,
247- full : '9.0'
248- } ,
249- distro : {
250- codename : 'stretch' ,
251- id : 'Debian'
252- }
253- } ,
254- puppetversion : Puppet . version
255- }
256- end
257- let :params do
258- {
259- location : 'HTTPS://foo.bar' ,
260- allow_unsigned : false ,
261- release : 'customrelease'
262- }
263- end
264-
265- it {
266- expect ( subject ) . to contain_package ( 'apt-transport-https' )
267- }
268- end
269-
270- context 'with a https location, do not install apt-transport-https on oses not in list eg buster' do
271- let :facts do
272- {
273- os : {
274- family : 'Debian' ,
275- name : 'Debian' ,
276- release : {
277- major : '10' ,
278- full : '10.0'
279- } ,
280- distro : {
281- codename : 'buster' ,
282- id : 'Debian'
283- }
284- }
285- }
286- end
287- let :params do
288- {
289- location : 'https://foo.bar' ,
290- allow_unsigned : false
291- }
292- end
293-
294- it {
295- expect ( subject ) . not_to contain_package ( 'apt-transport-https' )
296- }
297- end
298-
299225 context 'with architecture equals x86_64' do
300226 let :facts do
301227 {
You can’t perform that action at this time.
0 commit comments